Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5528125rwi; Mon, 17 Oct 2022 23:45:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6KsYa5dDGorXqHiESrcmiH7Wg1EnbS+cYiHmp31CTTzTwxPzohKQBZxGtDJHS31+puRQY1 X-Received: by 2002:a17:906:cc52:b0:78d:d477:5b7f with SMTP id mm18-20020a170906cc5200b0078dd4775b7fmr1163585ejb.558.1666075534164; Mon, 17 Oct 2022 23:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666075534; cv=none; d=google.com; s=arc-20160816; b=A5Tmzq8paCTmkVzhRR0lu2l9P/ajVgLc1+ErSp4oNEKWc8iDYHPtjyXKAqHFkClAdb kV2G8P+jltzklpyPwMI6HdMiyXR815blm5hIiIfgbHGI33yJN+OkfLVotlNtiq3pEOAf VpJSPRGmwdIBLY3yB8QZBcU8Ldoerq2c8oZ6D7o/qFPuh44rZPo2tiHO+QFjBeQLHu/u v/tK9JIk+T+dz+EZsrN2sDHtMSTsM+NSg79++FbJae9brfypdacTU1MZmTOZT0xH+eCi 4KDEQXV2HtSymMai54ha6e4Ufpu+DNjcZoo895tjV8w5+FItpD35FsWn795CwH8E5d/3 O1AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MYvjR3g96YfEQ0ewsYWqZk7cyUEKObEBSCZcF/olNgQ=; b=qCzkcMwY0GxZslwEl1L7bJdVvMcizfX06RaRSVEcB533qpE1jjgVMaCKvZ4fwkSIvD RrKswsLdI9C/x491opqSCjT0tSUi0mO5uFM1/sV0xkAGI2gHKoePIsbR/ZFY1q5gX5tS MM+xhTaIrn9rMG2H0xWnW1g3t3PjHvoT/ACQ/n5HSltabRVLm1rXVr6RPkabo7IE9T/1 1XUvYdsl+X/FNPKGT1qyPjVsEkLH0gxUQPX2s0gb+TGFy2ocCQ6/x+IOc3mPh/8F2zIQ ZYK6At6jet9mFIsrte0b23Atvzga1gnwww6WxljM6TrCB+I/V8yprRsxy5NssZn6S8/9 qPQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DJLHQ5hf; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a17090658c800b00781dbee4273si5913827ejs.514.2022.10.17.23.45.08; Mon, 17 Oct 2022 23:45:34 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DJLHQ5hf; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbiJRG0I (ORCPT + 99 others); Tue, 18 Oct 2022 02:26:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230206AbiJRG0G (ORCPT ); Tue, 18 Oct 2022 02:26:06 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07A1DA7AAC; Mon, 17 Oct 2022 23:25:53 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id s196so11180999pgs.3; Mon, 17 Oct 2022 23:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MYvjR3g96YfEQ0ewsYWqZk7cyUEKObEBSCZcF/olNgQ=; b=DJLHQ5hfoAbDCUNbz0QZQvIogzuJKKKs24q4fILB7q7h0ZaMw970yKPRmeUtBvpUoD cSdviupKi4vP4ua+AyO6cNjaCX44UQW1s4PSAs4EK7VQkOB+DHADafwt+7JfULanDNgi nZbcNbmTATpmC7WgFetn4OMXYzflslEOgGaWnCTdKiY+SiUxAsOTDKkPdQdXfVNlk2Xr GbuVEF/YffIhOVmW7qKRsfiRovt/BoG+4mfTLqPAR0jAdyebNPEl6ThMtryCYXkb/G1f 7gdXX3cL7chK301bGbHfEBlV/5dSWVQgaSXncF0AnjwO9VmTVFg5oBqfa3rcHMJF7n+c zyFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MYvjR3g96YfEQ0ewsYWqZk7cyUEKObEBSCZcF/olNgQ=; b=qZiLPVmoacGqc0/Dp/PmyIKOZ2+Z/0UrSxzB/r+5sT79tdp99lFSRQbe2Ms7YRXdnU OfDYmdPAfxd9Aov6BF92jX6CoZPyhnqoJDQ0Gt/vPm7lgBLLhye8PiL+faTnzsMqVfNZ 9Q7wwdiWi2jb25+LKOFcAo1cLxirLUDG/R2wyXPb3juHa+FE5LazXE5pMTh81U9RMBwa r9Aqg5t2urQ4eJa+YvAmjH2IY1TLh0sZqhc2kL9XN4SexxnXbr047sTkmdgdpg7O/7y8 HBA6g07wl4aSdIevce+rvjACeMDuBjmwGyVK9BAkadCCOPHePlIm/5HlRJ0/Yqj63ZO/ mztw== X-Gm-Message-State: ACrzQf0fbuIKoM1g/T9u8WpbaKtMxQ7k+jKXQjT/PfzkqUWWduKKkDkS YUtm951lIM5moLZhCjKR4rD/kUdcv4Q= X-Received: by 2002:a05:6a00:807:b0:563:136f:a4fe with SMTP id m7-20020a056a00080700b00563136fa4femr1658881pfk.36.1666074352645; Mon, 17 Oct 2022 23:25:52 -0700 (PDT) Received: from carlis-virtual-machine.localdomain ([156.236.96.164]) by smtp.gmail.com with ESMTPSA id p1-20020a1709027ec100b00172973d3cd9sm7672413plb.55.2022.10.17.23.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 23:25:52 -0700 (PDT) From: Xuezhi Zhang To: deller@gmx.de, zhangxuezhi1@coolpad.com, wsa+renesas@sang-engineering.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: sm501fb: onvert sysfs snprintf to sysfs_emit Date: Tue, 18 Oct 2022 14:25:48 +0800 Message-Id: <20221018062548.642910-1-zhangxuezhi3@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Xuezhi Zhang 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: Xuezhi Zhang --- drivers/video/fbdev/sm501fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c index fce6cfbadfd6..f743bfbde2a6 100644 --- a/drivers/video/fbdev/sm501fb.c +++ b/drivers/video/fbdev/sm501fb.c @@ -1166,7 +1166,7 @@ static ssize_t sm501fb_crtsrc_show(struct device *dev, ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL); ctrl &= SM501_DC_CRT_CONTROL_SEL; - return snprintf(buf, PAGE_SIZE, "%s\n", ctrl ? "crt" : "panel"); + return sysfs_emit(buf, "%s\n", ctrl ? "crt" : "panel"); } /* sm501fb_crtsrc_show -- 2.25.1