* [PATCH] staging: rts5208: Clean up coding style in rtsx_chip.c to get rid of checkpatch.pl warnings
@ 2014-10-01 22:12 Giedrius Statkevicius
2014-10-02 8:12 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Giedrius Statkevicius @ 2014-10-01 22:12 UTC (permalink / raw)
To: gregkh; +Cc: micky_ching, fabio.falzoi84, mahati.chamarthy, devel, linux-kernel
Fix 10 occurences of coding style errors where the line exceeds 80 characters by breaking them into more lines.
Checkpatch.pl reports these errors as: 'WARNING: line over 80 characters'
Also, removes unnecessary returns in two void functions by removing the return statements.
Checkpatch.pl reports these errors as: 'WARNING: void function return statements are not generally useful'
Patch is against Greg KH's staging-next tree.
Signed-off-by: Giedrius Statkevicius <giedrius.statkevicius@gmail.com>
---
drivers/staging/rts5208/rtsx_chip.c | 40 ++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rts5208/rtsx_chip.c b/drivers/staging/rts5208/rtsx_chip.c
index 1411471..d604341 100644
--- a/drivers/staging/rts5208/rtsx_chip.c
+++ b/drivers/staging/rts5208/rtsx_chip.c
@@ -291,7 +291,9 @@ int rtsx_reset_chip(struct rtsx_chip *chip)
if (chip->dynamic_aspm) {
if (CHK_SDIO_EXIST(chip)) {
if (CHECK_PID(chip, 0x5288)) {
- retval = rtsx_write_cfg_dw(chip, 2, 0xC0, 0xFF, chip->aspm_l0s_l1_en);
+ retval = rtsx_write_cfg_dw(chip, 2,
+ 0xC0, 0xFF,
+ chip->aspm_l0s_l1_en);
if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
}
@@ -310,9 +312,13 @@ int rtsx_reset_chip(struct rtsx_chip *chip)
if (CHK_SDIO_EXIST(chip)) {
chip->aspm_level[1] = chip->aspm_l0s_l1_en;
if (CHECK_PID(chip, 0x5288))
- retval = rtsx_write_cfg_dw(chip, 2, 0xC0, 0xFF, chip->aspm_l0s_l1_en);
+ retval = rtsx_write_cfg_dw(chip, 2,
+ 0xC0, 0xFF,
+ chip->aspm_l0s_l1_en);
else
- retval = rtsx_write_cfg_dw(chip, 1, 0xC0, 0xFF, chip->aspm_l0s_l1_en);
+ retval = rtsx_write_cfg_dw(chip, 1,
+ 0xC0, 0xFF,
+ chip->aspm_l0s_l1_en);
if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
@@ -966,7 +972,8 @@ void rtsx_polling_func(struct rtsx_chip *chip)
dev_dbg(rtsx_dev(chip), "SDIO enter ASPM!\n");
rtsx_write_register(chip,
ASPM_FORCE_CTL, 0xFC,
- 0x30 | (chip->aspm_level[1] << 2));
+ 0x30 |
+ (chip->aspm_level[1] << 2));
chip->sdio_aspm = 1;
}
}
@@ -988,8 +995,10 @@ void rtsx_polling_func(struct rtsx_chip *chip)
turn_off_led(chip, LED_GPIO);
- if (chip->auto_power_down && !chip->card_ready && !chip->sd_io)
- rtsx_force_power_down(chip, SSC_PDCTL | OC_PDCTL);
+ if (chip->auto_power_down && !chip->card_ready &&
+ !chip->sd_io)
+ rtsx_force_power_down(chip,
+ SSC_PDCTL | OC_PDCTL);
}
}
@@ -1081,7 +1090,9 @@ Delink_Stage:
dev_dbg(rtsx_dev(chip), "False card inserted, do force delink\n");
if (enter_L1)
- rtsx_write_register(chip, HOST_SLEEP_STATE, 0x03, 1);
+ rtsx_write_register(chip,
+ HOST_SLEEP_STATE,
+ 0x03, 1);
rtsx_write_register(chip,
CHANGE_LINK_STATE, 0x0A,
@@ -1090,14 +1101,19 @@ Delink_Stage:
if (enter_L1)
rtsx_enter_L1(chip);
- chip->auto_delink_cnt = delink_stage3_cnt + 1;
+ chip->auto_delink_cnt =
+ delink_stage3_cnt + 1;
} else {
dev_dbg(rtsx_dev(chip), "No card inserted, do delink\n");
if (enter_L1)
- rtsx_write_register(chip, HOST_SLEEP_STATE, 0x03, 1);
+ rtsx_write_register(chip,
+ HOST_SLEEP_STATE,
+ 0x03, 1);
- rtsx_write_register(chip, CHANGE_LINK_STATE, 0x02, 0x02);
+ rtsx_write_register(chip,
+ CHANGE_LINK_STATE, 0x02,
+ 0x02);
if (enter_L1)
rtsx_enter_L1(chip);
@@ -1823,8 +1839,6 @@ void rtsx_enable_aspm(struct rtsx_chip *chip)
}
}
}
-
- return;
}
void rtsx_disable_aspm(struct rtsx_chip *chip)
@@ -1848,8 +1862,6 @@ void rtsx_disable_aspm(struct rtsx_chip *chip)
wait_timeout(1);
}
}
-
- return;
}
int rtsx_read_ppbuf(struct rtsx_chip *chip, u8 *buf, int buf_len)
--
2.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rts5208: Clean up coding style in rtsx_chip.c to get rid of checkpatch.pl warnings
2014-10-01 22:12 [PATCH] staging: rts5208: Clean up coding style in rtsx_chip.c to get rid of checkpatch.pl warnings Giedrius Statkevicius
@ 2014-10-02 8:12 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-10-02 8:12 UTC (permalink / raw)
To: Giedrius Statkevicius
Cc: gregkh, devel, linux-kernel, mahati.chamarthy, fabio.falzoi84
On Thu, Oct 02, 2014 at 01:12:35AM +0300, Giedrius Statkevicius wrote:
> diff --git a/drivers/staging/rts5208/rtsx_chip.c b/drivers/staging/rts5208/rtsx_chip.c
> index 1411471..d604341 100644
> --- a/drivers/staging/rts5208/rtsx_chip.c
> +++ b/drivers/staging/rts5208/rtsx_chip.c
> @@ -291,7 +291,9 @@ int rtsx_reset_chip(struct rtsx_chip *chip)
> if (chip->dynamic_aspm) {
> if (CHK_SDIO_EXIST(chip)) {
> if (CHECK_PID(chip, 0x5288)) {
These two conditions can be combined and the indenting pulled in one
tab.
if (CHK_SDIO_EXIST(chip) && CHECK_PID(chip, 0x5288)) {
}
> @@ -988,8 +995,10 @@ void rtsx_polling_func(struct rtsx_chip *chip)
>
> turn_off_led(chip, LED_GPIO);
>
> - if (chip->auto_power_down && !chip->card_ready && !chip->sd_io)
> - rtsx_force_power_down(chip, SSC_PDCTL | OC_PDCTL);
> + if (chip->auto_power_down && !chip->card_ready &&
> + !chip->sd_io)
Line this up like this:
if (chip->auto_power_down && !chip->card_ready &&
!chip->sd_io)
[tab][tab][tab][space][space][space][space]!chip->sd_io)
> + rtsx_force_power_down(chip,
> + SSC_PDCTL | OC_PDCTL);
>
> }
> }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-02 8:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-01 22:12 [PATCH] staging: rts5208: Clean up coding style in rtsx_chip.c to get rid of checkpatch.pl warnings Giedrius Statkevicius
2014-10-02 8:12 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.