Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Linux-Kernel Archive: [PATCH] perf/x86/core: Replace snprintf() with sysfs_emit() [PATCH] perf/x86/core: Replace snprintf() with sysfs_emit() From: Jiapeng Chong Date: Fri Jun 17 2022 - 00:12:28 EST Next message: kernel test robot: "Re: [v1] arm64: dts: rk3399: i2s: switch BCLK to GPIO" Previous message: Liang He: "[PATCH] mips: ralink: Fix refcount leak in of.c" Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] coccicheck complains about the use of snprintf() in sysfs show functions. ./arch/x86/events/core.c:2627:8-16: WARNING: use scnprintf or sprintf. Signed-off-by: Jiapeng Chong --- arch/x86/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index f969410d0c90..7a1a42768122 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -2624,7 +2624,7 @@ static ssize_t max_precise_show(struct device *cdev, struct device_attribute *attr, char *buf) { - return snprintf(buf, PAGE_SIZE, "%d\n", x86_pmu_max_precise()); + return sysfs_emit(buf, "%d\n", x86_pmu_max_precise()); } static DEVICE_ATTR_RO(max_precise); -- 2.20.1.7.g153144c Next message: kernel test robot: "Re: [v1] arm64: dts: rk3399: i2s: switch BCLK to GPIO" Previous message: Liang He: "[PATCH] mips: ralink: Fix refcount leak in of.c" Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]