From patchwork Wed Mar 15 21:24:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dasaratharaman Chandramouli X-Patchwork-Id: 9626695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AEF0D604A9 for ; Wed, 15 Mar 2017 21:31:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A115028537 for ; Wed, 15 Mar 2017 21:31:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95B7C285EB; Wed, 15 Mar 2017 21:31:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3011828537 for ; Wed, 15 Mar 2017 21:31:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752035AbdCOVbU (ORCPT ); Wed, 15 Mar 2017 17:31:20 -0400 Received: from mga04.intel.com ([192.55.52.120]:40249 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751416AbdCOVbT (ORCPT ); Wed, 15 Mar 2017 17:31:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489613478; x=1521149478; h=from:to:subject:date:message-id:in-reply-to:references; bh=jz1eyB1+XIwHLrkTXxV4kUo+m2V2zGRRqHr6rVS16hA=; b=W9qhqtUZ+jH7WgktCv4+Uk9VoWKcXX8IksHprGxpq9DZEw8UrW9ARPhU ZNFib7lwPpxYLoH2niQww8z/NNLJ6w==; Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2017 14:30:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="1142789283" Received: from phwtpriv01.ph.intel.com ([10.228.208.76]) by fmsmga002.fm.intel.com with ESMTP; 15 Mar 2017 14:30:16 -0700 From: Dasaratharaman Chandramouli To: Don Hiatt , Ira Weiny , Doug Ledford , linux-rdma Subject: [PATCH rdma-core 2/7] IB/SA: Add braces when using sizeof Date: Wed, 15 Mar 2017 17:24:21 -0400 Message-Id: <1489613066-61684-3-git-send-email-dasaratharaman.chandramouli@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1489613066-61684-1-git-send-email-dasaratharaman.chandramouli@intel.com> References: <1489613066-61684-1-git-send-email-dasaratharaman.chandramouli@intel.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli --- 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;