rtc: rv3028: Fix codestyle errors and checks
cover rtc: rv3028: Fix codestyle errors and checks
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(-)
Signature · 1 line
2.17.1
PATCH 1/3 rtc: rv3028: Inserting some required spaces.
Coding style changes for checkpatch.pl error. Add space required before the open parenthesis '('. Add space required after the ','.
--- drivers/rtc/rtc-rv3028.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/rtc/rtc-rv3028.c +5 -5
@@ -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) {
Signature · 1 line
2.17.1
PATCH 2/3 rtc: rv3028: fix code indent issue
In reply to Jagath Jog JFix following the checkpatch.pl error by using tabs instead of spaces.
ERROR: code indent should use tabs where possible.
--- drivers/rtc/rtc-rv3028.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/rtc/rtc-rv3028.c +3 -3
@@ -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)
Signature · 1 line
2.17.1
PATCH 3/3 rtc: rv3028: Alignment to match the open parenthesis
In reply to Jagath Jog JFix 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 '}'.
--- drivers/rtc/rtc-rv3028.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/rtc/rtc-rv3028.c +1 -2
@@ -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)
Signature · 1 line
2.17.1