[PATCH] rtl8xxxu: Stop log spam from each successful interrupt

Jes Sorensen Jes.Sorensen at redhat.com
Sun Sep 18 16:26:46 UTC 2016


Kalle Valo <kvalo at codeaurora.org> writes:
> Jes Sorensen <Jes.Sorensen at redhat.com> writes:
>
>> Joe Perches <joe at perches.com> writes:
>>> I think it'd be nicer to use dev_dbg for all these cases
>>> and as well use some new macro that includes the test
>>>
>>> Something like:
>>>
>>> #define rtl8xxxu_dbg(type, fmt, ...)			\
>>> do {							\
>>> 	if (rtl8xxxu_debug & (type))			\
>>> 		dev_dbg(dev, fmt, ##__VA_ARGS__);	\
>>> } while (0)
>>
>> Yuck yuck yuck, no thanks!
>>
>> Any attempt of adding that kinda grossness to the driver will get a
>> NACK.
>
> Huh, how is that ugly? To me it's the opposite, original code is ugly
> and Joes' proposal makes sense. Lots of wireless drivers have something
> similar.

Sorry it's a classic case of obfuscating the code for zero gain. If
someone else likes this kinda wrapper in their code, by all means go
ahead. In my book it's just bad coding taste.

Jes


More information about the devel mailing list