Re: [PATCH] drivers: scsi: scsi_lib.c: add prefix "SCSILIB_" to macro "SP"

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

 



On 12/02/2013 12:17 AM, Bart Van Assche wrote:
> On 11/27/13 03:29, Chen Gang wrote:
>> the macro "SP" is too common to make conflict with some architectures,
>> so recommend to add prefix for it.
>>
>> The related warning (with allmodconfig for hexagon):
>>
>>     CC [M]  drivers/scsi/scsi_lib.o
>>   drivers/scsi/scsi_lib.c:46:0: warning: "SP" redefined [enabled by default]
>>   arch/hexagon/include/uapi/asm/registers.h:9:0: note: this is the location of the previous definition
>>
>>
>> Signed-off-by: Chen Gang <gang.chen.5i5j@xxxxxxxxx>
>> ---
>>  drivers/scsi/scsi_lib.c |   16 ++++++++--------
>>  1 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
>> index 7bd7f0d..f78e21b 100644
>> --- a/drivers/scsi/scsi_lib.c
>> +++ b/drivers/scsi/scsi_lib.c
>> @@ -43,28 +43,28 @@ struct scsi_host_sg_pool {
>>  	mempool_t	*pool;
>>  };
>>  
>> -#define SP(x) { x, "sgpool-" __stringify(x) }
>> +#define SCSILIB_SP(x) { x, "sgpool-" __stringify(x) }
>>  #if (SCSI_MAX_SG_SEGMENTS < 32)
>>  #error SCSI_MAX_SG_SEGMENTS is too small (must be 32 or greater)
>>  #endif
>>  static struct scsi_host_sg_pool scsi_sg_pools[] = {
>> -	SP(8),
>> -	SP(16),
>> +	SCSILIB_SP(8),
>> +	SCSILIB_SP(16),
>>  #if (SCSI_MAX_SG_SEGMENTS > 32)
>> -	SP(32),
>> +	SCSILIB_SP(32),
>>  #if (SCSI_MAX_SG_SEGMENTS > 64)
>> -	SP(64),
>> +	SCSILIB_SP(64),
>>  #if (SCSI_MAX_SG_SEGMENTS > 128)
>> -	SP(128),
>> +	SCSILIB_SP(128),
>>  #if (SCSI_MAX_SG_SEGMENTS > 256)
>>  #error SCSI_MAX_SG_SEGMENTS is too large (256 MAX)
>>  #endif
>>  #endif
>>  #endif
>>  #endif
>> -	SP(SCSI_MAX_SG_SEGMENTS)
>> +	SCSILIB_SP(SCSI_MAX_SG_SEGMENTS)
>>  };
>> -#undef SP
>> +#undef SCSILIB_SP
>>  
>>  struct kmem_cache *scsi_sdb_cache;
> 
> Sorry but the "SCSILIB_SP" name doesn't look very descriptive to me.
> There are probably better choices possible. How about using e.g.
> SG_POOL() instead ?
> 

That sounds good to me, I will send patch v2, tomorrow (today I have
to do some another urgent things, if this patch is also urgent, please
help send). :-)

Thanks.
-- 
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux