Skip to contentSkip to conversation

staging: speakup: synth: Fix checkpatch warning

PATCH Superseded Man Choy 2 participants 3 messages Feb 23, 2017 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Man Choy

author
#0 lore raw

PATCH 1/1 staging: speakup: synth: Fix checkpatch warning

---
 drivers/staging/speakup/synth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/synth.c +1 -1
index a61c02b..1cd38e7 100644
@@ -407,7 +407,7 @@ static int do_synth_init(struct spk_synth *in_synth)
 	if (!spk_quiet_boot)
 		synth_printf("%s found\n", synth->long_name);
 	if (synth->attributes.name && sysfs_create_group(speakup_kobj,
-							 &synth->attributes) < 0)
+		&synth->attributes) < 0)
 		return -ENOMEM;
 	synth_flags = synth->flags;
 	wake_up_interruptible_all(&speakup_event);
Signature · 1 line
2.7.4
#1 lore raw

On Thu, 2017-02-23 at 21:15 +0800, Man Choy wrote:
[]

drivers/staging/speakup/synth.c

Quoted 1 line
drivers/staging/speakup/synth.c +0 -0

[]

drivers/staging/speakup/synth.c static int do_synth_init(struct spk_synth *in_synth) · line 410

Quoted 6 lines
drivers/staging/speakup/synth.c +1 -1
@@ -407,7 +407,7 @@ static int do_synth_init(struct spk_synth *in_synth)
 	if (!spk_quiet_boot)
 		synth_printf("%s found\n", synth->long_name);
 	if (synth->attributes.name && sysfs_create_group(speakup_kobj,
-							 &synth->attributes) < 0)
+		&synth->attributes) < 0)

Better would be

	if (synth->attributes.name &&
	    sysfs_create_group(speakup_kobj, &synth->attributes) < 0)
author
#2 lore raw
Quoted 13 lines · Joe Perches

On Thu, 2017-02-23 at 21:15 +0800, Man Choy wrote:
[]

drivers/staging/speakup/synth.c

Quoted 1 line
drivers/staging/speakup/synth.c +0 -0

[]

drivers/staging/speakup/synth.c static int do_synth_init(struct spk_synth *in_synth) · line 410

Quoted 6 lines
drivers/staging/speakup/synth.c +1 -1
@@ -407,7 +407,7 @@ static int do_synth_init(struct spk_synth *in_synth)
      if (!spk_quiet_boot)
              synth_printf("%s found\n", synth->long_name);
      if (synth->attributes.name && sysfs_create_group(speakup_kobj,
-                                                      &synth->attributes) < 0)
+             &synth->attributes) < 0)

Better would be

Quoted 3 lines
        if (synth->attributes.name &&
            sysfs_create_group(speakup_kobj, &synth->attributes) < 0)

Thanks for pointing out. Fixed and sent off PATCH v2.