[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTim0ryZ29w0ud9=sSbV6LdZhjW410ptpf3XJDYkm@mail.gmail.com>
Date: Tue, 12 Oct 2010 13:42:30 -0400
From: Bob Copeland <me@...copeland.com>
To: "John W. Linville" <linville@...driver.com>
Cc: linux-wireless@...r.kernel.org,
Stephen Rothwell <sfr@...b.auug.org.au>,
Ben Greear <greearb@...delatech.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ath5k: fix build break from "ath5k: Print out opmode in debugfs"
On Tue, Oct 12, 2010 at 12:54 PM, Bob Copeland <me@...copeland.com> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists