/openbmc/linux/drivers/hwmon/pmbus/ |
H A D | inspur-ipsps.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | pmbus_core.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
/openbmc/linux/drivers/hwmon/occ/ |
H A D | sysfs.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | common.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
/openbmc/linux/drivers/hwmon/ |
H A D | vexpress-hwmon.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ltc4260.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ltc2990.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ltc4222.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ltc2945.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | stts751.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ina209.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | xgene-hwmon.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ltc4151.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ltc4215.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ltc4261.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | sch5636.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | lineage-pem.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | sch5627.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | max16065.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ina3221.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | ina2xx.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
H A D | applesmc.c | diff 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Sun Mar 21 22:49:10 CDT 2021 Guenter Roeck <linux@roeck-us.net> hwmon: replace snprintf in show functions with sysfs_emit
coccicheck complains about the use of snprintf() in sysfs show functions.
drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf
This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense.
@depends on patch@ identifier show, dev, attr, buf; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
@depends on patch@ identifier show, dev, attr, buf, rc; @@
ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> }
While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch.
Cc: Zihao Tang <tangzihao1@hisilicon.com> Cc: Jay Fang <f.fangjian@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|