Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5633746imu; Sat, 1 Dec 2018 23:19:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/VHB2EKmlmR+TSvkmsSWcqtghZMHGXR0oLt/mKfNpG/COvj0V+ME3p3aMQPA384m7epm/Zl X-Received: by 2002:a62:1e87:: with SMTP id e129mr11402488pfe.221.1543735165062; Sat, 01 Dec 2018 23:19:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543735165; cv=none; d=google.com; s=arc-20160816; b=IAdqr24rT3tbNLwpoaJzJ9s/e8cSBI4zXl+EOvHDjp1pJWatDj8ykE1f9VudVqDQTY Hnms+TxjqWUicuUhYx+gaL3FHaNXP0bCXbuaAj01j6yf2T8Umr4blZfMVryogFP1m/7Y JNaomlYNcrT7+XYpFBZO2t6RMbxtoQ8d+58xvBBcUVM+S6BBCdQd1qVWFoi62jD19/PJ EcJ11l6pHoGZZ+o68WpI9ft15QeXVK0jBeebrnlbySLGZVts+wqwqHdLmlT3KSf7Yorm Iu7Vg+rALQQ6Mk0ABlZaGB4FFHQniMzxHZDqRPimkKZb/BLqr+CdVLzcbD1Tn5Ul2XU7 0uvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=5vRlvGz8UcaLRCr1b9RIxSy+Lx7XTP3qrNk8Q6i3oF0=; b=0gbtE2tSG5fwgvYMmfoOPKJkOUFvDTtyPbWDIC7Eyy4UGzBmrfYdSB1aCGF6zHaNuF nJ3HvSVWVYalGEUj7HCb0UgHUA3Tkj41mav7Nz4U7+Mx29iUqKmPIfBNbYCw9wroCuk2 AWANii1L3vz3N4G4quX5jf3pBRvQK/LxkDBiamNrMkEZKKRtaYlKuAbkB4HXdspaOLG4 LYKXbpVSmxqwP0qn3hAb/1lcv7QmCmcmgFY1TosyifMsGWCoj8pQD5xdAwsUX+sEgU5F w700HEBYAJgGsmZcZFCbVdazYw310St+SQfm9vqZWUb4I6fGaWNXZl0WzFxNtmBcc/+a GJFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f28si10422480pff.131.2018.12.01.23.19.10; Sat, 01 Dec 2018 23:19:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725770AbeLBHSi (ORCPT + 99 others); Sun, 2 Dec 2018 02:18:38 -0500 Received: from mail.bootlin.com ([62.4.15.54]:57750 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbeLBHSi (ORCPT ); Sun, 2 Dec 2018 02:18:38 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id D99B3207B0; Sun, 2 Dec 2018 08:18:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 97F2E206D8; Sun, 2 Dec 2018 08:18:33 +0100 (CET) Date: Sun, 2 Dec 2018 08:18:32 +0100 From: Boris Brezillon To: Yangtao Li Cc: robert.jarzmik@free.fr, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, richard@nod.at, miquel.raynal@bootlin.com, keescook@chromium.org, shreeya.patel23498@gmail.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mtd: remove DEBUGFS_RO_ATTR() Message-ID: <20181202081832.08de39b2@bbrezillon> In-Reply-To: <20181202015417.9100-1-tiny.windzz@gmail.com> References: <20181202015417.9100-1-tiny.windzz@gmail.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 1 Dec 2018 20:54:17 -0500 Yangtao Li wrote: > We already have the DEFINE_SHOW_ATTRIBUTE.There is no need to define > such a macro,so remove DEBUGFS_RO_ATTR.Also use DEFINE_SHOW_ATTRIBUTE > to simplify some code. > > Signed-off-by: Yangtao Li > --- > Changes in v2: > -Remove a missing DEBUGFS_RO_ATTR > --- > drivers/mtd/devices/docg3.c | 20 ++++++++++++-------- > drivers/mtd/devices/docg3.h | 11 ----------- > drivers/mtd/mtdswap.c | 12 +----------- > drivers/mtd/nand/raw/nandsim.c | 16 +++------------- > 4 files changed, 16 insertions(+), 43 deletions(-) > > diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c > index 512bd4c2eec0..80143972963e 100644 > --- a/drivers/mtd/devices/docg3.c > +++ b/drivers/mtd/devices/docg3.c > @@ -1603,7 +1603,7 @@ static void doc_unregister_sysfs(struct platform_device *pdev, > /* > * Debug sysfs entries > */ > -static int dbg_flashctrl_show(struct seq_file *s, void *p) > +static int flashcontrol_show(struct seq_file *s, void *p) > { > struct docg3 *docg3 = (struct docg3 *)s->private; > > @@ -1623,9 +1623,10 @@ static int dbg_flashctrl_show(struct seq_file *s, void *p) > > return 0; > } > -DEBUGFS_RO_ATTR(flashcontrol, dbg_flashctrl_show); > > -static int dbg_asicmode_show(struct seq_file *s, void *p) > +DEFINE_SHOW_ATTRIBUTE(flashcontrol); Just nitpicking, but can you remove the blank line between the function definition and DEFINE_SHOW_ATTRIBUTE()?