leds: leds-ss4200: fix incorrect placement of __initdata marker
Subsystems (2)
PATCH 1/5 leds: leds-ss4200: fix incorrect placement of __initdata marker
The __initdata marker can be virtually anywhere on the line, EXCEPT right after "struct". The preferred location is before the "=" sign if there is one, or before the trailing ";" otherwise. It also fixes the following chechpatch warning.
WARNING: __initdata should be placed after nodetect
--- drivers/leds/leds-ss4200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-ss4200.c +1 -1
@@ -78,7 +78,7 @@ static int __init ss4200_led_dmi_callback(const struct dmi_system_id *id)return 1 ; } -static bool __initdata nodetect; +static bool nodetect__initdata ;module_param_named (nodetect, nodetect, bool,0 );MODULE_PARM_DESC (nodetect,"Skip DMI-based hardware detection" );
Signature · 1 line
1.7.10.4
PATCH 2/5 leds: leds-ss4200: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is deprecated.
--- drivers/leds/leds-ss4200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-ss4200.c +1 -1
@@ -63,7 +63,7 @@ MODULE_LICENSE("GPL");/* * PCI ID of the Intel ICH7 LPC Device within which the GPIO block lives. */ -static DEFINE_PCI_DEVICE_TABLE (ich7_lpc_pci_id) = { +static const struct pci_device_id ich7_lpc_pci_id[] = { {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH7_0 ) }, {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH7_1 ) }, {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH7_30 ) },
Signature · 1 line
1.7.10.4
Bryan Wu
AppliedRe: [PATCH 2/5] leds: leds-ss4200: remove DEFINE_PCI_DEVICE_TABLE macro
Quoted 3 lines · Jingoo Han
Don't use
DEFINE_PCI_DEVICE_TABLEmacro, because this macro is deprecated.
Applied, thanks,
-Bryan
Quoted 22 lines
Signed-off-by Jingoo Han <[email protected]>--- drivers/leds/leds-ss4200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/leds/leds-ss4200.c +1
-2@@ -63,7 +63,7 @@ MODULE_LICENSE("GPL");/* * PCI ID of the Intel ICH7 LPC Device within which the GPIO block lives. */ -static DEFINE_PCI_DEVICE_TABLE (ich7_lpc_pci_id) = { +static const struct pci_device_id ich7_lpc_pci_id[] = { {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH7_0 ) }, {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH7_1 ) }, {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH7_30 ) }, --1.7.10.4
PATCH 3/5 leds: lp5562: remove unnecessary parentheses
In reply to Jingoo HanRemove unnecessary parentheses in order to fix the following checkpatch error.
ERROR: return is not a function, parentheses are not required
--- drivers/leds/leds-lp5562.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/leds/leds-lp5562.c +3 -3
@@ -346,9 +346,9 @@ static void lp5562_write_program_memory(struct lp55xx_chip *chip,/* check the size of program count */ static inline bool _is_pc_overflow (struct lp55xx_predef_pattern *ptn) { -return (ptn->size_r >=LP5562_PROGRAM_LENGTH || - ptn->size_g >=LP5562_PROGRAM_LENGTH || - ptn->size_b >=LP5562_PROGRAM_LENGTH ); +return ptn->size_r >=LP5562_PROGRAM_LENGTH || + ptn->size_g >=LP5562_PROGRAM_LENGTH || + ptn->size_b >=LP5562_PROGRAM_LENGTH ; }static int lp5562_run_predef_led_pattern (struct lp55xx_chip *chip,int mode)
Signature · 1 line
1.7.10.4
Bryan Wu
AppliedRe: [PATCH 3/5] leds: lp5562: remove unnecessary parentheses
Quoted 5 lines · Jingoo Han
Remove unnecessary parentheses in order to fix the following checkpatch error.
ERROR: return is not a function, parentheses are not required
Applied, thanks,
-Bryan
Quoted 26 lines
Signed-off-by Jingoo Han <[email protected]>--- drivers/leds/leds-lp5562.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/leds/leds-lp5562.c +3
-4@@ -346,9 +346,9 @@ static void lp5562_write_program_memory(struct lp55xx_chip *chip,/* check the size of program count */ static inline bool _is_pc_overflow (struct lp55xx_predef_pattern *ptn) { -return (ptn->size_r >=LP5562_PROGRAM_LENGTH || - ptn->size_g >=LP5562_PROGRAM_LENGTH || - ptn->size_b >=LP5562_PROGRAM_LENGTH ); +return ptn->size_r >=LP5562_PROGRAM_LENGTH || + ptn->size_g >=LP5562_PROGRAM_LENGTH || + ptn->size_b >=LP5562_PROGRAM_LENGTH ; }static int lp5562_run_predef_led_pattern (struct lp55xx_chip *chip,int mode) --1.7.10.4
PATCH 4/5 leds: clevo-mail: fix incorrect placement of __initdata marker
In reply to Jingoo HanThe __initdata marker can be virtually anywhere on the line, EXCEPT right after "struct". The preferred location is before the "=" sign if there is one, or before the trailing ";" otherwise. It also fixes the following chechpatch warning.
WARNING: __initdata should be placed after nodetect
--- drivers/leds/leds-clevo-mail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-clevo-mail.c +1 -1
@@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <[email protected]>");MODULE_DESCRIPTION ("Clevo mail LED driver" );MODULE_LICENSE ("GPL" ); -static bool __initdata nodetect; +static bool nodetect__initdata ;module_param_named (nodetect, nodetect, bool,0 );MODULE_PARM_DESC (nodetect,"Skip DMI hardware detection" );
Signature · 1 line
1.7.10.4
Re: [PATCH 4/5] leds: clevo-mail: fix incorrect placement of __initdata marker
Hello,
drivers/leds/leds-clevo-mail.c MODULE_AUTHOR("Márton Németh <[email protected]>"); · line 24
Quoted 12 lines · Jingoo Han
drivers/leds/leds-clevo-mail.c +1
-1@@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <[email protected]>");MODULE_DESCRIPTION ("Clevo mail LED driver" );MODULE_LICENSE ("GPL" ); -static bool __initdata nodetect; +static bool nodetect__initdata ;module_param_named (nodetect, nodetect, bool,0 );MODULE_PARM_DESC (nodetect,"Skip DMI hardware detection" );
not sure why I'm on Cc, but yes, the change is in line with gcc docs. But I wonder if __initdata is ok for a variable backing a module parameter as it appears in /sys. Does
cat /sys/module/leds-clevo-mail/parameters/nodetect
result in an oops? If yes, better drop the __initdata instead of moving it.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Re: [PATCH 4/5] leds: clevo-mail: fix incorrect placement of __initdata marker
Quoted 19 lines · Uwe Kleine-König
Hello,
drivers/leds/leds-clevo-mail.c MODULE_AUTHOR("Márton Németh <[email protected]>"); · line 24
Quoted 12 lines · Jingoo Han
drivers/leds/leds-clevo-mail.c +1
-1@@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <[email protected]>");MODULE_DESCRIPTION ("Clevo mail LED driver" );MODULE_LICENSE ("GPL" ); -static bool __initdata nodetect; +static bool nodetect__initdata ;module_param_named (nodetect, nodetect, bool,0 );MODULE_PARM_DESC (nodetect,"Skip DMI hardware detection" );not sure why I'm on Cc, but yes, the change is in line with gcc docs. But I wonder if
__initdatais ok for a variable backing a module parameter as it appears in /sys. Does
Quoted 4 lines
cat
/sys/module/leds-clevo-mail/parameters/nodetectresult in an oops? If yes, better drop the
__initdatainstead of moving it.
Agree with Uwe, I think we'd better drop it. It is not right for a module parameter.
And please update a previous similar patch as well.
Thanks,
-Bryan
PATCH 5/5 leds: blinkm: remove unnecessary spaces
In reply to Jingoo HanRemove unnecessary space in order to fix the following checkpatch issues.
WARNING: space prohibited before semicolon
--- drivers/leds/leds-blinkm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-blinkm.c +1 -1
@@ -443,7 +443,7 @@ static void led_work(struct work_struct *work) {int ret;struct blinkm_led *led; -struct blinkm_data *data ; +struct blinkm_data *data;struct blinkm_work *blm_work =work_to_blmwork (work); led = blm_work->blinkm_led;
Signature · 1 line
1.7.10.4
Re: [PATCH 5/5] leds: blinkm: remove unnecessary spaces
Signature · 5 lines
Dipl.-Ing. Jan-Simon Möller [email protected] Am Mittwoch, 26. Februar 2014, 14:16:11 schrieb Jingoo Han:
Quoted 23 lines
Remove unnecessary space in order to fix the following checkpatch issues.
WARNING: space prohibited before semicolon
Signed-off-by Jingoo Han <[email protected]>--- drivers/leds/leds-blinkm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/leds/leds-blinkm.c +1
-1@@ -443,7 +443,7 @@ static void led_work(struct work_struct *work) {int ret;struct blinkm_led *led; -struct blinkm_data *data ; +struct blinkm_data *data;struct blinkm_work *blm_work =work_to_blmwork (work); led = blm_work->blinkm_led;
Bryan Wu
AppliedRe: [PATCH 5/5] leds: blinkm: remove unnecessary spaces
Quoted 2 lines · Jan-Simon Möller
Acked-by Jan-Simon Möller <[email protected]>
Thanks, applied,
-Bryan
Quoted 31 lines
--
Dipl.-Ing.
Jan-Simon Möller[email protected]
Am Mittwoch, 26. Februar 2014, 14:16:11 schrieb Jingoo Han:Quoted 23 lines
Remove unnecessary space in order to fix the following checkpatch issues.
WARNING: space prohibited before semicolon
Signed-off-by Jingoo Han <[email protected]>--- drivers/leds/leds-blinkm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/leds/leds-blinkm.c +1
-1@@ -443,7 +443,7 @@ static void led_work(struct work_struct *work) {int ret;struct blinkm_led *led; -struct blinkm_data *data ; +struct blinkm_data *data;struct blinkm_work *blm_work =work_to_blmwork (work); led = blm_work->blinkm_led;
Quoted 7 lines · Jingoo Han
The
__initdatamarker can be virtually anywhere on the line, EXCEPT right after "struct". The preferred location is before the "=" sign if there is one, or before the trailing ";" otherwise. It also fixes the following chechpatch warning.WARNING:
__initdatashould be placed after nodetect
Good, I merged it.
Thanks, -Bryan
Quoted 22 lines
Signed-off-by Jingoo Han <[email protected]>--- drivers/leds/leds-ss4200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/leds/leds-ss4200.c +1
-2@@ -78,7 +78,7 @@ static int __init ss4200_led_dmi_callback(const struct dmi_system_id *id)return 1 ; } -static bool __initdata nodetect; +static bool nodetect__initdata ;module_param_named (nodetect, nodetect, bool,0 );MODULE_PARM_DESC (nodetect,"Skip DMI-based hardware detection" ); --1.7.10.4