linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: Jiabing Wan <wanjiabing@vivo.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, kael_w@yeah.net
Subject: Re:Re: [PATCH] libnvdimm.h: Remove duplicate struct declaration
Date: Tue, 20 Apr 2021 09:54:55 +0800 (GMT+08:00)	[thread overview]
Message-ID: <AA2A4wAIDqypc6Mea5E07Kq1.3.1618883695772.Hmail.wanjiabing@vivo.com> (raw)
In-Reply-To: <20210419160411.GG1904484@iweiny-DESK2.sc.intel.com>

 
>On Mon, Apr 19, 2021 at 07:27:25PM +0800, Wan Jiabing wrote:>> struct device is declared at 133rd line.
>> The declaration here is unnecessary. Remove it.
>> 
>> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
>> ---
>>  include/linux/libnvdimm.h | 1 -
>>  1 file changed, 1 deletion(-)
>> 
>> diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h
>> index 01f251b6e36c..89b69e645ac7 100644
>> --- a/include/linux/libnvdimm.h
>> +++ b/include/linux/libnvdimm.h
>> @@ -141,7 +141,6 @@ static inline void __iomem *devm_nvdimm_ioremap(struct device *dev,
>>  
>>  struct nvdimm_bus;
>>  struct module;
>> -struct device;
>>  struct nd_blk_region;
>
>What is the coding style preference for pre-declarations like this?  Should
>they be placed at the top of the file?
>
>The patch is reasonable but if the intent is to declare right before use for
>clarity, both devm_nvdimm_memremap() and nd_blk_region_desc() use struct
>device.  So perhaps this duplicate is on purpose?
>
>Ira

OK, my script just catch this duplicate.
And I will report the duplicate if there is no MACRO dependence.
But I hadn't thought of whether the duplicate is a prompt on purpose.
Sorry.

Thanks for your reply.
Wan Jiabing

>>  struct nd_blk_region_desc {
>>  	int (*enable)(struct nvdimm_bus *nvdimm_bus, struct device *dev);
>> -- 
>> 2.25.1
>> 


_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

  reply	other threads:[~2021-04-20  1:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 11:27 [PATCH] libnvdimm.h: Remove duplicate struct declaration Wan Jiabing
2021-04-19 16:04 ` Ira Weiny
2021-04-20  1:54   ` Jiabing Wan [this message]
2021-04-20 13:39   ` Santosh Sivaraj
2021-04-20 19:32     ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AA2A4wAIDqypc6Mea5E07Kq1.3.1618883695772.Hmail.wanjiabing@vivo.com \
    --to=wanjiabing@vivo.com \
    --cc=ira.weiny@intel.com \
    --cc=kael_w@yeah.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).