From patchwork Thu Feb 11 19:03:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 8284511 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0EE109F38B for ; Thu, 11 Feb 2016 19:03:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEB5120221 for ; Thu, 11 Feb 2016 19:03:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DADD20121 for ; Thu, 11 Feb 2016 19:03:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750782AbcBKTDh (ORCPT ); Thu, 11 Feb 2016 14:03:37 -0500 Received: from mail-by2on0055.outbound.protection.outlook.com ([207.46.100.55]:38880 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750735AbcBKTDg (ORCPT ); Thu, 11 Feb 2016 14:03:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wqMAeDHQthoG33884SFX2tLP6f25gEDQCFO3xBGLBWU=; b=PhyNKX7R7jAHuPUYjU44MfGwXPGd4a5Nwixbtd6NJoCtgciiyB+H/Fk2BfMJTk7W1Kx589Rjdvg3cm7DW25x9b+qEYBKg8znZrFTIg+DakrHvSVz4i3fO/9OnaGX62IjEzttCBuLRgQhKBOcAAZjeDVcmXLcUiOqQA5TeWvy3Rg= Received: from BY1PR0201CA0014.namprd02.prod.outlook.com (10.160.191.152) by DM2PR0201MB0829.namprd02.prod.outlook.com (10.160.95.150) with Microsoft SMTP Server (TLS) id 15.1.403.16; Thu, 11 Feb 2016 19:03:33 +0000 Received: from BN1BFFO11FD031.protection.gbl (2a01:111:f400:7c10::1:156) by BY1PR0201CA0014.outlook.office365.com (2a01:111:e400:4814::24) with Microsoft SMTP Server (TLS) id 15.1.409.15 via Frontend Transport; Thu, 11 Feb 2016 19:03:33 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.172) smtp.mailfrom=sandisk.com; mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.172 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.172; helo=milsmgep11.sandisk.com; Received: from milsmgep11.sandisk.com (63.163.107.172) by BN1BFFO11FD031.mail.protection.outlook.com (10.58.144.94) with Microsoft SMTP Server id 15.1.415.6 via Frontend Transport; Thu, 11 Feb 2016 19:03:32 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com ( [172.22.12.162]) by (Symantec Messaging Gateway) with SMTP id 1D.06.02658.30BDCB65; Thu, 11 Feb 2016 11:03:31 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.248.2; Thu, 11 Feb 2016 11:03:31 -0800 X-AuditID: ac160a68-70fff70000000a62-ab-56bcdb03842e Received: from [10.60.52.49] ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 61.D7.02402.30BDCB65; Thu, 11 Feb 2016 11:03:31 -0800 (PST) Subject: [PATCH v4 02/21] IB/srpt: Add parentheses around sizeof argument To: Doug Ledford References: <56BCDAAD.7030906@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Alex Estrin" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <56BCDB03.5050507@sandisk.com> Date: Thu, 11 Feb 2016 11:03:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56BCDAAD.7030906@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGLMWRmVeSWpSXmKPExsWyRoxnkS7z7T1hBgt2a1pcePqdyeLl+Q+s FitXH2WyeHaol8XiRtsDNgdWj8V7XjJ57L7ZwObxbPphJo/3+66yeXzeJBfAGsVlk5Kak1mW WqRvl8CVcWPLR5aCsxYVt/s/szQwvtLrYuTkkBAwkXi5r5G1i5GLQ0hgE6PEgRUrmSCcHYwS 27ruMcFUPZ60hxEiMYdR4mzbHGaQhLCAp8T5n3/AbBEBNYlNrxaxg9hCAloSz/v7wcYyC6xi lNh09TpYgk3ASOLb+5ksIDYvUNGe/ZdYQWwWAVWJmdOawGxRgQiJw51d7BA1ghInZz4Bqufg 4BTQlph5JQLEZBbQlFi/Sx+kgllAXmL7W4hzJAQOskpseVUFcYK6xMkl85kmMArPQjJoFkL3 LCTdCxiZVzGK5WbmFOempxYYGuoVJ+alZBZn6yXn525iBMcGV8YOxq2TzA8xCnAwKvHw3ri+ J0yINbGsuDL3EKMEB7OSCO/9TUAh3pTEyqrUovz4otKc1OJDjNIcLErivNYtamFCAumJJanZ qakFqUUwWSYOTqkGxnNWfB4R3rtFt5oqCj3dk7s0J236yY1yL21VVrYlbTxZ9nRJw95r1iVh mzmdc+9scTn02PKFzZOvDif5Tp52PO/bb6+c5XGm6+GF1uQln6XcD6+2/OEqpqW591Ssw9Tp ud6zv2xq986XMKyNDUxSTbxwR4vtn885v93Z/uEmYbNOJBvr+LPNVGIpzkg01GIuKk4EAOc6 53iJAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHJMWRmVeSWpSXmKPExsXCtZEjRZf59p4wg8d7+S0uPP3OZPHy/AdW i5WrjzJZPDvUy2Jxo+0BmwOrx+I9L5k8dt9sYPN4Nv0wk8f7f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-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(2980300002)(438002)(199003)(189002)(19580395003)(54356999)(2950100001)(47776003)(76176999)(87266999)(4001350100001)(65956001)(5001960100002)(97736004)(80316001)(230700001)(110136002)(19580405001)(65816999)(50466002)(5008740100001)(4326007)(59896002)(50986999)(83506001)(23676002)(64126003)(11100500001)(87936001)(106466001)(86362001)(65806001)(33656002)(77096005)(229853001)(1096002)(1220700001)(189998001)(2906002)(36756003)(92566002)(586003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0201MB0829; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0829; 2:jYlOeZbUegyjldf8D4CdMzDqAmjRo9lThTvB93y6sr1lG/DovRqW/gBFQ6h2rU7S02YHtHI8PETOSrc2BuWWoRJ9lHvUKnZkTlTQ4wGnQ/scFP0hRrqQiE400ARntY9omt5N8OXIXiFoZBfHaTYoKA==; 3:zRqNl+JNIxYd8pqIUQ5qFWBuPJz+byflNUl9/PtiTDGFsvtZOJXwhIChcM+gWq9hJypB5qWLAGPredBjZE5tTMcrYyNQ38R8HJzwLOa6cLDCiFtE2VcujVoGD/Wl1pwJbgI2Wn4lpFF85+aKlEkYgtg8KDL/B9XoNJ2koaBaL/tE8Oi8itZbii/Xid+TVv0XFE5XBcRgbN+M36HLxS0HVSNjJrGFv5l4a4y6GyhzUUKicCgHPjhyanb9lQVT9+vnwVSA14OyQSHANuU87QYLvA==; 25:p94CI7xKuOaxLCqj4Mtp7kbU31QUsh6jdNlExM1GNeWZJqGU0qu8y80uGW/lROnDKnEHsM9HDZvn1h2pejvMdDFilEQIJkylqMvZLB1IGTxg8ILpN6TtQyEInhGIkFZ84BnPoO13UpXLJ3KFXmiHf9oMYIPHSW+dkCzRXWRTnoNgv+NjeKCvtoTlYR2f0zNdkn/Hs1nmFG7NIzQO1Yn3KnUdUQwEukfIsQyRBFhWtT+pENX7aDsRGwvy9YAeJAOtAI2Rveog30TYAFDvDlDUlEMGIheMLKFYI/L3iKtEY6qBJl0ulr2hm29066f+pOd2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:DM2PR0201MB0829; X-MS-Office365-Filtering-Correlation-Id: 50b1d9ed-dd02-4ebd-394f-08d33316094c X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0829; 20:NxT4OnXuNUebOGxWOD7i9gd3XMMathwusvtjAogw9ISXBL7uaguoU13jDJu4jDSkiV1vF9ig+ey+m/AelYczuTvdWirOulY54yiDO12+r6LeCfh18gSC0dEw3rJs2vIVQ8IlLaz+w1aWjBcYH14wg3arDlafz/hwDT2Ukx4n3jM52K3GZhbIQ/hqeIN//nxt78MTtSq4upenc3ZJwOU0o9agDyIXMfkE6i3kl5GJQ3IK4lscjfLnQwCPGZqSdBcxB7EBLH1W+5tibvwesgelPZXt1fu23jwuPZe0w+jaVVuqlHZa/GqyeKEre6o7tM2j4YxH+nxOp4O6qua3vbpjNgq5tQ9vYYHyTDHZf8S30N3a1TKryb9ji/CMNX8rhkPFfzXOkqcbqRLU0GemdsxM43WkSEy74xQj/d//J1PXFMaRa7WtNuYslUvkFbYKdb9vdpREAGbM0OfS7NQr33e+wwKieJY8nydmCDdv+PdnTE0F46NSem5wM+/sSQEj9BRE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(13024025)(13018025)(13015025)(13023025)(5005006)(8121501046)(3002001)(10201501046); SRVR:DM2PR0201MB0829; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0201MB0829; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0829; 4:XtdiKI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g: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2016 19:03:32.1419 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.172]; Helo=[milsmgep11.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0201MB0829 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Although sizeof is an operator and hence in many cases parentheses can be left out, the recommended kernel coding style is to surround the sizeof argument with parentheses. This patch does not change any functionality. It has been generated by running the following shell command: sed -i 's/sizeof \([^ );,]*\)/sizeof(\1)/g' drivers/infiniband/ulp/srpt/*.[ch] Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Cc: Alex Estrin --- drivers/infiniband/ulp/srpt/ib_srpt.c | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 4328679..4ee9678 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -281,7 +281,7 @@ static void srpt_get_class_port_info(struct ib_dm_mad *mad) struct ib_class_port_info *cif; cif = (struct ib_class_port_info *)mad->data; - memset(cif, 0, sizeof *cif); + memset(cif, 0, sizeof(*cif)); cif->base_version = 1; cif->class_version = 1; cif->resp_time_value = 20; @@ -340,7 +340,7 @@ static void srpt_get_ioc(struct srpt_port *sport, u32 slot, return; } - memset(iocp, 0, sizeof *iocp); + memset(iocp, 0, sizeof(*iocp)); strcpy(iocp->id_string, SRPT_ID_STRING); iocp->guid = cpu_to_be64(srpt_service_guid); iocp->vendor_id = cpu_to_be32(sdev->device->attrs.vendor_id); @@ -390,7 +390,7 @@ static void srpt_get_svc_entries(u64 ioc_guid, } svc_entries = (struct ib_dm_svc_entries *)mad->data; - memset(svc_entries, 0, sizeof *svc_entries); + memset(svc_entries, 0, sizeof(*svc_entries)); svc_entries->service_entries[0].id = cpu_to_be64(ioc_guid); snprintf(svc_entries->service_entries[0].name, sizeof(svc_entries->service_entries[0].name), @@ -484,7 +484,7 @@ static void srpt_mad_recv_handler(struct ib_mad_agent *mad_agent, rsp->ah = ah; dm_mad = rsp->mad; - memcpy(dm_mad, mad_wc->recv_buf.mad, sizeof *dm_mad); + memcpy(dm_mad, mad_wc->recv_buf.mad, sizeof(*dm_mad)); dm_mad->mad_hdr.method = IB_MGMT_METHOD_GET_RESP; dm_mad->mad_hdr.status = 0; @@ -532,7 +532,7 @@ static int srpt_refresh_port(struct srpt_port *sport) struct ib_port_attr port_attr; int ret; - memset(&port_modify, 0, sizeof port_modify); + memset(&port_modify, 0, sizeof(port_modify)); port_modify.set_port_cap_mask = IB_PORT_DEVICE_MGMT_SUP; port_modify.clr_port_cap_mask = 0; @@ -553,7 +553,7 @@ static int srpt_refresh_port(struct srpt_port *sport) goto err_query_port; if (!sport->mad_agent) { - memset(®_req, 0, sizeof reg_req); + memset(®_req, 0, sizeof(reg_req)); reg_req.mgmt_class = IB_MGMT_CLASS_DEVICE_MGMT; reg_req.mgmt_class_version = IB_MGMT_BASE_VERSION; set_bit(IB_MGMT_METHOD_GET, reg_req.method_mask); @@ -903,14 +903,14 @@ static int srpt_get_desc_tbl(struct srpt_send_ioctx *ioctx, db = (struct srp_direct_buf *)(srp_cmd->add_data + add_cdb_offset); - memcpy(ioctx->rbufs, db, sizeof *db); + memcpy(ioctx->rbufs, db, sizeof(*db)); *data_len = be32_to_cpu(db->len); } else if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_INDIRECT) || ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_INDIRECT)) { idb = (struct srp_indirect_buf *)(srp_cmd->add_data + add_cdb_offset); - ioctx->n_rbuf = be32_to_cpu(idb->table_desc.len) / sizeof *db; + ioctx->n_rbuf = be32_to_cpu(idb->table_desc.len) / sizeof(*db); if (ioctx->n_rbuf > (srp_cmd->data_out_desc_cnt + srp_cmd->data_in_desc_cnt)) { @@ -929,7 +929,7 @@ static int srpt_get_desc_tbl(struct srpt_send_ioctx *ioctx, ioctx->rbufs = &ioctx->single_rbuf; else { ioctx->rbufs = - kmalloc(ioctx->n_rbuf * sizeof *db, GFP_ATOMIC); + kmalloc(ioctx->n_rbuf * sizeof(*db), GFP_ATOMIC); if (!ioctx->rbufs) { ioctx->n_rbuf = 0; ret = -ENOMEM; @@ -938,7 +938,7 @@ static int srpt_get_desc_tbl(struct srpt_send_ioctx *ioctx, } db = idb->desc_list; - memcpy(ioctx->rbufs, db, ioctx->n_rbuf * sizeof *db); + memcpy(ioctx->rbufs, db, ioctx->n_rbuf * sizeof(*db)); *data_len = be32_to_cpu(idb->len); } out: @@ -956,7 +956,7 @@ static int srpt_init_ch_qp(struct srpt_rdma_ch *ch, struct ib_qp *qp) struct ib_qp_attr *attr; int ret; - attr = kzalloc(sizeof *attr, GFP_KERNEL); + attr = kzalloc(sizeof(*attr), GFP_KERNEL); if (!attr) return -ENOMEM; @@ -1464,7 +1464,7 @@ static int srpt_build_cmd_rsp(struct srpt_rdma_ch *ch, sense_data_len = ioctx->cmd.scsi_sense_length; WARN_ON(sense_data_len > sizeof(ioctx->sense_data)); - memset(srp_rsp, 0, sizeof *srp_rsp); + memset(srp_rsp, 0, sizeof(*srp_rsp)); srp_rsp->opcode = SRP_RSP; srp_rsp->req_lim_delta = cpu_to_be32(1 + atomic_xchg(&ch->req_lim_delta, 0)); @@ -1514,7 +1514,7 @@ static int srpt_build_tskmgmt_rsp(struct srpt_rdma_ch *ch, srp_rsp = ioctx->ioctx.buf; BUG_ON(!srp_rsp); - memset(srp_rsp, 0, sizeof *srp_rsp); + memset(srp_rsp, 0, sizeof(*srp_rsp)); srp_rsp->opcode = SRP_RSP; srp_rsp->req_lim_delta = @@ -1893,7 +1893,7 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) WARN_ON(ch->rq_size < 1); ret = -ENOMEM; - qp_init = kzalloc(sizeof *qp_init, GFP_KERNEL); + qp_init = kzalloc(sizeof(*qp_init), GFP_KERNEL); if (!qp_init) goto out; @@ -2209,9 +2209,9 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id, be64_to_cpu(*(__be64 *)&sdev->port[param->port - 1].gid.raw[0]), be64_to_cpu(*(__be64 *)&sdev->port[param->port - 1].gid.raw[8])); - rsp = kzalloc(sizeof *rsp, GFP_KERNEL); - rej = kzalloc(sizeof *rej, GFP_KERNEL); - rep_param = kzalloc(sizeof *rep_param, GFP_KERNEL); + rsp = kzalloc(sizeof(*rsp), GFP_KERNEL); + rej = kzalloc(sizeof(*rej), GFP_KERNEL); + rep_param = kzalloc(sizeof(*rep_param), GFP_KERNEL); if (!rsp || !rej || !rep_param) { ret = -ENOMEM; @@ -2283,7 +2283,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id, goto reject; } - ch = kzalloc(sizeof *ch, GFP_KERNEL); + ch = kzalloc(sizeof(*ch), GFP_KERNEL); if (!ch) { rej->reason = cpu_to_be32( SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES); @@ -2396,7 +2396,7 @@ try_again: /* create cm reply */ rep_param->qp_num = ch->qp->qp_num; rep_param->private_data = (void *)rsp; - rep_param->private_data_len = sizeof *rsp; + rep_param->private_data_len = sizeof(*rsp); rep_param->rnr_retry_count = 7; rep_param->flow_control = 1; rep_param->failover_accepted = 0; @@ -2440,7 +2440,7 @@ reject: | SRP_BUF_FORMAT_INDIRECT); ib_send_cm_rej(cm_id, IB_CM_REJ_CONSUMER_DEFINED, NULL, 0, - (void *)rej, sizeof *rej); + (void *)rej, sizeof(*rej)); out: kfree(rep_param); @@ -2946,7 +2946,7 @@ static void srpt_add_one(struct ib_device *device) pr_debug("device = %p, device->dma_ops = %p\n", device, device->dma_ops); - sdev = kzalloc(sizeof *sdev, GFP_KERNEL); + sdev = kzalloc(sizeof(*sdev), GFP_KERNEL); if (!sdev) goto err;