mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] rtc: rv3028: Fix codestyle errors and checks
@ 2022-08-16  3:56 Jagath Jog J
  2022-08-16  3:56 ` [PATCH 1/3] rtc: rv3028: Inserting some required spaces Jagath Jog J
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jagath Jog J @ 2022-08-16  3:56 UTC (permalink / raw)
  To: alexandre.belloni, a.zummo; +Cc: linux-rtc, linux-kernel, jagathjog1996

This series fix the following errors/checks reported by
checkpatch.pl:
- Add space required before the open parenthesis '(' and after the ','.
- Using tabs instead of spaces.
- Matching open parenthesis and removing unwanted blank line.

Jagath Jog J (3):
  rtc: rv3028: Inserting some required spaces.
  rtc: rv3028: fix code indent issue
  rtc: rv3028: Alignment to match the open parenthesis

 drivers/rtc/rtc-rv3028.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] rtc: rv3028: Inserting some required spaces.
  2022-08-16  3:56 [PATCH 0/3] rtc: rv3028: Fix codestyle errors and checks Jagath Jog J
@ 2022-08-16  3:56 ` Jagath Jog J
  2022-08-16  3:56 ` [PATCH 2/3] rtc: rv3028: fix code indent issue Jagath Jog J
  2022-08-16  3:56 ` [PATCH 3/3] rtc: rv3028: Alignment to match the open parenthesis Jagath Jog J
  2 siblings, 0 replies; 4+ messages in thread
From: Jagath Jog J @ 2022-08-16  3:56 UTC (permalink / raw)
  To: alexandre.belloni, a.zummo; +Cc: linux-rtc, linux-kernel, jagathjog1996

Coding style changes for checkpatch.pl error.
Add space required before the open parenthesis '('.
Add space required after the ','.

Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
---
 drivers/rtc/rtc-rv3028.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
index cdc623b3e365..5cebb00bec21 100644
--- a/drivers/rtc/rtc-rv3028.c
+++ b/drivers/rtc/rtc-rv3028.c
@@ -80,8 +80,8 @@
 #define RV3028_EEBUSY_TIMEOUT		100000
 
 #define RV3028_BACKUP_TCE		BIT(5)
-#define RV3028_BACKUP_TCR_MASK		GENMASK(1,0)
-#define RV3028_BACKUP_BSM		GENMASK(3,2)
+#define RV3028_BACKUP_TCR_MASK		GENMASK(1, 0)
+#define RV3028_BACKUP_BSM		GENMASK(3, 2)
 
 #define RV3028_BACKUP_BSM_DSM		0x1
 #define RV3028_BACKUP_BSM_LSM		0x3
@@ -522,7 +522,7 @@ static int rv3028_param_get(struct device *dev, struct rtc_param *param)
 	struct rv3028_data *rv3028 = dev_get_drvdata(dev);
 	int ret;
 
-	switch(param->param) {
+	switch (param->param) {
 		u32 value;
 
 	case RTC_PARAM_BACKUP_SWITCH_MODE:
@@ -532,7 +532,7 @@ static int rv3028_param_get(struct device *dev, struct rtc_param *param)
 
 		value = FIELD_GET(RV3028_BACKUP_BSM, value);
 
-		switch(value) {
+		switch (value) {
 		case RV3028_BACKUP_BSM_DSM:
 			param->uvalue = RTC_BSM_DIRECT;
 			break;
@@ -555,7 +555,7 @@ static int rv3028_param_set(struct device *dev, struct rtc_param *param)
 {
 	struct rv3028_data *rv3028 = dev_get_drvdata(dev);
 
-	switch(param->param) {
+	switch (param->param) {
 		u8 mode;
 	case RTC_PARAM_BACKUP_SWITCH_MODE:
 		switch (param->uvalue) {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] rtc: rv3028: fix code indent issue
  2022-08-16  3:56 [PATCH 0/3] rtc: rv3028: Fix codestyle errors and checks Jagath Jog J
  2022-08-16  3:56 ` [PATCH 1/3] rtc: rv3028: Inserting some required spaces Jagath Jog J
@ 2022-08-16  3:56 ` Jagath Jog J
  2022-08-16  3:56 ` [PATCH 3/3] rtc: rv3028: Alignment to match the open parenthesis Jagath Jog J
  2 siblings, 0 replies; 4+ messages in thread
From: Jagath Jog J @ 2022-08-16  3:56 UTC (permalink / raw)
  To: alexandre.belloni, a.zummo; +Cc: linux-rtc, linux-kernel, jagathjog1996

Fix following the checkpatch.pl error by using tabs instead of spaces.
ERROR: code indent should use tabs where possible.

Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
---
 drivers/rtc/rtc-rv3028.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
index 5cebb00bec21..f7c801c06d00 100644
--- a/drivers/rtc/rtc-rv3028.c
+++ b/drivers/rtc/rtc-rv3028.c
@@ -851,9 +851,9 @@ static const struct rtc_class_ops rv3028_rtc_ops = {
 };
 
 static const struct regmap_config regmap_config = {
-        .reg_bits = 8,
-        .val_bits = 8,
-        .max_register = 0x37,
+	.reg_bits = 8,
+	.val_bits = 8,
+	.max_register = 0x37,
 };
 
 static int rv3028_probe(struct i2c_client *client)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] rtc: rv3028: Alignment to match the open parenthesis
  2022-08-16  3:56 [PATCH 0/3] rtc: rv3028: Fix codestyle errors and checks Jagath Jog J
  2022-08-16  3:56 ` [PATCH 1/3] rtc: rv3028: Inserting some required spaces Jagath Jog J
  2022-08-16  3:56 ` [PATCH 2/3] rtc: rv3028: fix code indent issue Jagath Jog J
@ 2022-08-16  3:56 ` Jagath Jog J
  2 siblings, 0 replies; 4+ messages in thread
From: Jagath Jog J @ 2022-08-16  3:56 UTC (permalink / raw)
  To: alexandre.belloni, a.zummo; +Cc: linux-rtc, linux-kernel, jagathjog1996

Fix following checkpatch.pl check by adding space to match the
open parenthesis and removing unwanted blank line.
CHECK: Alignment should match open parenthesis.
CHECK: Blank lines aren't necessary before a close brace '}'.

Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
---
 drivers/rtc/rtc-rv3028.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
index f7c801c06d00..0da68fd7cedd 100644
--- a/drivers/rtc/rtc-rv3028.c
+++ b/drivers/rtc/rtc-rv3028.c
@@ -266,7 +266,7 @@ static irqreturn_t rv3028_handle_irq(int irq, void *dev_id)
 	u32 status = 0, ctrl = 0;
 
 	if (regmap_read(rv3028->regmap, RV3028_STATUS, &status) < 0 ||
-	   status == 0) {
+	    status == 0) {
 		return IRQ_NONE;
 	}
 
@@ -514,7 +514,6 @@ static int rv3028_set_offset(struct device *dev, long offset)
 	rv3028_exit_eerd(rv3028, eerd);
 
 	return ret;
-
 }
 
 static int rv3028_param_get(struct device *dev, struct rtc_param *param)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-16  7:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16  3:56 [PATCH 0/3] rtc: rv3028: Fix codestyle errors and checks Jagath Jog J
2022-08-16  3:56 ` [PATCH 1/3] rtc: rv3028: Inserting some required spaces Jagath Jog J
2022-08-16  3:56 ` [PATCH 2/3] rtc: rv3028: fix code indent issue Jagath Jog J
2022-08-16  3:56 ` [PATCH 3/3] rtc: rv3028: Alignment to match the open parenthesis Jagath Jog J

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®