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
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 <[email protected]>
---
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
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 <[email protected]>
---
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
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 <[email protected]>
---
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