From patchwork Fri Jan 29 23:11:11 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: 8168491 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 2D52C9F96D for ; Fri, 29 Jan 2016 23:11:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 044392039D for ; Fri, 29 Jan 2016 23:11:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 702182039C for ; Fri, 29 Jan 2016 23:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754348AbcA2XLT (ORCPT ); Fri, 29 Jan 2016 18:11:19 -0500 Received: from mail-bl2on0066.outbound.protection.outlook.com ([65.55.169.66]:27857 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754030AbcA2XLQ (ORCPT ); Fri, 29 Jan 2016 18:11:16 -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=yeiJ7GW5/q6HgB6nPDjadx9/uDaJCS3Bbg4bZni6viA=; b=nNWxWpW5MdCJ7gAMseBwO5PyTeZkLbimrvgEbvYc43Zg2UjMs3w4oAzgjaMpyAgluPk2IKB9w4Ru9t0o/PfBpxtk1zu6tQ1jo74W8Bl69NRK1Ss57cagW4/YnjHoXVkKAKOvFyyfuR3+RXlqEtIvyH935etPksq92K6+nSpvpFk= Received: from BY2PR02CA0006.namprd02.prod.outlook.com (10.163.44.144) by BLUPR02MB295.namprd02.prod.outlook.com (10.141.77.23) with Microsoft SMTP Server (TLS) id 15.1.390.13; Fri, 29 Jan 2016 23:11:14 +0000 Received: from BN1AFFO11FD015.protection.gbl (2a01:111:f400:7c10::126) by BY2PR02CA0006.outlook.office365.com (2a01:111:e400:5261::16) with Microsoft SMTP Server (TLS) id 15.1.396.15 via Frontend Transport; Fri, 29 Jan 2016 23:11:13 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.172) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; 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 BN1AFFO11FD015.mail.protection.outlook.com (10.58.52.75) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Fri, 29 Jan 2016 23:11:12 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com ( [172.22.12.162]) by (Symantec Messaging Gateway) with SMTP id F1.10.29304.F81FBA65; Fri, 29 Jan 2016 15:11:11 -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; Fri, 29 Jan 2016 15:11:12 -0800 X-AuditID: ac160a68-f37ff70000007278-8b-56abf18fca7e Received: from [10.60.52.49] ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id F5.47.02700.F81FBA65; Fri, 29 Jan 2016 15:11:11 -0800 (PST) Subject: [PATCH v2 01/22] IB/srpt: Add parentheses around sizeof argument To: Doug Ledford References: <56ABF16E.7070006@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Alex Estrin" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <56ABF18F.1050008@sandisk.com> Date: Fri, 29 Jan 2016 15:11:11 -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: <56ABF16E.7070006@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGLMWRmVeSWpSXmKPExsWyRoxnkW7/x9VhBrcPWVpcePqdyeLl+Q+s FitXH2WyeHaol8XiRtsDNgdWj8V7XjJ57L7ZwObxbPphJo/3+66yeXzeJBfAGsVlk5Kak1mW WqRvl8CV0f/qN2vBEouKn9PPMjcwHtPrYuTgkBAwkZjfHNPFyMUhJLCJUWLVtZ/MEM4ORomG 46fZuhg5wYq23b3MBpGYwygx9dAHFpCEsICnxOQnsxlBbBEBNYlNrxaxg9hCAloS5y58YQdp YBZYxSix6ep1sASbgJHEt/czWUBW8wIV7ZpcARJmEVCV+P9vG9hMUYEIicOdXWDlvAKCEidn PgGLcwpoSyyZfQGslVlAU2L9Ln2QMLOAvMT2t3PAjpYQOMgq8fHVKlaIG9QlTi6ZzzSBUXgW klGzENpnIWlfwMi8ilEsNzOnODc9tcDQUK84MS8lszhbLzk/dxMjODa4MnYwbp1kfohRgINR iYfXY9nqMCHWxLLiytxDjBIczEoivHUvgEK8KYmVValF+fFFpTmpxYcYpTlYlMR5rVvUwoQE 0hNLUrNTUwtSi2CyTBycUg2MnZFvK+Uvp+xgX25+Qv6chSjnIdEkHfZTW7mYUxO0UuIf+v+u 3ea2gkcy5s7qF195AjY8+M8z5+3cFX4BdyI+v2B4rZNbtTltsmP5TSv/t1oLbd+V6jCouXw6 Uca+L+5fOr/71HXM31d0Trj4zZoldCertWveA8EED6XDG1OsXHjTJgXkHH6hxFKckWioxVxU nAgAM+G9d4kCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHJMWRmVeSWpSXmKPExsXCtZEjRbf/4+owg/Y/shYXnn5nsnh5/gOr xcrVR5ksnh3qZbG40faAzYHVY/Gel0weu282sHk8m36YyeP9vqtsHp83yQWwRnHZpKTmZJal FunbJXBl9L/6zVqwxKLi5/SzzA2Mx/S6GDk5JARMJLbdvczWxcjFISQwi1Hi76GbLCAJYQFP iclPZjOC2CICahKbXi1iB7GFBLQkzl34wg7SwCywilHi98oPbCAJNgEjiW/vZwI1c3DwAhXt mlwBEmYRUJX4/28b2ExRgQiJw51dYHN4BQQlTs58AhbnFNCWWDL7ApjNLKAu8WfeJWYIW15i +9s5zBMY+WYhaZmFpGwWkrIFjMyrGMVyM3OKc9MzCwwN9YoT81Iyi7P1kvNzNzGCQ5Qzcgfj 04nmhxiZODilGhhLN9Qbf2N6XXg348ZJ8z1Lihkk7zaeXldrlBGwfJ+v+0GTt6m31EUuMvga fZm08YZbZ+TKPhW9rb++qG33z+ZlMVjyLrL8zFG/l4oSck+Ke8r8s5/tLeI9/Cjka1CWtMKC /4GfdOeHM32JCczlqy7cIFJceNY/emb+35lMPWYhN48rR0164KbEUpyRaKjFXFScCAAcyIni AQIAAA== X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD015; 1:1V7rV0ujKE+BNu7YVdol71dksnBvSpHZ4micnEyw+c02ORvBbzebXnDli2Rfqd5noxh8wnREheHBjqoKygfs+lBhVP92HTfn96L4Kt/DnGBncCtZ9fjJ0rcdKLqFw7BEtCG/GqtWJcWKzvUJ8z4Ja67vPoTEe0lNTTOv5Q95ZYtEkoUNW3fghlLbPrBKNDnIp2hkjwOa88eeSqskSblc0bUKtqKWibJ8h/gND5f6Bg59rDdFZ1e1vMoRCD82oi8FCLQuIwV9ssigXf3QlRhNuHY7Cg3jb0ZPtfSOyb6UU6syCEQEHOoIczYfTguscsUpdmz73lzjqQDoxAE8hcZJHiB7ZIfVNAVp8HpPS0Vg+OSUkYjEtyZIIY4Z9+USW9hM2b/MONBbiofZGTjWw/Jl9pJ1mAeggMncltQ7j6D2xgDa6j60NQlSoGjdFt1Mm/YX X-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(23676002)(87936001)(36756003)(80316001)(19580405001)(54356999)(76176999)(19580395003)(106466001)(65806001)(47776003)(86362001)(33656002)(50986999)(87266999)(50466002)(229853001)(65816999)(65956001)(2950100001)(5008740100001)(2906002)(586003)(83506001)(4326007)(1096002)(1220700001)(92566002)(5001960100002)(189998001)(4001350100001)(64126003)(110136002)(77096005)(230700001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB295; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB295; 2:1bIDz2nUhChhOJ3aokLfiKdUI52Ed4P+nYPoGw7VpfhiPZXAxz84//gHqohZPOnuMwCOYf4JT3l3pQJx+r1VR3BjD3Zp7rbqlvvPuIf5y9m+88Jy07hLXXXfPVIc5EvsIH6H/akQ5sXobfzwkdXiDQ==; 3:6Bvbk0LKzDhJhR2vgs1I1g5mPeo3hPNnfQVGiRrK9xgMEBeD/mDuCz6tTDax2ysFavqda7829Tn2RI45NUA2upBlMS2Y8dACTE1AZP4U91+FGjKl8J7HgfI4E4z4rW0bkQVOKJue/2JkCBjh02+Ddxt0BKXrXrQfKkXBYlH0c0XwrpsmSJzUKO3HlDfDUQbRLJ2ztnrggnXYoGNMqJAfLXa3foL8C4hVOScr04nhm5aBJomzhToalyoAAomxwZvW9a8wAUv0oOFKTKRdmVZezw==; 25:wz0VItjLKzoHSQ2HMGCpsEOdlPdnkgUQ9apkB6XzlUrmxUT5EDxSzaMmPfpoaaomgoQN2rSu2NsZZyPdn4qV/hY/pi5AGlO6a/E3QvGYDVle/wnDkf+VUVbWwIT34IpB+ybCuU4OAPX1VDF+ZRFtVwmqiyBJjJng09v5cSC8L1os7DisSn3AjOtfyZg+c97orWkti3BZOy8K/OR8QW0C9kQNuLiNIt9cWx0Xsd08+10Ar4JgTJNf5xmR1LjHqbw2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BLUPR02MB295; X-MS-Office365-Filtering-Correlation-Id: 3b07507a-fba3-4418-3e96-08d329017b6d X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB295; 20:g18ln/+BrxsLi5FiegERuuFXAmrWjFfHizFvZcy97VFbxn4UvZbxhr1cA3xhrQqGzCVi6d0S+TZhEi/2w/Iw6UIG0Vs/nmNqhE7YWFrXkkuCqqgRV73jwLem5CQ5QzWVZL4xkHXnGiE0bBFOTaaNb9BCRlSaWaUOE/Mqr+yDT4QgwdnI6xSsc+Mmd9kPJnFy9tjO3W5b4NRby2+1zxjCpMJSIitDFIPKW8tG6iJ49GTWIuap9cr0PGY5WEzaiBgJpEniNVbe3tMRgEFw6a6lLkkm3wqVLrh2ER5mUrQOWZkhHk7N1dngTFNsd69jo8TWWIXegREgApC3EId1XRf3psYjkcqZqdTvgcLAmfZvDEaI9BmRP7aHJgtmZUUTjAK77Nc1b308/3rKhstAYuF6octDXusp2RJSvEkj0qXE8k1RZ+L55I7xqtx4A8pudRMAABauRmGvGimePfXLpnCoMjkXHJx+zUJui9NIws9Ly/39hiJKp4kRQXLCDn3A1et6 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(34787635062028)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(13023025)(13015025)(8121501046)(13024025)(5005006)(13018025)(3002001)(10201501046); SRVR:BLUPR02MB295; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB295; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB295; 4:jPFL3iYWxWmkJIpgJTiszGqQB3gTukjZ0dFT6OzX1VnOO0qxETIXgvzoRu8cNnSovevPOrGab0dgOkZpTD1GMVL+BJeoiC77NNktXuJ5IugA3xY2AQUkORo3qfz2IHmlRGBNjcMx4sEigKwWMHjIvEMmFXtZlOaoEHINLxwDZxIsQ7pDAVkii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UitvTENBb1lpbVd2T2VKV0d6K1Zv?= =?utf-8?Q?K+YBo=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB295; 5:8LuFQ6kjFFxtSIVa+9NCLZy4mw+eUCR3K8AzTXh+ZbHL8xVv7DtoCXF6McjnBxOxvsrr7Ik55jEl87EQWaLoMi7CTgZtepuS6GFhYPnQzRJ8NSKDRKMT89fV8Tr0nGqGW6PJ/O8eqqhuuu2p5rDUhQ==; 24:FXjSK8mrTxbigla55Bk7vEiDsZ5kq/7/JIzNvHrISo0VjM1XkXzqzCli3ZcvJytvX8RGXxH7r/pSE7HdC5M6Xs5LBnDxvIzLk+svxU1fgUg=; 20:lID0KgeVB0Vgeak4MsMg1lWzH7Bf/Z1q2WjCL7mrzEPk2xEjtG+UwT7kC7e7r45dcHKYpY3vBWyFkFi3AvUkHjNj0zHfGgt17p0VwTI26+S1+bGUwMjzX6ZYNV51WkdSVmy98cHdGFKb/E3sTRATGwqiYk49MMh3yyGBYtsrri6FQ5NwtgEFk6bf0Wx7kvjWWBxu+rBf+rlDZkMOmiU+aG6pPf05ypwtH7hAECYLTCgdoocs/roxZEzb8xsOlmIH SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2016 23:11:12.6687 (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: BLUPR02MB295 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 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 and 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 --- 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 0c37fee..f65ae60 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 = @@ -1950,7 +1950,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; @@ -2266,9 +2266,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; @@ -2340,7 +2340,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); @@ -2453,7 +2453,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; @@ -2497,7 +2497,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); @@ -3003,7 +3003,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;