Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1520277pxb; Thu, 4 Feb 2021 15:31:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwXqiQFQXVQ6uBzaHrlzgh6ZP0TXpXGwJAG+wML5qtC3cdL4AGifqieyQCyj/gr93G/n4O X-Received: by 2002:a05:6402:c9:: with SMTP id i9mr906054edu.123.1612481514359; Thu, 04 Feb 2021 15:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612481514; cv=none; d=google.com; s=arc-20160816; b=NxqRy7eKQVlAsgbiU2kJX43I3pk8ojc8At5CrTTiTjLtZL44QNQkHLnf/qY28Pi7BA Jt7yKNyzTyibc+uvqSjySehyJ4uFJ+MyWwMMLkm2gxpuv/+gGSHFAWbLk5QuKZCZij+F kC7q71xFY3Y5gNiXzEmYLaKbvVEgK2KFzIW545E82aKNhMQ1TkyiCdMdxKdC10v+kp3r LXREZuMVm3oRp1HV+naxByhIjBUziT4JvAzUDDgFKxBulBLck2gUSu+jfM1KuQTq0/BE 0abp8wlbzn0YuZJsUFmqlM/uxaob1NWIqIt9CRiLFKR9P84KvPrG060YQHoSHQuH1qFC O0Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=13drYw2K9HSaMd2uVjnm3kVYCWdsZn7Ew8YZFj/ohA4=; b=03jMzASMKxzytuiJGzFvcstfE8tzsM7Q5WEA4DkJyRxSbwB6Hk3DJ7X5BgTNMMJkJ0 CuCMnHKByGn5WLbEilVnEFkeI8pW/E3pWmBOMBArP6W8MayFWfDGkRbnVt0Me767ZIK5 FWqzO2s9EwCH+TN0QS0mbP1o/u6gMl/EXQ4sNFK2rGTkyzJDVsM8XfJQCfFoRc09CM+4 Uk2Hor28FR0OSnfiwaL0+H4V42RJL6cUKleM4FiovpnMq1g7TLMJwsuKdY103GcYJIi7 QYvJ/zbk8aQ8DPjT5+XHKxn0zHXit3Qmz72XdA3xZnOaYe2hrSO5X2IygDSb4OCa5lP+ cWTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si4222928eds.288.2021.02.04.15.31.29; Thu, 04 Feb 2021 15:31:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234984AbhBDIRq convert rfc822-to-8bit (ORCPT + 99 others); Thu, 4 Feb 2021 03:17:46 -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