Skip to content

Commit

Permalink
soc: hisilicon: kunpeng_hccs: Fix incorrect string assembly
Browse files Browse the repository at this point in the history
String assembly should use sysfs_emit_at() instead of sysfs_emit().

Fixes: 23fe811 ("soc: hisilicon: kunpeng_hccs: Add used HCCS types sysfs")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Link: https://lore.kernel.org/r/20250314100143.3377268-1-lihuisong@huawei.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Huisong Li authored and Arnd Bergmann committed Mar 14, 2025
1 parent cfe614f commit 262666c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/soc/hisilicon/kunpeng_hccs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,8 +1539,8 @@ static ssize_t used_types_show(struct kobject *kobj,
u16 i;

for (i = 0; i < hdev->used_type_num - 1; i++)
len += sysfs_emit(&buf[len], "%s ", hdev->type_name_maps[i].name);
len += sysfs_emit(&buf[len], "%s\n", hdev->type_name_maps[i].name);
len += sysfs_emit_at(buf, len, "%s ", hdev->type_name_maps[i].name);
len += sysfs_emit_at(buf, len, "%s\n", hdev->type_name_maps[i].name);

return len;
}
Expand Down

0 comments on commit 262666c

Please sign in to comment.