From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0718C433E6 for ; Thu, 4 Feb 2021 08:17:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE43064DF5 for ; Thu, 4 Feb 2021 08:17:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234991AbhBDIRt convert rfc822-to-8bit (ORCPT ); Thu, 4 Feb 2021 03:17:49 -0500 Received: from lithops.sigma-star.at ([195.201.40.130]:42326 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234979AbhBDIRk (ORCPT ); Thu, 4 Feb 2021 03:17:40 -0500 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id EB9156083275; Thu, 4 Feb 2021 09:16:56 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vGAdpr9ywbHg; Thu, 4 Feb 2021 09:16:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id A62D1627AFCA; Thu, 4 Feb 2021 09:16:56 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LfjoeOid8NwN; Thu, 4 Feb 2021 09:16:56 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 862466089E03; Thu, 4 Feb 2021 09:16:56 +0100 (CET) Date: Thu, 4 Feb 2021 09:16:56 +0100 (CET) From: Richard Weinberger To: Miquel Raynal Cc: Jiapeng Chong , Vignesh Raghavendra , linux-mtd , linux-kernel Message-ID: <429874131.360828.1612426616380.JavaMail.zimbra@nod.at> In-Reply-To: <20210204091215.38ca0f99@xps13> References: <1612410921-80984-1-git-send-email-jiapeng.chong@linux.alibaba.com> <20210204091215.38ca0f99@xps13> Subject: Re: [PATCH] mtd: convert sysfs sprintf/snprintf family to sysfs_emit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF78 (Linux)/8.8.12_GA_3809) Thread-Topic: convert sysfs sprintf/snprintf family to sysfs_emit Thread-Index: PU/qtLePlYN2al0TaSfCrYOqoCJsYg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- >> Fix the following coccicheck warning: >> >> ./drivers/mtd/mtdcore.c: WARNING: use scnprintf or sprintf. > > That's not what you do in the below change :) Well, sysfs_emit() is the sysfs equivalent of scnprintf(). But the patch fails to explain *why* it is needed. Thanks, //richard