All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve deRosier <derosier@gmail.com>
To: Adrian Chadd <adrian@freebsd.org>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>,
	ath10k@lists.infradead.org,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath10k: add configurable debugging.
Date: Wed, 10 May 2017 09:44:23 -0700	[thread overview]
Message-ID: <CALLGbRL8NQi03U60AwEtOq-W0mFOn1uDmc_TXWRJofPqcP6VXg@mail.gmail.com> (raw)
In-Reply-To: <20170510162546.15439-1-adrian@freebsd.org>

Hi Adrian,

On Wed, May 10, 2017 at 9:25 AM, Adrian Chadd <adrian@freebsd.org> wrote:

> diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
> index 257d10985c6e..7bd461927029 100644
> --- a/drivers/net/wireless/ath/ath10k/debug.h
> +++ b/drivers/net/wireless/ath/ath10k/debug.h
> @@ -200,27 +200,43 @@ void ath10k_sta_update_rx_duration(struct ath10k *ar,
>  #endif /* CONFIG_MAC80211_DEBUGFS */
>
>  #ifdef CONFIG_ATH10K_DEBUG
> -__printf(3, 4) void ath10k_dbg(struct ath10k *ar,
> +static inline int
> +_ath10k_do_dbg(struct ath10k *ar, enum ath10k_debug_mask mask)
> +{
> +       if (ar->trace_debug_mask & mask)
> +               return (1);
> +       if (ar->debug_mask & mask)
> +               return (1);
> +       return (0);
> +}
> +
> +void _ath10k_dbg(struct ath10k *ar,
>                                enum ath10k_debug_mask mask,
>                                const char *fmt, ...);
> -void ath10k_dbg_dump(struct ath10k *ar,
> +
> +void _ath10k_dbg_dump(struct ath10k *ar,
>                      enum ath10k_debug_mask mask,
>                      const char *msg, const char *prefix,
>                      const void *buf, size_t len);
> +
> +#define        ath10k_dbg(ar, mask, ...)                                       \
> +       do {                                                            \
> +               if (_ath10k_do_dbg(ar, mask)) {                         \
> +                       _ath10k_dbg((ar), (mask), __VA_ARGS__);         \
> +               };                                                      \
> +       } while (0)
> +

Looks to me you dropped the "__printf(3, 4)" safety check. Was that intentional?

Thanks,
- Steve

WARNING: multiple messages have this Message-ID (diff)
From: Steve deRosier <derosier@gmail.com>
To: Adrian Chadd <adrian@freebsd.org>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	ath10k@lists.infradead.org
Subject: Re: [PATCH] ath10k: add configurable debugging.
Date: Wed, 10 May 2017 09:44:23 -0700	[thread overview]
Message-ID: <CALLGbRL8NQi03U60AwEtOq-W0mFOn1uDmc_TXWRJofPqcP6VXg@mail.gmail.com> (raw)
In-Reply-To: <20170510162546.15439-1-adrian@freebsd.org>

Hi Adrian,

On Wed, May 10, 2017 at 9:25 AM, Adrian Chadd <adrian@freebsd.org> wrote:

> diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
> index 257d10985c6e..7bd461927029 100644
> --- a/drivers/net/wireless/ath/ath10k/debug.h
> +++ b/drivers/net/wireless/ath/ath10k/debug.h
> @@ -200,27 +200,43 @@ void ath10k_sta_update_rx_duration(struct ath10k *ar,
>  #endif /* CONFIG_MAC80211_DEBUGFS */
>
>  #ifdef CONFIG_ATH10K_DEBUG
> -__printf(3, 4) void ath10k_dbg(struct ath10k *ar,
> +static inline int
> +_ath10k_do_dbg(struct ath10k *ar, enum ath10k_debug_mask mask)
> +{
> +       if (ar->trace_debug_mask & mask)
> +               return (1);
> +       if (ar->debug_mask & mask)
> +               return (1);
> +       return (0);
> +}
> +
> +void _ath10k_dbg(struct ath10k *ar,
>                                enum ath10k_debug_mask mask,
>                                const char *fmt, ...);
> -void ath10k_dbg_dump(struct ath10k *ar,
> +
> +void _ath10k_dbg_dump(struct ath10k *ar,
>                      enum ath10k_debug_mask mask,
>                      const char *msg, const char *prefix,
>                      const void *buf, size_t len);
> +
> +#define        ath10k_dbg(ar, mask, ...)                                       \
> +       do {                                                            \
> +               if (_ath10k_do_dbg(ar, mask)) {                         \
> +                       _ath10k_dbg((ar), (mask), __VA_ARGS__);         \
> +               };                                                      \
> +       } while (0)
> +

Looks to me you dropped the "__printf(3, 4)" safety check. Was that intentional?

Thanks,
- Steve

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2017-05-10 16:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 16:25 [PATCH] ath10k: add configurable debugging Adrian Chadd
2017-05-10 16:25 ` Adrian Chadd
2017-05-10 16:44 ` Steve deRosier [this message]
2017-05-10 16:44   ` Steve deRosier
2017-05-10 16:50   ` Adrian Chadd
2017-05-10 16:50     ` Adrian Chadd
2017-05-19  9:47 ` Kalle Valo
2017-05-19  9:47   ` Kalle Valo
2017-05-10 21:19 Adrian Chadd
2017-05-10 21:19 ` Adrian Chadd
2017-05-19  9:51 ` Kalle Valo
2017-05-19  9:51   ` Kalle Valo
2017-05-31 11:53 ` Kalle Valo
2017-05-31 11:53   ` Kalle Valo
2017-05-31 12:16 ` Kalle Valo
2017-05-31 12:16   ` Kalle Valo
2017-05-31 20:20   ` Arend van Spriel
2017-05-31 20:20     ` Arend van Spriel
2017-05-31 20:23     ` Adrian Chadd
2017-05-31 20:23       ` Adrian Chadd
2017-05-31 21:28       ` Arend van Spriel
2017-05-31 21:28         ` Arend van Spriel
2017-05-31 21:32         ` Adrian Chadd
2017-05-31 21:32           ` Adrian Chadd
2017-06-01 13:34       ` Kalle Valo
2017-06-01 13:34         ` Kalle Valo
2017-06-01 13:24     ` Kalle Valo
2017-06-01 13:24       ` Kalle Valo
2017-06-01 13:33       ` Adrian Chadd
2017-06-01 13:33         ` Adrian Chadd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALLGbRL8NQi03U60AwEtOq-W0mFOn1uDmc_TXWRJofPqcP6VXg@mail.gmail.com \
    --to=derosier@gmail.com \
    --cc=adrian@freebsd.org \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.