From patchwork Thu Jul 13 09:29:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hanyu001@208suo.com X-Patchwork-Id: 1808594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="unknown key version" header.d=208.org header.i=@208.org header.a=rsa-sha256 header.s=dkim header.b=MQppogzM; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R4FKJ2PpFz20Ct for ; Mon, 17 Jul 2023 18:16:20 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="unknown key version" header.d=208.org header.i=@208.org header.a=rsa-sha256 header.s=dkim header.b=MQppogzM; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4R4FKJ1MXqz2yF8 for ; Mon, 17 Jul 2023 18:16:20 +1000 (AEST) X-Original-To: linux-fsi@lists.ozlabs.org Delivered-To: linux-fsi@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="unknown key version" header.d=208.org header.i=@208.org header.a=rsa-sha256 header.s=dkim header.b=MQppogzM; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=208suo.com (client-ip=183.242.55.162; helo=mail.208.org; envelope-from=hanyu001@208suo.com; receiver=lists.ozlabs.org) X-Greylist: delayed 415 seconds by postgrey-1.37 at boromir; Thu, 13 Jul 2023 19:36:35 AEST Received: from mail.208.org (unknown [183.242.55.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4R1qHl6zlQz3brg for ; Thu, 13 Jul 2023 19:36:35 +1000 (AEST) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4R1q7Q3Gl8zBRSVQ for ; Thu, 13 Jul 2023 17:29:22 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1689240562; x=1691832563; bh=QsDmrnrnsJCaJIX1Vc4ktSVE/rk ZqqgmvJQSwWR2qzE=; b=MQppogzMFWS0hnCB2BETozoyORTSrm8cdmmS5P6xdSI FcK8jQCHPfmidP/nBqT0AeMJlIpzKhGb4z/sslYx+ZnUxUDTwt3cHEmQh9mLE2kP sQkxY5fIVVbv+2RvUgO/ZUzUiH4B5/p+53CmNxncleAs2dZ0LOEuiVH43YWRv9FZ /R6mMYRKn1gLdpEosRDJAzOfGviLKg+ndebqzsiFQ699vH0Alcxrmtk7Yhh/9CAt gI5k7zJFXdQtJ4bCJjVm/8+H2ELo4xhqKqZ6Lz31DzclZs92SPqKozZsNurcZ8I8 vj/wEraoqSgAN9smimgb1q6a9YMc9mLWK58Uq/jNlkQ== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tjLNy171qKxg for ; Thu, 13 Jul 2023 17:29:22 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4R1q7P68pKzBHXh8; Thu, 13 Jul 2023 17:29:21 +0800 (CST) MIME-Version: 1.0 Date: Thu, 13 Jul 2023 17:29:21 +0800 From: hanyu001@208suo.com To: jk@ozlabs.org, joel@jms.id.au, alistair@popple.id.au, eajames@linux.ibm.com Subject: Fwd: [PATCH] fsi: Replace snprintf in show functions with sysfs_emit In-Reply-To: References: User-Agent: Roundcube Webmail Message-ID: <14c7e158390db531969e7520710d5fab@208suo.com> X-Sender: hanyu001@208suo.com X-Mailman-Approved-At: Mon, 17 Jul 2023 18:11:50 +1000 X-BeenThere: linux-fsi@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-fsi@lists.ozlabs.org Errors-To: linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "linux-fsi" Fix the following coccicheck warning: drivers/macintosh/ams/ams-core.c:53: WARNING: use scnprintf or sprintf. ./drivers/fsi/fsi-master-gpio.c:721:8-16: WARNING: use scnprintf or sprintf Signed-off-by: ztt <1549089851@qq.com> --- drivers/fsi/fsi-master-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c index 7d5f29b4b595..75499365729f 100644 --- a/drivers/fsi/fsi-master-gpio.c +++ b/drivers/fsi/fsi-master-gpio.c @@ -718,7 +718,7 @@ static ssize_t external_mode_show(struct device *dev, { struct fsi_master_gpio *master = dev_get_drvdata(dev); - return snprintf(buf, PAGE_SIZE - 1, "%u\n", + return scnprintf(buf, PAGE_SIZE - 1, "%u\n", master->external_mode ? 1 : 0); }