[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH 1/2] dm-kcopyd: introduce per-module throttle structure



On 06/01/2011 11:48 AM, Ankit Jain wrote:
>> +
>> +#define dm_kcopyd_throttle_declare(name, description)	\
>> +static struct dm_kcopyd_throttle dm_kcopyd_throttle = { 100, 0, 0, 0, 0 }; \
>> +module_param_named(name, dm_kcopyd_throttle.throttle, uint, 0644); \
>> +MODULE_PARM_DESC(name, description)
>> +
> 
> I'm just trying to understand, how is it determined, when to use macros
> with UPPER_CASE_LETTERS and when otherwise. To me, UPPER_CASE_LETTERS
> makes it very clear that I'm using a macro, and since this seems to be
> doing declaration etc also, that would seem helpful. But I don't know
> the general style or reasoning followed in the kernel, hence the question.
> 

According to Documentation/CodingStyle, a macro can be named in lower
case, if it resembles a function, which it doesn't in this case. Um and
maybe name it like DECLARE_.. ?

Thanks,
-- 
Ankit Jain
SUSE Labs


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]