From patchwork Wed Mar 8 12:55:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9611023 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 A819260414 for ; Wed, 8 Mar 2017 13:05:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9DA328554 for ; Wed, 8 Mar 2017 13:05:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEBEE28585; Wed, 8 Mar 2017 13:05:07 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 6D8E628554 for ; Wed, 8 Mar 2017 13:05:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753226AbdCHNFG (ORCPT ); Wed, 8 Mar 2017 08:05:06 -0500 Received: from mout.web.de ([212.227.15.4]:52483 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752415AbdCHNFF (ORCPT ); Wed, 8 Mar 2017 08:05:05 -0500 Received: from [192.168.1.2] ([92.228.144.238]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MQO44-1cqyte0HTY-00TkVn; Wed, 08 Mar 2017 13:56:06 +0100 Subject: [PATCH 07/26] IB/ocrdma: Improve another size determination in ocrdma_mbx_get_ctrl_attribs() To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Sean Hefty , Selvin Xavier References: Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: Date: Wed, 8 Mar 2017 13:55:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:jHGz0JFBHFbexw+O+lTJyc/mCZnqftxV58tmuH0bi596z9HwF+B IsYXZnvqKPnY7QoA4Rtx9UdRAysaDjcdETUKw8Ncl5yxr9Q677n4ScxGw9LJjCA2MzypJYv jtYPtp8A7bY9EgPUC746Hfz5vQkn1ZeBdmqdK3yg9CRTvE1Ejpy2LYvJ1ZvJROPsdo+ABVg 9a8W2FvGL1soCF8V5/MpQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:feoHzBqafSQ=:L6WXlZr7HYjPSd6XQnk4S3 Z0+uGIN/EM+jYjG8VEh8cVuNGm+N6SSI0Sh47rp+CElG6I+5hT2OYZUUfJucor68pe0eyVLyL bSWHfc/NdTotPwTX5HYLh2Pi138tFkMQ0fw6Y4thEFoveM98slg1Q2YZzIWb2Znhi3W2Qj/Fq afOhaRcQx9pUWPUzqLJcTk40LFimeGaOGioJXWXQu+wpaGcg75Y4shK/Nq/6+cMYFC8kwSjkf /tVeqYskIXuYTThsaTEKiq/0DCRW/Ue6MqJkAl+52iLumBhwZmyEaFW6k/GkbyFjivl9WhLfg sOTgrnbOcEhxaIU0amFT0YdASfTFKvDizF4Aj0XvxYk9AKZU92+eAD1RZ2u7txTK2DEoROmv4 WAuuGURbAELr+PKFYJSIGtQJZ/tLWaj83M+dJ6RRoEa3tyFuy9HmbBn2HtiY0PLBXc1g/ePHi tG7ku1YfMLwN83voHh4JeRoD8pGtf7Fc6Ic3ZoO82PRYvDidQ0MuH9UolAtsKuL6SHdL4qlqr iAqJ+wUREJ+DqKA1TfsFwfHLoA9AJ5ZSQ/muYqBwr9CkquZ7vnIIsjy5mwYBcIJ6fpwJ9qbnX WPsa/V0TwWoWMz5NAPad0n35DXKZmXSYrHWj/H2Y39LOml11yPxGOIwnqJqEBlyCm3LLtARi3 32wi/RfiMevYI0klB7YYHd6q/129poTO+m2Rco9Yk0G4jpkdtRNDGL97NbwcbJ6laPKonLvfe yuCpdQUcaf5c4t/BckIWIXAp0oy0f+Buz6GT5aiSm5E/iygtZ+fMQZwc1VogKK0QF93BKXeDS Yz4Ph0/ 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 From: Markus Elfring Date: Tue, 7 Mar 2017 20:07:25 +0100 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Yuval Shaia --- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 56f29e06dfe4..1f7d88d7569e 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -1331,7 +1331,7 @@ static int ocrdma_mbx_get_ctrl_attribs(struct ocrdma_dev *dev) struct ocrdma_get_ctrl_attribs_rsp *ctrl_attr_rsp; struct mgmt_hba_attribs *hba_attribs; - mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); + mqe = kzalloc(sizeof(*mqe), GFP_KERNEL); if (!mqe) return status;