All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dasaratharaman Chandramouli <dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH rdma-core 2/7] IB/SA: Add braces when using sizeof
Date: Wed, 15 Mar 2017 17:24:21 -0400	[thread overview]
Message-ID: <1489613066-61684-3-git-send-email-dasaratharaman.chandramouli@intel.com> (raw)
In-Reply-To: <1489613066-61684-1-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

This fixes a checkpatch issue. The fix is needed
so that some of these functions can be moved around
in the forthcoming patches

Reviewed-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/core/sa_query.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index 60c0405..8cfe636 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -944,7 +944,7 @@ static void update_sm_ah(struct work_struct *work)
 		return;
 	}
 
-	new_ah = kmalloc(sizeof *new_ah, GFP_KERNEL);
+	new_ah = kmalloc(sizeof(*new_ah), GFP_KERNEL);
 	if (!new_ah) {
 		return;
 	}
@@ -957,7 +957,7 @@ static void update_sm_ah(struct work_struct *work)
 			 IB_DEFAULT_PKEY_FULL, &new_ah->pkey_index))
 		pr_err("Couldn't find index for default PKey\n");
 
-	memset(&ah_attr, 0, sizeof ah_attr);
+	memset(&ah_attr, 0, sizeof(ah_attr));
 	ah_attr.dlid     = port_attr.sm_lid;
 	ah_attr.sl       = port_attr.sm_sl;
 	ah_attr.port_num = port->port_num;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-03-15 21:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 21:24 [PATCH rdma-core 0/7] Add support for OPA classport info Dasaratharaman Chandramouli
     [not found] ` <1489613066-61684-1-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-15 21:24   ` [PATCH rdma-core 1/7] IB/SA: Fix lines longer than 80 columns Dasaratharaman Chandramouli
2017-03-15 21:24   ` Dasaratharaman Chandramouli [this message]
2017-03-15 21:24   ` [PATCH rdma-core 3/7] IB/SA: Remove unwanted braces Dasaratharaman Chandramouli
2017-03-15 21:24   ` [PATCH rdma-core 4/7] IB/SA: Move functions update_sm_ah() and ib_sa_event() Dasaratharaman Chandramouli
2017-03-15 21:24   ` [PATCH rdma-core 5/7] IB/SA: Modify SA to implicity cache Class Port info Dasaratharaman Chandramouli
     [not found]     ` <1489613066-61684-6-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-16 12:59       ` Hal Rosenstock
     [not found]         ` <c01d0080-26da-8eb9-59b6-6d959457ea0c-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-03-16 18:27           ` Chandramouli, Dasaratharaman
2017-03-15 21:24   ` [PATCH rdma-core 6/7] IB/core: Add rdma_cap_opa_ah to expose opa address handles Dasaratharaman Chandramouli
2017-03-15 21:24   ` [PATCH rdma-core 7/7] IB/SA: Add support to query opa classport info Dasaratharaman Chandramouli
2017-03-20  7:49   ` [PATCH rdma-core 0/7] Add support for OPA " Leon Romanovsky
     [not found]     ` <20170320074911.GW2079-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-20 18:21       ` Chandramouli, Dasaratharaman

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=1489613066-61684-3-git-send-email-dasaratharaman.chandramouli@intel.com \
    --to=dasaratharaman.chandramouli-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.