linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] bcache: add undef for macro in function
@ 2018-08-14  8:16 Dongbo Cao
  2018-08-14 12:16 ` Coly Li
  0 siblings, 1 reply; 3+ messages in thread
From: Dongbo Cao @ 2018-08-14  8:16 UTC (permalink / raw)
  To: colyli; +Cc: kent.overstreet, linux-bcache, linux-kernel, Dongbo Cao

add undef for macro d_strtoul,d_strtoul_nonzero and d_strtoi_h

Signed-off-by: Dongbo Cao <cdbdyx@163.com>
---
 drivers/md/bcache/sysfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index 225b15aa..ed67a290 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -349,6 +349,9 @@ STORE(__cached_dev)
 	if (attr == &sysfs_stop)
 		bcache_device_stop(&dc->disk);
 
+#undef d_strtoul
+#undef d_strtoul_nonzero
+#undef d_strtoi_h
 	return size;
 }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] bcache: add undef for macro in function
  2018-08-14  8:16 [PATCH 2/2] bcache: add undef for macro in function Dongbo Cao
@ 2018-08-14 12:16 ` Coly Li
  0 siblings, 0 replies; 3+ messages in thread
From: Coly Li @ 2018-08-14 12:16 UTC (permalink / raw)
  To: Dongbo Cao; +Cc: kent.overstreet, linux-bcache, linux-kernel

On 2018/8/14 4:16 PM, Dongbo Cao wrote:
> add undef for macro d_strtoul,d_strtoul_nonzero and d_strtoi_h
> 
> Signed-off-by: Dongbo Cao <cdbdyx@163.com>
> ---
>  drivers/md/bcache/sysfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
> index 225b15aa..ed67a290 100644
> --- a/drivers/md/bcache/sysfs.c
> +++ b/drivers/md/bcache/sysfs.c
> @@ -349,6 +349,9 @@ STORE(__cached_dev)
>  	if (attr == &sysfs_stop)
>  		bcache_device_stop(&dc->disk);
>  
> +#undef d_strtoul
> +#undef d_strtoul_nonzero
> +#undef d_strtoi_h
>  	return size;
>  }
>  
> 

Hi Dongbo,

Could you please to provide the motivation why you make this change ?

Thanks.

Coly Li

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] bcache: add undef for macro in function
@ 2018-08-14 16:25 Coly Li
  0 siblings, 0 replies; 3+ messages in thread
From: Coly Li @ 2018-08-14 16:25 UTC (permalink / raw)
  To: cdbdyx; +Cc: linux-kernel, linux-bcache, kent.overstreet

On 2018/8/14 10:59 PM, cdbdyx@163.com wrote:
> Hi Coly,
> The three macros is only locally used in func "__cached_dev",I think
> they should be undefined before leaving the func.
> 

Hi Dongbo,

It is worthy to do this if there is a potential conflict. But they are
defined in sysfs.c and not exported to anywhere else, I guess there
won't be any symbol conflict. Then we don't need to worry about this.

Coly Li


> ---Original---
> *From:* "Coly Li"<colyli@suse.de>
> *Date:* Tue, Aug 14, 2018 20:16 PM
> *To:* "Dongbo Cao"<cdbdyx@163.com>;
> *Cc:*
> "linux-kernel"<linux-kernel@vger.kernel.org>;"linux-bcache"<linux-bcache@vger.kernel.org>;"kent.overstreet"<kent.overstreet@gmail.com>;
> *Subject:* Re: [PATCH 2/2] bcache: add undef for macro in function
> 
> On 2018/8/14 4:16 PM, Dongbo Cao wrote:
>> add undef for macro d_strtoul,d_strtoul_nonzero and d_strtoi_h
>> 
>> Signed-off-by: Dongbo Cao 
>> ---
>>  drivers/md/bcache/sysfs.c | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
>> index 225b15aa..ed67a290 100644
>> --- a/drivers/md/bcache/sysfs.c
>> +++ b/drivers/md/bcache/sysfs.c
>> @@ -349,6 +349,9 @@ STORE(__cached_dev)
>>   if (attr == &sysfs_stop)
>>   bcache_device_stop(&dc->disk);
>>  
>> +#undef d_strtoul
>> +#undef d_strtoul_nonzero
>> +#undef d_strtoi_h
>>   return size;
>>  }
>>  
>> 
> 
> Hi Dongbo,
> 
> Could you please to provide the motivation why you make this change ?
> 
> Thanks.
> 
> Coly Li


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-14 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-14  8:16 [PATCH 2/2] bcache: add undef for macro in function Dongbo Cao
2018-08-14 12:16 ` Coly Li
2018-08-14 16:25 Coly Li

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).