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

From: Bob Copeland
Date: Tue Oct 12 2010 - 12:54:25 EST


On Tue, Oct 12, 2010 at 10:53 AM, John W. Linville
<linville@xxxxxxxxxxxxx> wrote:
> Without this and with CONFIG_ATH_DEBUG not set...
>
> ERROR: ".ath_opmode_to_string" [drivers/net/wireless/ath/ath5k/ath5k.ko] undefined!
>
> Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
> ---
> Please don't make me commit such an ugly patch...
>
>  drivers/net/wireless/ath/ath5k/base.c  |    4 ++++
>  drivers/net/wireless/ath/ath5k/debug.c |    6 +++++-
>  2 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index c9732a6..b839a6b 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -562,10 +562,14 @@ static void ath_do_set_opmode(struct ath5k_softc *sc)
>  {
>        struct ath5k_hw *ah = sc->ah;
>        ath5k_hw_set_opmode(ah, sc->opmode);
> +#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");

>From the original patch: UKNOWN?

I guess making ath_opmode_to_string always around (no-op in non-debug case)
would also suffice. (reads on...) ah, yes, Joe's patch does this.

--
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/