Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5642520imu; Sat, 1 Dec 2018 23:35:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/XmPRweDKXLYMf00thXpKh44y/4/PW1zC+/oZqFb8W+iqtOJNVUUEUmox/XSH4Q4lI/TlzQ X-Received: by 2002:a17:902:f01:: with SMTP id 1mr11226547ply.143.1543736148326; Sat, 01 Dec 2018 23:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543736148; cv=none; d=google.com; s=arc-20160816; b=m1M3x8c2wdvW5armySbLjDBkh1NDj5MRbLkF6gdtbLYjEwhOhjeLhs7RRM6nQ7hJnt q1hZYFYHZWnTyX8yE/kkaWMByi1neRLbPR1prlSuT3Lfdho30K53h3a85Fp1StUqtUTx /WqBMyZ1nZGBuALUiqFmj+FBQufUTCRwxsexGsyvFnfSwowsK3/7IXEu6Q08aFwFYSsi ThUWu7XmpA+stk4Cf+RUsbBmmVjAvSjOi6c6wPsDnAiKq7LRD3E3obc+CCo3eJIB8w/U 8WoeBxMQHzdl3ZykPZBjlF/DbYt6t+Nn8UhgmqR7iuv0mGJKKOSwW1fIGIWZsGcH43TP JlVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rKJtAFp7xYLl+tunnmHgFhccq0oh1yGFWywmWN3qhJc=; b=whkcrd3QgDKVTs2Xik4v+sJ/UJ99MCvTXryQmSlzMEn1bc2metQf6bXlJuoyb3I4rR eERpR52P2T1atrPqZAGt8vbbUSyk64dDu8uUyiT5SD4xLmk2g734Eg2ldreLNmrSz9RB NhqznYZgYzjMP2UeG0TlnUtezabq2PJRni6SAGvaj2j82DS/vTti7mM9xeEVf0Rlxv71 leDY6f7QIcwZzWTFYWG/E65Q/baE93pxRLSYOijPafvm+Kbze+m8Q/o7qhR4gQ30EDRK aX61Bv4dxc+1xeBBAEh32AmRRlRPrml47TwKE7keRX1UzUZZK563LexcThok2px7JEsa q+0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E2WFka8G; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m187si10696316pfm.51.2018.12.01.23.35.30; Sat, 01 Dec 2018 23:35:48 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E2WFka8G; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725803AbeLBHeQ (ORCPT + 99 others); Sun, 2 Dec 2018 02:34:16 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:32901 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbeLBHeQ (ORCPT ); Sun, 2 Dec 2018 02:34:16 -0500 Received: by mail-it1-f195.google.com with SMTP id m8so5633490itk.0 for ; Sat, 01 Dec 2018 23:34:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rKJtAFp7xYLl+tunnmHgFhccq0oh1yGFWywmWN3qhJc=; b=E2WFka8GKT2Pg4Bo1PgY53T2wrdZIS8QWY2/CFXeNbqQyWwE5op8dZ8qgA9Ii38tg9 F3N87fba+G6gTDQlp7OIOlM8KeSlPh+aV4rP6iecEFknUsyW9oUYU7omFK7dlONGSecd 14sl9gPV7ZpGM/Fb5rRbgMT6frBnvg3ND/61EouIJMSCjOTScgyo7kq+b69CbtOc+Zvu TXQI1U61oLXzGDhWSaCkbsrryngnTNVztkPWzk0IJ5XLLcW3Z64DX3/KElXt5CaWEqLa AE8vKgf1ZE3tf3aVTNU4UOLfYl3HsjQT0JsiakrV7wF7+yZccBcPiQkFraqxxid0GcUK 0tng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rKJtAFp7xYLl+tunnmHgFhccq0oh1yGFWywmWN3qhJc=; b=tIkcZlOdsg2JYWXrFE6vaBDxVoOszaEwmEppFQn6t7JZcQX52TUQe73wH1zB6gk7TD z3wVixmCIF3CHYXyrLUqHpbGSz9xXAgQd6SASgpgJCRH1M9ypP3OBGw1Xa0HD00r3QM5 b3ur/E/5LjnJjYUEBhrxAxARiGyOPEtZ87Ge6xXrfnR9sNqKStb3GqEgzUOk67c1TXYP E/2Mv54uT5WBvSSrdiUaEP7C0ox92hDU+8USPtiL1PBcXMFxzPShTbYs7CKM4GiMVB3l rLUT5YZL5vNjvZmc4zXj923JHPw680pbHBHLvq4yIz3NZp0rXRLkQCsCZhot0NJS6DoA Kfaw== X-Gm-Message-State: AA+aEWZEpN8LDXAnPOS6p4GZBqThzKxvfFf9zcT+p7g4oWSwcc/wXHlw 2V85ICP3Fm6g5xzi2jIUl/tkEgPtbs39cg3K2EA= X-Received: by 2002:a24:7b90:: with SMTP id q138mr4083492itc.37.1543736048120; Sat, 01 Dec 2018 23:34:08 -0800 (PST) MIME-Version: 1.0 References: <20181202015417.9100-1-tiny.windzz@gmail.com> <20181202081832.08de39b2@bbrezillon> In-Reply-To: <20181202081832.08de39b2@bbrezillon> From: Frank Lee Date: Sun, 2 Dec 2018 15:33:45 +0800 Message-ID: Subject: Re: [PATCH v2] mtd: remove DEBUGFS_RO_ATTR() To: boris.brezillon@bootlin.com Cc: robert.jarzmik@free.fr, David Woodhouse , Brian Norris , =?UTF-8?B?TWFyZWsgVmHFoXV0?= , richard@nod.at, miquel.raynal@bootlin.com, Kees Cook , Shreeya Patel , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 2, 2018 at 3:18 PM Boris Brezillon wrote: > > 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()? The third edition has been sent, can you review it? Yours, Yangtao