Re: [PATCH] ath5k: fix build break from "ath5k: Print out opmode in debugfs"

From: Bob Copeland
Date: Tue Oct 12 2010 - 13:42:37 EST


On Tue, Oct 12, 2010 at 12:54 PM, Bob Copeland <me@xxxxxxxxxxxxxxx> wrote:
>> +#ifdef CONFIG_ATH_DEBUG
>>        ATH5K_DBG(sc, ATH5K_DEBUG_MODE, "mode setup opmode %d (%s)\n",
>>                  sc->opmode,
>>                  ath_opmode_to_string(sc->opmode) ?
>>                  ath_opmode_to_string(sc->opmode) : "UKNOWN");

Just one other bikeshed color:

if ath_opmode_to_string() returned "UNKNOWN" in the failure case,
we wouldn't need the double-call above. Yes, it's used by ath9k
too, but IMHO a debugging function that only converts some of the
possible values to strings is pretty developer unfriendly.

That said, I still think tracepoints are a nicer way to do this
kind of thing (you can even do symbolic names for enums).

--
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/