From patchwork Tue Jan 5 14:20:50 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: 7955261 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 CE26A9F38D for ; Tue, 5 Jan 2016 14:21:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A338720384 for ; Tue, 5 Jan 2016 14:21:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 190952037E for ; Tue, 5 Jan 2016 14:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751487AbcAEOU6 (ORCPT ); Tue, 5 Jan 2016 09:20:58 -0500 Received: from mail-bn1on0062.outbound.protection.outlook.com ([157.56.110.62]:63744 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751188AbcAEOU4 (ORCPT ); Tue, 5 Jan 2016 09:20:56 -0500 Received: from CY1PR0201MB0828.namprd02.prod.outlook.com (10.160.142.11) by CY1PR0201MB1436.namprd02.prod.outlook.com (10.163.139.143) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 5 Jan 2016 14:20:54 +0000 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=/TTDIQkNS2labh5ey1ns8TdNxQ0rRiygis8aTl6jt9g=; b=AhmtRdJCZgDEd3/1oxc8O4xqF1nqlXe8FBLomEX+s6Uh2o2ieIYBpO6lArObBX72wzrgK5lYDRd0fsSUG/fOlPSGojmU+mDlkxpPwOOm3e2hYceUdA5BopudY8BUWtHh1ZPBJlDkJN1KRiNHsmbqLf6LUlGb4XsXWmrEWN65OpA= Received: from CY1PR0201CA0006.namprd02.prod.outlook.com (10.163.30.144) by CY1PR0201MB0828.namprd02.prod.outlook.com (10.160.142.11) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 5 Jan 2016 14:20:53 +0000 Received: from BY2FFO11FD047.protection.gbl (2a01:111:f400:7c0c::162) by CY1PR0201CA0006.outlook.office365.com (2a01:111:e400:58b9::16) with Microsoft SMTP Server (TLS) id 15.1.361.13 via Frontend Transport; Tue, 5 Jan 2016 14:20:52 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.172) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; 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 BY2FFO11FD047.mail.protection.outlook.com (10.1.15.175) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Tue, 5 Jan 2016 14:20:52 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep11.sandisk.com (Symantec Messaging Gateway) with SMTP id F6.99.20094.441DB865; Tue, 5 Jan 2016 06:20:52 -0800 (PST) Received: from milsmgip12.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; Tue, 5 Jan 2016 06:20:52 -0800 X-AuditID: ac160a68-f79196d000004e7e-a9-568bd144780c Received: from [10.50.231.71] ( [10.177.8.100]) by milsmgip12.sandisk.com (Symantec Messaging Gateway) with SMTP id 90.EE.20697.341DB865; Tue, 5 Jan 2016 06:20:52 -0800 (PST) Subject: [PATCH 01/15] IB/srpt: Add parentheses around sizeof argument To: Doug Ledford References: <568BD0FC.70207@sandisk.com> CC: Christoph Hellwig , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <568BD142.3070900@sandisk.com> Date: Tue, 5 Jan 2016 15:20:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <568BD0FC.70207@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsWyRoxnka7Lxe4wg9vHZCxenv/AarFy9VEm i2eHelkcmD1232xg83i/7yqbx+dNcgHMUVw2Kak5mWWpRfp2CVwZfcsXsRdMs6i4Omc3WwPj Dr0uRg4OCQETial3zbsYOYFMMYkL99azdTFycQgJnGCUeLP6LjOEs51R4kTTcSaIKhOJk/eu QFVtZpR42PmJBSQhLOAmcexiFyuILSKgJrHp1SJ2kA1CAhoS77ZmgYSZBeIl1n16wwhiswkY SXx7PxOslVdAS+LZhldgNouAisSjFffAdokKREj82LCEEaJGUOLkzCdgNZwCmhL/W3eBjWcG stfv0ocYLy+x/e0csJslBBaxSnT9nMsMkhASUJc4uWQ+0wRGkVlIRs1CaJ+FpH0BI/MqRrHc zJzi3PTUAkNDveLEvJTM4my95PzcTYzgSODK2MG4dZL5IUYBDkYlHl6Ol11hQqyJZcWVuYcY JTiYlUR4Xx/pDhPiTUmsrEotyo8vKs1JLT7EKM3BoiTOa92iFiYkkJ5YkpqdmlqQWgSTZeLg lGpg1LxxaWvGo/eePcfPHk/i/brk7IFbcSaqF1VuaaaE3m6fL9f4stP2mJWvQ6PsCeOU30Uh MxVDfp5dWXtuvdy8MMdPSzpFFjy1si+pFjD+19TSUsn83+aFZWvzbPaX586H3qo4qXlxsQeX fdAKh6flK3SvXvjh+eZotWni/55F6jN9Zs/NlxRdoMRSnJFoqMVcVJwIAA3KXZCAAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsXCtZEjRdflYneYwawPPBYvz39gtVi5+iiT xbNDvSwOzB67bzawebzfd5XN4/MmuQDmKC6blNSczLLUIn27BK6MvuWL2AumWVRcnbObrYFx h14XIyeHhICJxMl7V9ggbDGJC/fWA9lcHEICGxklPl6YwAKSEBZwkzh2sYsVxBYRUJPY9GoR excjB1CRhsS7rVkgJrNAvMTdTiaQCjYBI4lv72eCdfIKaEk82/AKzGYRUJF4tOIeWI2oQITE jw1LGCFqBCVOznwCVsMpoCnxv3UXO4jNLKAu8WfeJWYIW15i+9s5zBMY+WchaZmFpGwWkrIF jMyrGMVyM3OKc9MzCwyN9IoT81Iyi7P1kvNzNzGCw5Ezagfj9YnmhxiZODilGhhn8Z5d3P25 sHS+U2FFKBfvyuM+0TkG3zfVn1gUu3PD//SYWBVFdz6f4+yJLeatrhb3dQ/X6ywvbxF/E5+S /dp3p+sj5RqrLS+D/vj3RLkZHfvx56vnu/RPt8zPdGi5vJlvkP+7fXUIl3OPe//cd4dUKgPF OidkzmtniD9gbiRTrulf0N3WrcRSnJFoqMVcVJwIAPcmuQH3AQAA X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD047; 1:JD8cfg7ZqUdbyPYPYtAHNcdTn4tr370NMO0JouqMawBRhM7JIzTldnv6Fb3FsPGkY4n9T8Uts1u2nrGR56sfsybZu4lbFhMKkelx6sZAJkKsZWd6yOWTumtGHShZM1TYzN+lXsiEInp+Qhfs++s4n8BcnBIE7/QIbHol/Z+DL/aQmEPgW09qvXXuQHSdXP9sinJ/J1YoRRApHT0kn/V0XWOkhq4tjHG4AKPRdpoT/NTx0GrEQz1xqq+zmlMRza72Fn2WPTOUxA+dSaf1NBOb71DSYy2bkAKKsGhrXhT9xKwySmbFKOfmoNX1HW/cylbG1mruodxwWCEcyU1FzgIQisHJCxKPPb6lhsJir1AUnQSi7+mNIC4pnS/VtHuEzXio X-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(110136002)(54356999)(65956001)(19580395003)(86362001)(4001350100001)(1096002)(586003)(64126003)(65816999)(97736004)(69596002)(47776003)(5001960100002)(87266999)(76176999)(59896002)(50466002)(189998001)(87936001)(1220700001)(50986999)(106466001)(65806001)(5008740100001)(4326007)(230700001)(23676002)(83506001)(92566002)(19580405001)(229853001)(77096005)(11100500001)(33656002)(80316001)(81156007)(2950100001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB0828; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0828; 2:RmXm4+jPRO8n1Oh+2h+MYEtb37Hyvtl/VIk+/KLuESFR0EwUStjMSro65J5f2wOQPCzOzF2J2Wtr9Sr6h0uCrCUZO4oY3NbxMgdYG2+CO+Lb+Iv3L7ivyJCAHXw6tjdw4JiqMK5tE8Ot++RgWCJWWQ==; 3:dMbRjYZiJqGp518xQFSbvPR8NzjVzk80X0JGav9rERjXmQ6hgGdELaEASyNCwS/KhyVAV2L5eIWGSubeyKPsBa/4xr+gEwIHjbS/v8gvs8qWxMElUXFXhnTirseuxQPgWL3L40rYNfPiu1v6gYisstPRfn8fMiURzjD8nzhyvz1O20bafwmIeSzYnytybEFaj++1dq6e9B/RvsnRwS9R8fKkok6qT22ZigxF5OanTNh53ZzQuzzL0iDIk8EcUo1HbA+Wrk7sdtX0jS4e700zLg==; 25:C0hV606BAjaVZwTjtOSdKCwgHs/91kS8HclNGglOhqza5JQXW2tpq8pc1gJCPDo3TFsuCWQuXTz3wXEaCZVp6jrNBVyOhyTxkzA68vSisA3DEeqfeTm7gDTRFrLrl7Pfndh+ddA5u+0UOZQ/7+Cf+PZRXAdIB42/WPGpxNipcNFb7goDGijUoUpRXUw+VTulj2Mm+J8LxP3rz3F9O3SvrJq1X/ex94ftGYTsbexuT2DGSXEh/om3TDbvQky6ZGNEYaCCWSQRoNH0JdNQZjb9iQ== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:CY1PR0201MB0828; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0828; 20:15I+RHt+IgtC3Z/6jw9YCnb8AEZFs+fDk6KanzxlzP9OHkg9eZgA5qnBl0rCwyb/eSigOGCv5Zo0oOuvwPc569HEB0+WfJp3am3zOrPUuo70rGHY38KNFjTiJeX77VfdmdwLmTsAqXAgiP6mSlIOnYfiqgoXTT/zNV5e6t01Ufsj4x63FxH3hJVJ4h4Vlp/UWUtMWmDQNbGFPUtSILGlxsubnwwc7bGE0Q1+PLKBLCddnRUeexqhpYqfO8HNbURojrvbpiqu6TJRdmWyhCzH9zU5/ZSgmY5MoO3A934e9nSNrI0HwkDiWLU74sxjk8FJtbTCBChtDnWUT1Ssgx2li1aTdDJwxg/MY+nZtlrsRigdPmSTKw7OT3PhFKX2PV77kQ3xbkDJgEMnUQI6XwqSY7dJosR0NBK7VAzSdBvjtZkYrUtcXS6QpbS+Z4Vjrub0wxljBuucK5S8LbUDJ6OJP+RFkIq3MQlW7Qf5TcZtzIbILyhUomEopGWdfqtGMQBI; 4:msdOA8fkjMGvuNiEXhE8akZmeHFl0hVERCRTlce70x856dXrDCFPeFuwUXY5wVEUztHGZVtzYZ2FFsf0I2pgeaCMgmoNKifb8Bt8BBnMf9MPnd3btOPYrDw/QELqzoqjsfiwGH1XIR0chxUcleCxHfXRyQt2VVy5bKVR+GQ07u28lB+/3R7JaMSlpOiyAAy0Ii3OlXqv/6ppdobrvOqev94A35taIDhibP/lySq9/RK8gDezJVxFBmdTmMOb8E4ghiq2reXjiFkwzIltINMClsjZNjnDlN2H9e+GOinVqv7f2ofyxm/SItoo2zmffJChdyUflI0R3U+itpw769qrhfp5sJD6vUwWDPcEwbN22dxEPCrnPptZUU60oTCDKecgR+NILoI8Y6GulkgB5G2zyrvmcYMAIeKVKdaF BtNM9yYrAt3EQamDTdLtbKUM/OwS X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY1PR0201MB0828; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB0828; X-Forefront-PRVS: 0812095267 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjAyMDFNQjA4Mjg7MjM6QVU2MXZlcHduTnMwUDI1VEplbGhSclRE?= =?utf-8?B?RUpsSVBtWVJxaDJmMjBUejR1SVF3VjkybEpYbFoxcFlYTWlrdU9URjFBMkp6?= =?utf-8?B?Tis3NjhtUWhmcSswWFZXWHhjOGFUKzFTYldXRXo1NFpYNlY5UTdvbDhuSDVP?= =?utf-8?B?em1oWnpOeVVDYXZRL09yN3NRWmwzTHVkM2VnK2F3ZWkwSUZMa2l2TTFvMEIx?= =?utf-8?B?Y3JsQTYySURxY2dObEg3UUUxeE1MVjZxOFNaRHlaQ1hLVk9nTGJpSTJ6S2Zk?= =?utf-8?B?bXBaaElmVTdCNE81ZXJXajExV3I0L1J6NUJaVmRSNHNQaE9DRHZidVlSVWQ5?= =?utf-8?B?UXpHNUwxWitUUmlUMlU5eHlScDVMcDVFOW10YUE0ZTg2czNYMnpDVkd3RzNa?= =?utf-8?B?V0JwdzlrVlI1S2s1UHorbnpudGtJU0tHWmlhWTNMWitLRUlwUmdHcFhsOVZT?= =?utf-8?B?bG1icWtQb1h3S0pJdDhDaUxTMUJaSHdBWVRGU2dHcEFGdCtrRi9IQnY3S0N2?= =?utf-8?B?dlRUcTAzWldTZkpsY2V5MFM1Yk9ZdlVacFZ5TUlEMitnNFQ2SUNQVzBrMmFm?= =?utf-8?B?UVFMRzAwSkVieFZ2QTliMFU5ZmZzRFJGSmozQU15Tnc0bWdNa0tDVFFkZmNC?= =?utf-8?B?VGUxcXUrekRabzVhNlYxWC9uUlg0TDJJNm11eEo3ZEdOd1prY3ZVQXJ5R2NU?= =?utf-8?B?TW5XaExmQ1R0ejBJNG03aDA5Y1J4Rjd3NzdoS0NUbUcyQ25QWXdEUFBrNERC?= =?utf-8?B?QnNtRUV1bWVGL0hJVTRjK3NGY29yRWxXQXZmRjRBMWd3aXUvUmZ0dWpBYytj?= =?utf-8?B?T2JRUGlldks1REFyamxrNVJydHM4RmZsMjR6bWM4YzdFQjNkYXYyd0RqS3Mr?= =?utf-8?B?NWFsMFB0cXlYaGp3UTNTQ2c1VG5MQ0VqaWxJYTUxeDJyOVdZNHY0dXFWTGRv?= =?utf-8?B?T0ZyV0FCWVpJUGY5cklFWXhTRVA2ai9veURKTjFGaHZHVkZiZXYrWU1lMy9w?= =?utf-8?B?b0RGZjNHdHpiUnZQTmMzUjdvanpvWS9naFZDVGhpTWZGS2ZON2JPandDN2Ur?= =?utf-8?B?K2RLRXZYeU5IdXdKYlJsNGF6d2E2cG1Pcm1hMDUxYnozNVNTeERVd2tRYXZr?= =?utf-8?B?SnpFOVJWTXdWeGhZb3FGWWZFL3NUL20wdVNBOCswcWFPU1YwTWZzZGhIa3pN?= =?utf-8?B?MnUrQTRjT0NxZGhlbGdEa0l6TkdhTG1KZThvRVAxR1ozNFpNYWVoQTJKaFBr?= =?utf-8?B?alpheXhTMUNuYnowcWllSFF5UEc5ZXNLZmFVeUo1NXVYSU9LVkU4MS9WMFNY?= =?utf-8?B?YlMyekcweHB1Y2VldFljbWpka2dWNUxvWUE1cDNWeUY5eEtrU3QzRlZ2cnNI?= =?utf-8?B?MmpPaFd1U0czb0tSUHNVcGtxK3MvdHY5bWppdncvcUNmMDRLdGZ3OWpiK1pN?= =?utf-8?B?WnVZM29XcW1PamRlR0RkRWpCZzA2NTVpM1ZpVVp0TGxpK1c2T3U1K2R0UVpP?= =?utf-8?B?aGpXZGRMaUNvUFdzeGpWRTBxbVdaZjBYM3AzVG9odjZsZjk3VjVEMVhKZHhT?= =?utf-8?Q?3/U?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0828; 5:FUN7hEjDshEcf8TCMTonUfP/dyJ7tg0ysj7lrM+yOD8eQBm+yjUyKnisjBlzhftp9Gco0+XQQzYyUeM2dI6Y7hKy7v8H/gYCDSdJHvYH1mCyjCRYdMbTcA5RvcuhMqlvn2iyVedlT3Gj7OP+tosAgQ==; 24:K9Xb88KGAJegduzED9ypwXOfScVYWelt8/5Ee5QqU6+LwkoLHnQJ7nm/V6/VAFrLfBD1wbOLhV3QgYXZNt/4Vrr7oswK4JqlRQDJcHQw1Pk=; 20:HZDp8AjZWdYWRsTTS9vA9LHnUttL4bEw45w29OWBPltUJqRiseh0BDdMtHvP8iD9wTvKIBfqRiyOHW/e4jXsF2EYDr7Tj0dykjWLzCAc1WqeFv9vRqZKObYKxtI7/Ar8ncRGQG/Gv+oO64VG5CZPSANyIDVDrhAlQrapFhVG37M2ZXmE70z4rNnYLpzgHuU++kdAqHV62BT5ZL/GLOUI5/AJUrUlw0L87JNnK7oC+ApLyKWRXIgs4iAUEvyNkhLa SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2016 14:20:52.6332 (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: CY1PR0201MB0828 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1436; 2:AWuPdGCTNBCen+VVHPMbHzA7jNv2Zwr4zPaYw6Ze5vL6LnHBetkSUqZWBgY71IASCNKjBYWqYry9zmIWZE35OLo28AXNYY/C52rOFQBLEiiDXgH3q+UqyGAuI4cDR0pV7xh4TiY/9ImzE0geu/Ns3Q==; 23:SBG0Iyfuba6hGm+l7DFKZA5PqqSN/ctbMb7swSH3xxBwU/WAoKrTZAhW5kOMCNOeoosEwiJVEsyNUbfP+A8kG7fayqs9CEKSFwI7X5s1q9sQqIfRM01CkAhD4clgWar36/e3fhZDkO+aIWVESKtI+O553hVwkJxqfKHXwVPrsxFlEJRmggjF5S045euiJBjZ X-OriginatorOrg: sandisk.com 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. This patch 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 Cc: Christoph Hellwig 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 0c3ed7c..fe9474f 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->dev_attr.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), @@ -483,7 +483,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; @@ -531,7 +531,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; @@ -552,7 +552,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); @@ -902,14 +902,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)) { @@ -928,7 +928,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; @@ -937,7 +937,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: @@ -955,7 +955,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; @@ -1458,7 +1458,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)); @@ -1508,7 +1508,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 = @@ -1944,7 +1944,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; @@ -2285,9 +2285,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; @@ -2359,7 +2359,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); @@ -2461,7 +2461,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id, /* 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; @@ -2507,7 +2507,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); @@ -3005,7 +3005,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;