Kalle Valo <kvalo@xxxxxxxxxxxxxx> writes: > Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> writes: > >> Joe Perches <joe@xxxxxxxxxxx> 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