Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5670250rwi; Tue, 18 Oct 2022 02:24:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7H9SX/CrXq1Omgsy/RYtdSjkduLnHFDnJ7koKaQVMr4BVVNRbDB8aT1kNFnCqlVxTANgZ8 X-Received: by 2002:a17:902:dacf:b0:186:1269:9292 with SMTP id q15-20020a170902dacf00b0018612699292mr2210022plx.129.1666085065249; Tue, 18 Oct 2022 02:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666085065; cv=none; d=google.com; s=arc-20160816; b=wdPSb+nWPU/dQNYQZhlkhxNeB+HFhIBNgAvePYMz9nV1xx8qzscGhHPlJLrAogMR7J HYdvsYRnCagMVCc8cHm6gzrgrgb7Kfd9sLh0BFd6haEZMM8ADRZG6mtvHBQMvLkw/inK 9HcMaydm9BNkV7idPFh63t6Pk7/U+UXBOPRpGRaWsfM29kpeacp1H7Rt68xxcQfMY8Va exhya5xzFWvBtx2ZGMNwi7ByqRoxytODQbDtFn24lfpD9bRemo/LnCiHpGI2WU0bOxTI kgXqxAjqQLuqitRMZ2Pntrragw9QIn/Zy+G4+AvAfzUfLHdQLcv82kVBj6dokOHU+g+7 P0PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7FXPEQKGLv/eG3Snq+Q1fzIt7NIEEEgU1s7uSGTTygA=; b=PuLLTTnog480QBkaY95Up+sbnmikQqfRI7EZKNDxnnYOEININp9QnjRu5pzWJia0p4 xQ2am7nD4caQUBJgzpQMAi18QNxnjFR9YNq8zM+4FFslwOs9MBzu4i7O7/z8kwQTzXdU eobZQNSbBWrpUR6X7uCT2z1N4l64g7TFh8vmu+PUeI80CJbRjhih3UcgOjdyF2o9Q0kF OSWSQHzGapcgTEy5qySQDDZcTGik4/+AQ9TkA2wCGnF42+WCCEIE/i24qmRWGie7j9ur s4CQ3xfVNEn0jIEG+iq/yvt951a3Q0jcmcMMGT7enBuBYWfnEqRs0TapVpOo4+b0csjo do3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=CxwOQ13Y; 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=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v71-20020a63894a000000b00455074c7901si30860pgd.36.2022.10.18.02.24.12; Tue, 18 Oct 2022 02:24:25 -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=@gmx.net header.s=badeba3b8450 header.b=CxwOQ13Y; 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=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230526AbiJRIac (ORCPT + 99 others); Tue, 18 Oct 2022 04:30:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231132AbiJRIaQ (ORCPT ); Tue, 18 Oct 2022 04:30:16 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0E661EE; Tue, 18 Oct 2022 01:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1666081760; bh=fm0i1uQ9j+xRDrJ/tsIQ4TxqAKdNzMgiZeV5uu2HHwA=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=CxwOQ13YqH/3cIQF142Ivdr7bP/7NuVsy8zBQ67GBUh8KpmxaXbDZhJ6yvePF5jRq AQklIUsK06n0OCKxPi4E3bUhKcllh+CqlBaGBt2hCM4OXE2qfCjFqqLfiH8H7yZMmv LlKOD2EoSvVardJk+BgGfX/FFc9k/M+1/AnL9KWE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.20.60] ([92.116.165.172]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MqaxU-1pXE0l3U9Y-00mZ4G; Tue, 18 Oct 2022 10:29:19 +0200 Message-ID: <9e63badf-fe0f-b341-a9be-12455ad98bcb@gmx.de> Date: Tue, 18 Oct 2022 10:29:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] fbdev: gbefb: convert sysfs snprintf to sysfs_emit Content-Language: en-US To: Xuezhi Zhang , zhangxuezhi1@coolpad.com, jiasheng@iscas.ac.cn Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20221018075118.922212-1-zhangxuezhi3@gmail.com> From: Helge Deller In-Reply-To: <20221018075118.922212-1-zhangxuezhi3@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ltNSdhYqtVEwKKEty5sa/d6o5jrNblDt1wfRzuwkNoXVsLM3XlZ /ne/TgIZZjA3PT/nMtHgWd9vArSx4Di/OFyBn6ftpGLieeIKRT+IWmCx2833MRAXdVzWAaW vrzJ1jkJ13IHQvaT3eaZfzxfyG7n7igMZDHaik667YRNrCkAXIt/Nsld3eITxT2dPpOXUeL i8hg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Dzt27vRIbNKUg88kKw/s04tCJ 05h9nvY6rWXRBI4j80aox3irXHkiQpRZaVXHaSRvIoNkl5afmBonzAPLhXRzZAUJcfByPehV8 3gG4dpUL+1PzZ71ebnPYAMz+yIJn9IhU5jiN5gKd2bsxCbYnLdNDZoLPwcxlJvdvUGFFt9my/ VQZQvtxHApuqvVKl7bDUwXWaYR6uQ6gZFBHF6cbFc1boeyrSzPbemUM7uBaXOB5G9UYIzZA1+ 9jXo+8nPewIWtDjOjYAdpJ825CJtH0Nk9INwgg9t1zB1Rv4+kEO65l5QwBfEGXeFc5O2MlTTV qAKUoucAJt63qNpjWoHFg7vaJPA8LtXZ9LIcKcKAo0DcMh94uFxz5tDcLBBlYLWty4raRLxzZ xnD62xTvFKp5UXurD50KDWrJpWp56Gh+TLzbVu8+FEFZ/SeNC8BdtD19AYyzH0VMnRiP2GQBW ld/MpUL3PhfHEjkF+oW9bg2E2bSKxy/uZahoVvAR4H2YJQhKGa63MnrznLwcT/H6vxTaU3YRk AWDUsaumSXxV0Qlico+t48Klua2mOYms2ZVNuFqIakyhS X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 On 10/18/22 09:51, Xuezhi Zhang wrote: > 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 applied. Thanks! Helge > --- > drivers/video/fbdev/gbefb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c > index 1582c718329c..000b4aa44241 100644 > --- a/drivers/video/fbdev/gbefb.c > +++ b/drivers/video/fbdev/gbefb.c > @@ -1060,14 +1060,14 @@ static const struct fb_ops gbefb_ops =3D { > > static ssize_t gbefb_show_memsize(struct device *dev, struct device_at= tribute *attr, char *buf) > { > - return snprintf(buf, PAGE_SIZE, "%u\n", gbe_mem_size); > + return sysfs_emit(buf, "%u\n", gbe_mem_size); > } > > static DEVICE_ATTR(size, S_IRUGO, gbefb_show_memsize, NULL); > > static ssize_t gbefb_show_rev(struct device *device, struct device_att= ribute *attr, char *buf) > { > - return snprintf(buf, PAGE_SIZE, "%d\n", gbe_revision); > + return sysfs_emit(buf, "%d\n", gbe_revision); > } > > static DEVICE_ATTR(revision, S_IRUGO, gbefb_show_rev, NULL);