Skip to contentSkip to conversation

staging: greybus: minor code style fix

PATCH In review Manikantan Ravichandran 2 participants 2 messages Feb 12, 2021 – Feb 16, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: greybus: minor code style fix

checkpatch warning fix for string split across lines

---
 drivers/staging/greybus/audio_manager_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/audio_manager_sysfs.c +2 -2
index ab882cc49b41..fcd518f9540c 100644
@@ -18,8 +18,8 @@ static ssize_t manager_sysfs_add_store(struct kobject *kobj,
 	struct gb_audio_manager_module_descriptor desc = { {0} };
 
 	int num = sscanf(buf,
-			"name=%" GB_AUDIO_MANAGER_MODULE_NAME_LEN_SSCANF "s "
-			"vid=%d pid=%d intf_id=%d i/p devices=0x%X o/p devices=0x%X",
+			"name=%" GB_AUDIO_MANAGER_MODULE_NAME_LEN_SSCANF
+			"s vid=%d pid=%d intf_id=%d i/p devices=0x%X o/p devices=0x%X",
 			desc.name, &desc.vid, &desc.pid, &desc.intf_id,
 			&desc.ip_devices, &desc.op_devices);
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 3 lines · Manikantan Ravichandran

checkpatch warning fix for string split across lines

I think what you're doing here *looks* reasonable. But the GB_AUDIO_MANAGER_MODULE_NAME_LEN_SSCANF symbol is a (string) numeric value that is associated with the "s" that immediately follows it.

So I don't think your change makes sense, given the meaning of the line you're changing.

Thanks.

-Alex

Quoted 20 lines
---
  drivers/staging/greybus/audio_manager_sysfs.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/audio_manager_sysfs.c +2 -2
index ab882cc49b41..fcd518f9540c 100644
@@ -18,8 +18,8 @@ static ssize_t manager_sysfs_add_store(struct kobject *kobj,
  	struct gb_audio_manager_module_descriptor desc = { {0} };
 
  	int num = sscanf(buf,
-			"name=%" GB_AUDIO_MANAGER_MODULE_NAME_LEN_SSCANF "s "
-			"vid=%d pid=%d intf_id=%d i/p devices=0x%X o/p devices=0x%X",
+			"name=%" GB_AUDIO_MANAGER_MODULE_NAME_LEN_SSCANF
+			"s vid=%d pid=%d intf_id=%d i/p devices=0x%X o/p devices=0x%X",
  			desc.name, &desc.vid, &desc.pid, &desc.intf_id,
  			&desc.ip_devices, &desc.op_devices);