Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5298ybf; Wed, 26 Feb 2020 07:50:39 -0800 (PST) X-Google-Smtp-Source: APXvYqx/Dlc59wHnIk2uYsVlB2Fz6BNeMyAiAJHqZo6oj41Sggi2JefTDEA1ArRSTG7bKuG+npfe X-Received: by 2002:a9d:62ca:: with SMTP id z10mr3472532otk.263.1582732239469; Wed, 26 Feb 2020 07:50:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582732239; cv=none; d=google.com; s=arc-20160816; b=rxiUu1uQNNFRJyFztAz/YADFKCPsd860exGol58X+rT2TryzJ5AZeo4cCgO6Z94tf2 D8dWirKcS/nkkrZlChYqukc1SkYco6NiZylKKhFJJHSXV1oS61PB3wuDrg6aIAU3xgwl ZnT456OsaOXFyhZk9cKUhUDRMhZgjRite7977cO/x6nOkFRaPVu0Hfi/DA4kSGs4ty8M UKYA/WuvKiepCauhT9h44avVvFxfXVdinoNh/aLp1vlnpnbsNWVfTW17B7m9MgIznD4Y mFZq4Nd0mt8shSOCVYGJ+Sxz7Dt4GaUQW9fry65UQVoGm3aOU0rUUnorN3cl8tbj8Jgg xrjw== 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=U9WKbn7eUI8LUbesJ+Yk9/AWmRKMXsTcSgQUjkk/JHA=; b=CC1ikYlYirH4NXg2qTlaxlAzOr4gTmeCSR6kQ8exx+6oluZUHOB+N+jmoQDveJF8D6 nn2SwkHxnzvZkGoUuVDwMGD/cxmwht0cCWxpXIU7hH7CoM6m7H1GWfH5a4QNy2ISVSJd feoOkhwfeS/De8qrgc9ni59UhYy+FQLopU6q9Ah4fO6Brlvl9lnxnrkocQ5KU1AVJcZN ziANEXxsRreZQBofaqZZZvlAd40szh7++cpd6w2SUbQumByukWMoSVQE4r1nAH2N4bfr QXvUydKopfyPv8kDFzjAVuZnqIkJpiQci4mDUcWp/8H+VTSQHsgIfiq/9dn71Xin55DX yr/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=CHv6lt1Q; 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 o18si1533794oic.18.2020.02.26.07.50.27; Wed, 26 Feb 2020 07:50:39 -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=CHv6lt1Q; 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 S1728387AbgBZPtU (ORCPT + 99 others); Wed, 26 Feb 2020 10:49:20 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:32781 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728287AbgBZPtU (ORCPT ); Wed, 26 Feb 2020 10:49:20 -0500 Received: by mail-pl1-f195.google.com with SMTP id ay11so1453186plb.0 for ; Wed, 26 Feb 2020 07:49:17 -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=U9WKbn7eUI8LUbesJ+Yk9/AWmRKMXsTcSgQUjkk/JHA=; b=CHv6lt1QTsRrYpqIKySsJjJM96z3+Q0onx/x4Fks6aMfSt1yLflnFCuQgACmvCBCi9 d5CKr7NIyQAOLh5DTYxdQJo2W6AEEpeOYbJtc5o4Xf64VNMAhGUHMc/ojYuOIVxhmysd h8MYwheYrbDZjHejql0I4KdPD0yaa0R32xU4IonDxbljLhBdnh2OZvN5LeM3tQcA+q6O 3i555HZVL7y63pZefglQ6H9/zV4OObhQbR4r6Jjtjmpq69OEtFyLr3FGszLnRy7eARuq ZdFM/3BAgWWQfSaXeaKO0tJNX9vXwmwgegb1NF5io20jyXkeZAB6w5Q+5LU5l0hzQQPY x8UQ== 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=U9WKbn7eUI8LUbesJ+Yk9/AWmRKMXsTcSgQUjkk/JHA=; b=WTKqxarDy4VZ7ogYE2Kn7qfCIoxwL/LUPqxWi0PxQOaltkFNGNFqJeS8h8zbyr5vrx rRM1jJxxqeXKKPePVGmy7bqgu1uRIs5TCUS5Ft90khbPKZyZdCWWlTDutxyV/lE+prf+ Z1GA7roepizASX2I2TIIv1nmUTuQaOVNtNjVghO88/Hy+eIYY4V6Rw9vpURuBp2Xvx4c d0UmLQeri07LhqhCU7prd442TOMfgpHySbvORLzqaEXxX3SX2kbIiIoP8hWZPetWkLpX rNvP0Ozbhnf72GdF+KqR8jnlIfKQmF49NgKTkc2GXybcD8mZLdQ4E9SKmUCFbEEnOjS0 d79g== X-Gm-Message-State: APjAAAVbzqQuJkBN/elespfJAoRwHqVwPtbBqbH7MoaNd1ZRHF/3+wg/ V2mzNkdB3f3sOkyW7lh2IrC29w== X-Received: by 2002:a17:902:d20f:: with SMTP id t15mr4921351ply.55.1582732156436; Wed, 26 Feb 2020 07:49:16 -0800 (PST) Received: from kaaira-HP-Pavilion-Notebook ([103.37.201.170]) by smtp.gmail.com with ESMTPSA id z16sm3506506pff.125.2020.02.26.07.49.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Feb 2020 07:49:15 -0800 (PST) From: Kaaira Gupta X-Google-Original-From: Kaaira Gupta Date: Wed, 26 Feb 2020 21:19:09 +0530 To: Benjamin Poirier Cc: manishc@marvell.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: qlge: add braces around macro arguments Message-ID: <20200226154909.GA5599@kaaira-HP-Pavilion-Notebook> References: <20200221195649.GA18450@kaaira-HP-Pavilion-Notebook> <20200224053225.GB312634@f3> <20200224075231.GA4806@kaaira-HP-Pavilion-Notebook> <20200225003016.GA360989@f3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200225003016.GA360989@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 Tue, Feb 25, 2020 at 09:30:16AM +0900, Benjamin Poirier wrote: > On 2020/02/24 13:22 +0530, Kaaira Gupta wrote: > > 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. > > Generally speaking, it's ok to spread the macro body onto multiple > lines. > In this case, it would be better to replace this printk format type with > "%pad". See Documentation/core-api/printk-formats.rst Soryy for late reply, I have my college exams going on. But yes, I'll make the required changes and submit a patch. Thanks!