On 05/27/2015 01:02 PM, Narsimhulu Musini (nmusini) wrote:
<>
>>> +ifeq ($(CONFIG_SCSI_SNIC_DEBUG_FS), y)
>>> +ccflags-y += -DSNIC_DEBUG_FS
>>
>> Why do you need an extra define here just use
>> CONFIG_SCSI_SNIC_DEBUG_FS in source code directly
> Agree, I just want to use a shorter macro in the source.

Don't do this. It is a convention that if a programmer
sees a CONFIG_XXX he knows that this is settable by a
Kconfig. By making it shorter the programmer will think that
this is dead code because it is not set anywhere.

>>
>>> +snic-y += snic_debugfs.o \
>>> +           snic_trc.o
>>> +endif
>>>
>>
>> snic-$(CONFIG_SCSI_SNIC_DEBUG_FS) += snic_debugfs.o
> If CONFIG_SCSI_SNIC_DEBUGFS is not set, then it leaves a build variable
> ³snic-" in build system. ifeq() avoids such thing.

That is fine. This is done all over the Kernel Makefile.
There are two tons of these "do nothing make variables"

It the way we do it in the Kernel. (I actually like it)

>>
>> You do not the  ifeq () thing at all
>>
>> Cheers
>> Boaz
>>
> Thanks
> simha
>>
> 

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

Reply via email to