netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: Kaaira Gupta <kgupta@es.iitr.ac.in>
Cc: Manish Chopra <manishc@marvell.com>,
	GR-Linux-NIC-Dev@marvell.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	netdev@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: qlge: add braces around macro arguments
Date: Mon, 24 Feb 2020 14:32:25 +0900	[thread overview]
Message-ID: <20200224053225.GB312634@f3> (raw)
In-Reply-To: <20200221195649.GA18450@kaaira-HP-Pavilion-Notebook>

On 2020/02/22 01:26 +0530, Kaaira Gupta wrote:
> Fix checkpatch.pl warnings of adding braces around macro arguments to
> prevent precedence issues by adding braces in qlge_dbg.c
> 
> Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
> ---
>  drivers/staging/qlge/qlge_dbg.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
> index 8cf39615c520..c7af2548d119 100644
> --- a/drivers/staging/qlge/qlge_dbg.c
> +++ b/drivers/staging/qlge/qlge_dbg.c
> @@ -1525,7 +1525,7 @@ void ql_dump_regs(struct ql_adapter *qdev)
>  #ifdef QL_STAT_DUMP
>  
>  #define DUMP_STAT(qdev, stat)	\
> -	pr_err("%s = %ld\n", #stat, (unsigned long)qdev->nic_stats.stat)
> +	pr_err("%s = %ld\n", #stat, (unsigned long)(qdev)->nic_stats.stat)
>  
>  void ql_dump_stat(struct ql_adapter *qdev)
>  {
> @@ -1578,12 +1578,12 @@ void ql_dump_stat(struct ql_adapter *qdev)
>  #ifdef QL_DEV_DUMP
>  
>  #define DUMP_QDEV_FIELD(qdev, type, field)		\
> -	pr_err("qdev->%-24s = " type "\n", #field, qdev->field)
> +	pr_err("qdev->%-24s = " type "\n", #field, (qdev)->(field))
>  #define DUMP_QDEV_DMA_FIELD(qdev, field)		\
>  	pr_err("qdev->%-24s = %llx\n", #field, (unsigned long long)qdev->field)
                                                                   ^^^^
You missed one.

  reply	other threads:[~2020-02-24  5:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21 19:56 [PATCH] staging: qlge: add braces around macro arguments Kaaira Gupta
2020-02-24  5:32 ` Benjamin Poirier [this message]
2020-02-24  7:52   ` Kaaira Gupta
2020-02-25  0:30     ` Benjamin Poirier

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=20200224053225.GB312634@f3 \
    --to=benjamin.poirier@gmail.com \
    --cc=GR-Linux-NIC-Dev@marvell.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kgupta@es.iitr.ac.in \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manishc@marvell.com \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).