Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1796386pxb; Fri, 5 Feb 2021 01:24:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/YfP01RpmVdiBDGBKv7qB5m1thu3MAL2HD1sUzZLnZ4ub9j9zs+Ys5zJKrcGcKhCPTESA X-Received: by 2002:a17:906:1796:: with SMTP id t22mr3150921eje.372.1612517098552; Fri, 05 Feb 2021 01:24:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612517098; cv=none; d=google.com; s=arc-20160816; b=yrCaVUwwQhvXH2fY4+gMDqyGw+ZTPV8vNvpCZPjuBTRIkiDiikldqN5jdUbQ1Fk2by RZDsvSvGnI1tALhrEFmdm6lTluXckw05JTP9E5wLdoxIDR5qO4BKavG3Zy/ONlP4IpEG BBy4YANyJ9gebgHYxRUBd5Y9BDKibRTP4t+N5tHx3O79JaquiEOHUeroMfQoVwFbBbb8 jgJC3TYBkZY0GPSHtt5zHrMFC5fIcbjWS9FkLP7ieqq3icWkDZlp9NwXFTYeiNziXdWu BGV2EVb/0jzhcFDz2s/HXjLuij/w4FppusS/qzj4nAxmsZCOjim0D8zbpxV0ghFfD6un VXGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=gbGm8hnWKi6ZCPfDUXylttss44IhgKRpOHGUre9Oxtk=; b=VnfGPN9f3SsNRVn/YmBubSNmIn72DiwjDjiNH2yuoMgOikA47OblNjUHR7uPqbKj+A 36DtNUH/aFwjXNTpRd1IVV5wANUSOE5PJprIL08qTU2rx6vdHt2s1O59C3BuBj/mb3Iy fG9W7pPXEVxTJS4WM/EntLRO7Wo/AJ5aPbBYOmbNKFFZgwNUPgseXJAivYPqX9mBQCjb b8PzQRAUo7izo08rsHeiwWeBe1tzPH5vYYvLfxXYmtA9Fj3xP7+qeqELGhwaHoGM8oJ+ UmamyFPgAxtomT+xDN0YPSH2kCJeR/CL2vNTJOqilVW5Ssb9oRw6g/xsnfLVm+K3Yd+S demg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Iic+OCjo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si4946817ejd.156.2021.02.05.01.24.34; Fri, 05 Feb 2021 01:24:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Iic+OCjo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230273AbhBEJVq (ORCPT + 99 others); Fri, 5 Feb 2021 04:21:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:33620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbhBEJSb (ORCPT ); Fri, 5 Feb 2021 04:18:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 89F7464F46; Fri, 5 Feb 2021 09:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612516670; bh=6EY/hJO5lsOUp1lV62vlliw5zVpXQuMcomOmxe0tenY=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=Iic+OCjomMgcXz+Hem4eVlglBXXf+TRuYLnQuE0bwynBS7Lb5wNeH8wa1vDMbq3kw jy8xf83fkz5Oa0tmJSzjJqXaijLXyxi0m1R10BuL44HFIT9rBEtypFrL/60Ecgv4iA mFrGqG6DXWYr8oz35yG4xxW4Ino79uF5p8Ho5rMtxwSLT5IshZwh93A7OXJ5LI98Hs s7ynDuVMarvJoVzIAM1mw77I+qV3rJ0uNpatBaHdW4f0gShrCsW4JwvvEb3QwXiDiT yZFmUnbEin95mSxmeKKVfZLuBbKmVzXAKTPWhJre6sAuZdQXETYvJFbyMwNws8VYlB UdgQ94gmABzwQ== Date: Fri, 5 Feb 2021 10:17:47 +0100 (CET) From: Jiri Kosina To: Jiapeng Chong cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: wacom: convert sysfs sprintf/snprintf family to sysfs_emit In-Reply-To: <1612253940-19396-1-git-send-email-jiapeng.chong@linux.alibaba.com> Message-ID: References: <1612253940-19396-1-git-send-email-jiapeng.chong@linux.alibaba.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Feb 2021, Jiapeng Chong wrote: > Fix the following coccicheck warning: > > ./drivers/hid/wacom_sys.c:1828:8-16: WARNING: use scnprintf or sprintf. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > drivers/hid/wacom_sys.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c > index aa9e488..8328ef1 100644 > --- a/drivers/hid/wacom_sys.c > +++ b/drivers/hid/wacom_sys.c > @@ -1825,7 +1825,7 @@ static ssize_t wacom_show_speed(struct device *dev, > struct hid_device *hdev = to_hid_device(dev); > struct wacom *wacom = hid_get_drvdata(hdev); > > - return snprintf(buf, PAGE_SIZE, "%i\n", wacom->wacom_wac.bt_high_speed); > + return sysfs_emit(buf, "%i\n", wacom->wacom_wac.bt_high_speed); > } Applied, thanks. -- Jiri Kosina SUSE Labs