Re: [PATCH] staging: greybus: minor code style fix

From: Alex Elder
Date: Tue Feb 16 2021 - 10:33:44 EST


On 2/12/21 4:50 PM, Manikantan Ravichandran wrote:
checkpatch warning fix for string split across lines

Signed-off-by: Manikantan Ravichandran <ravman1991@xxxxxxxxx>

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

---
drivers/staging/greybus/audio_manager_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/audio_manager_sysfs.c b/drivers/staging/greybus/audio_manager_sysfs.c
index ab882cc49b41..fcd518f9540c 100644
--- a/drivers/staging/greybus/audio_manager_sysfs.c
+++ b/drivers/staging/greybus/audio_manager_sysfs.c
@@ -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);