scsi: ses: Fix space before '[' and remove error check
cover scsi: ses: Fix space before '[' and remove error check
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.
It is not necessary to check return value of class_register. enclosure_init returns both successful and error value.
Arvind Yadav (2):
[PATCH 1/2] scsi: ses: Fix space before '[' error. [PATCH 2/2] scsi: ses: Remove unnecessary error check
drivers/misc/enclosure.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 scsi: ses: Fix space before '[' error.
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.
--- drivers/misc/enclosure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/enclosure.c +2 -2
@@ -468,7 +468,7 @@ static struct class enclosure_class = { .dev_groups = enclosure_class_groups, }; -static const char *const enclosure_status [] = { +static const char *const enclosure_status[] = { [ENCLOSURE_STATUS_UNSUPPORTED ] ="unsupported" , [ENCLOSURE_STATUS_OK ] ="OK" , [ENCLOSURE_STATUS_CRITICAL ] ="critical" ,
@@ -480,7 +480,7 @@ static const char *const enclosure_status [] = { [ENCLOSURE_STATUS_MAX] = NULL, }; -static const char *const enclosure_type [] = { +static const char *const enclosure_type[] = { [ENCLOSURE_COMPONENT_DEVICE ] ="device" , [ENCLOSURE_COMPONENT_ARRAY_DEVICE ] ="array device" , };
Signature · 1 line
2.7.4
Greg KH
maintainerRe: [PATCH 1/2] scsi: ses: Fix space before '[' error.
Quoted 7 lines · Arvind Yadav
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.Signed-off-by Arvind Yadav <[email protected]>--- drivers/misc/enclosure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Your subject does not show the correct subsystem/driver :(
PATCH 2/2 scsi: ses: Remove unnecessary error check
In reply to Arvind YadavIt is not necessary to check return value of class_register. enclosure_init returns both successful and error value.
--- drivers/misc/enclosure.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/misc/enclosure.c +1 -7
@@ -680,13 +680,7 @@ ATTRIBUTE_GROUPS(enclosure_component);static int __init enclosure_init (void ) { -int err; - - err =class_register (&enclosure_class); -if (err) -return err; - -return 0 ; +return class_register (&enclosure_class); } static void __exit enclosure_exit(void)
Signature · 1 line
2.7.4
Greg KH
maintainerRe: [PATCH 2/2] scsi: ses: Remove unnecessary error check
Quoted 7 lines · Arvind Yadav
It is not necessary to check return value of
class_register.enclosure_initreturns both successful and error value.Signed-off-by Arvind Yadav <[email protected]>--- drivers/misc/enclosure.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
Same subject error here :(