Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2150756ybv; Sun, 23 Feb 2020 23:53:04 -0800 (PST) X-Google-Smtp-Source: APXvYqze+876Qic4dlpnjs8wKX5PKiOou+ESC8BOzRjyWl1ye1L+va15bh80mHoKW1t5xuyt4Yew X-Received: by 2002:aca:c4d2:: with SMTP id u201mr11796218oif.54.1582530784005; Sun, 23 Feb 2020 23:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582530783; cv=none; d=google.com; s=arc-20160816; b=WR+xdNmH/NVusgHoKenplRsRoZnLN52hwgWXdqNYUjK2kP8daVUBzuc/JdhI9cXOzK pAf3ppJffkfr5qMdOJiLYSn7mQVkbBN/hStMgsxxFmD07Cv85tbMKlbOe5toBq5Dn6J6 LNoWq9LJeZ1XphOTvDyo/o/89r2DcpFzqS15EEv5ZAklEjJ4ehyzxJAii1ti0yWoeBOJ P4LKF6OHjb7yrJRSHEnb9DTI+vfwqz+AGAnNFsMrDYSUskezv6kFTKU1Dxa2JST3kjY8 7HySpSJyRq6PhF8+D+kAn6pgiQ7ZxXzY3W18JsB+h7B78FXGSx7ZA9vn6/ROz9QBuhVI surg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=JijnfBoe2ezLgS/FxMC63FZES23LOalpXpAlXAEnkhA=; b=RPCHfAgSiJvzaEpkaXz3KJUcjE/JUUikRuZbxpno5mgNxzlX2oudW9OFVvYWeZoMgc fF7ECm9onhnsERSn1Gclb8VrAopqyZyt+FKmjPQxq59AjI2Y0umqnzGSe4r965DfTM7g d1y8TpLrUUBBYd1qvVkEASuCC+cBgwG6wyJ8AoxLPX6eZbm98Dl2etivSQr5xIkZKDtn 5bmgBxmu8cAzeEEl0WsRBS5Za9r9qTv2jN9tj2nDrJ06bIlZ7NbABISxX8ee/jrGccD8 Ap2ivE9tv0DaeIj9WeczWrk7XfA4WVMt9WCaFjCl+8T0pu4WoEl6jniPIrUxkPHjwMW2 ngqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=DcLj9+eR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iitr.ac.in Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si5769111otg.113.2020.02.23.23.52.52; Sun, 23 Feb 2020 23:53:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=DcLj9+eR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iitr.ac.in Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727319AbgBXHwo (ORCPT + 99 others); Mon, 24 Feb 2020 02:52:44 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:38786 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbgBXHwn (ORCPT ); Mon, 24 Feb 2020 02:52:43 -0500 Received: by mail-pj1-f67.google.com with SMTP id j17so3795806pjz.3 for ; Sun, 23 Feb 2020 23:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JijnfBoe2ezLgS/FxMC63FZES23LOalpXpAlXAEnkhA=; b=DcLj9+eR5e8Z4uahIyGYgjyx4asQksO/6H7tqTCiZ6ERfAPF/l2l4Gx20nc21kdKSf Ovh7VLoKklpjR93rugpizvQciSbhNyatHlCpE8Ic4SvsREmGNVU9Kw3tIsUI8/KQnx9g Ok6nza4rtKo7fJTnSCu6r3udQea/Wi/osvs4JG7f+B4fZkvENiQA88Imd9D0A9wPHuaR tFB8FmVTv97otuDupeQIpaBmgoslav9LgPUwXsQB+e6NczzgMDJ64HBPfgeZOltQkSDR Xk9UIgv1f4PUZ38jiTxjrAkwEO8my1L2wo2oyEJiYGoa/1FCP7KsOf+GYhzpEbCdMB2R c9cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JijnfBoe2ezLgS/FxMC63FZES23LOalpXpAlXAEnkhA=; b=Kfe1g7pafIh0oGvzAcwEdLH2PvlJRQmtPy4vHpX0lM/6MrdmOgXWUTWJ/948ArHM5G PtsCjtAGzYL6UcmIlRs2LFQvpaL6RbmPMiXUK5BYzyJqRAjEoUx6kQcwjzR615xef4tB LVBbmKSG0vTMxvm8rme3gVmnKQTNaQRgz5lpJBIp4jaH1PLnmkowzXvmWyD46+fH0fNa pDAA6Vg8JJ/zRIvHdVl7GTEVJjULNlzuXY0PV0R4FPe4KcNssEZ1eu93W4cBsHuksFub n82cxrPLE4Egt0PEgsC2Ijog52EOkwRlePQUhmFNNNUehZ750Xe9ORdJXlpSH8yZ8rzo Dx1w== X-Gm-Message-State: APjAAAUvh4uNAc+zmlRQYnRnvLR4Yu1s0XRq2qXfT6I1+CaRQkz1OG39 1Pv50fX54gWvnRzAhFog89Zarg== X-Received: by 2002:a17:90a:da03:: with SMTP id e3mr19005507pjv.57.1582530757523; Sun, 23 Feb 2020 23:52:37 -0800 (PST) Received: from kaaira-HP-Pavilion-Notebook ([103.37.201.171]) by smtp.gmail.com with ESMTPSA id z10sm11442677pgz.88.2020.02.23.23.52.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Feb 2020 23:52:36 -0800 (PST) From: Kaaira Gupta X-Google-Original-From: Kaaira Gupta Date: Mon, 24 Feb 2020 13:22:31 +0530 To: Benjamin Poirier Cc: Manish Chopra , GR-Linux-NIC-Dev@marvell.com, gregkh@linxfoundation.org, netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: qlge: add braces around macro arguments Message-ID: <20200224075231.GA4806@kaaira-HP-Pavilion-Notebook> References: <20200221195649.GA18450@kaaira-HP-Pavilion-Notebook> <20200224053225.GB312634@f3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200224053225.GB312634@f3> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 24, 2020 at 02:32:25PM +0900, Benjamin Poirier wrote: > 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 > > --- > > 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. It makes the line characaters greater than 80. Shall I still add braces? I mean it's better that I add them to prevent precedence issues, but it adds another warning, hence I wasn't sure.