Message ID | 202212051943476482106@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2200133wrr; Mon, 5 Dec 2022 03:51:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf6+0Hf93u73G1m0CG1CWqH2GaEvMQ8F2Chkaw7ISlYeC5+r3FVaoyV38snIcioAdJCCXrQ2 X-Received: by 2002:a63:ff20:0:b0:477:a48c:5a7f with SMTP id k32-20020a63ff20000000b00477a48c5a7fmr53292539pgi.62.1670241091738; Mon, 05 Dec 2022 03:51:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670241091; cv=none; d=google.com; s=arc-20160816; b=P30yGkjJjAEccqJXQFZNFBzQK4o2Os3yFKCKYlC8PBReIAHNbm6iVcSYmuN7CXsGbx /X+HmrWyNg31xWsTGX4lWuM9pw/iHN1/F4cR+kk3OkFtaaoO7HwqqWyhGO5PcWTxWpQX BHbcwmbyZvFIlVeotAhyt97bNddY8sBsjv9Et0U1zkdYM134/TI6SU5VB01S4pnwxGd8 1phFzPccuNsO84Ly3x3SUnuCFdxh87LPIUKEUTutdPPjENPml3d9lkWxm/6DA4BmYP5J VF88uHwqBsAI9/0VFhOmUnFn4GBLcXvYe+LWh30Fku6n4mmQk4oI1zHcKu7livVUnGTX HOxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=/JiGGEYeUu5Oj/tW5ABN1im9sxV7K10pbP1xmk07mMU=; b=qLQnny776sWfxiqB03k1ogwCb4m9ulqh856qj7hloo7jF6NQSFLlfzA37gEZLEJUV5 ZmEeQD9RH9z80filj7WxtemFGhi60KooQ8yLIrr/RA0aie02XnPaGNEwxkKopCdOrVff iDiu5mRhi2/SqmQ8T+VWhNapT7f/1+yNQslZsIsBPmA2ZsM6qRvW+drtfKHc9OJhzbgK 8h78y5iHhAZCq2QbHxNcjSgz+Dy/ldgwmoz6Yqwj8Pnyr6Gp4PPhmXmKMzBt5UobWRKG nej7InnHU/5RGfdbucr4moosjNdyOUzTcAmbWIY0yksIuzxAlAYYrxNYa+5M0CIdvsev sH1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a63e855000000b004787836f4b4si10910928pgk.420.2022.12.05.03.51.18; Mon, 05 Dec 2022 03:51:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231132AbiLELoc (ORCPT <rfc822;jaysivo@gmail.com> + 99 others); Mon, 5 Dec 2022 06:44:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbiLELnw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 5 Dec 2022 06:43:52 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65F4CA1A1 for <linux-kernel@vger.kernel.org>; Mon, 5 Dec 2022 03:43:51 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4NQhX55pftz4y0v9; Mon, 5 Dec 2022 19:43:49 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2B5Bhifj079670; Mon, 5 Dec 2022 19:43:45 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Mon, 5 Dec 2022 19:43:47 +0800 (CST) Date: Mon, 5 Dec 2022 19:43:47 +0800 (CST) X-Zmail-TransId: 2af9638dd973592eef03 X-Mailer: Zmail v1.0 Message-ID: <202212051943476482106@zte.com.cn> Mime-Version: 1.0 From: <ye.xingchen@zte.com.cn> To: <broonie@kernel.org> Cc: <shengjiu.wang@gmail.com>, <xiubo.lee@gmail.com>, <festevam@gmail.com>, <nicoleotsuka@gmail.com>, <lgirdwood@gmail.com>, <perex@perex.cz>, <tiwai@suse.com>, <shawnguo@kernel.org>, <s.hauer@pengutronix.de>, <kernel@pengutronix.de>, <linux-imx@nxp.com>, <alsa-devel@alsa-project.org>, <linuxppc-dev@lists.ozlabs.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?q?=5BPATCH=5D_ASoC=3A_imx-audmux=3A_use_sysfs=5Femit=28=29_?= =?utf-8?q?to_instead_of_scnprintf=28=29?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 2B5Bhifj079670 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 638DD975.000 by FangMail milter! X-FangMail-Envelope: 1670240629/4NQhX55pftz4y0v9/638DD975.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/<ye.xingchen@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 638DD975.000/4NQhX55pftz4y0v9 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751374723283068795?= X-GMAIL-MSGID: =?utf-8?q?1751374723283068795?= |
Series |
ASoC: imx-audmux: use sysfs_emit() to instead of scnprintf()
|
|
Commit Message
ye.xingchen@zte.com.cn
Dec. 5, 2022, 11:43 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn> Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> --- sound/soc/fsl/imx-audmux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Mon, 05 Dec 2022 19:43:47 +0800, ye.xingchen@zte.com.cn wrote: > Follow the advice of the Documentation/filesystems/sysfs.rst and show() > should only use sysfs_emit() or sysfs_emit_at() when formatting the > value to be returned to user space. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: imx-audmux: use sysfs_emit() to instead of scnprintf() commit: a39bc7cf8e284653fb6fd9d897f269f4ac80cf52 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index 50b71e5d4589..582f1e2431ee 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -75,8 +75,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, if (!buf) return -ENOMEM; - ret = scnprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n", - pdcr, ptcr); + ret = sysfs_emit(buf, "PDCR: %08x\nPTCR: %08x\n", pdcr, ptcr); if (ptcr & IMX_AUDMUX_V2_PTCR_TFSDIR) ret += scnprintf(buf + ret, PAGE_SIZE - ret,