From patchwork Sat Jun 3 18:32:06 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: 9764461 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 96B8D60360 for ; Sat, 3 Jun 2017 18:32:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90714284EE for ; Sat, 3 Jun 2017 18:32:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8533028557; Sat, 3 Jun 2017 18:32:37 +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 25E3F284EE for ; Sat, 3 Jun 2017 18:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751200AbdFCScf (ORCPT ); Sat, 3 Jun 2017 14:32:35 -0400 Received: from mout.web.de ([212.227.15.3]:50288 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdFCSce (ORCPT ); Sat, 3 Jun 2017 14:32:34 -0400 Received: from [192.168.1.2] ([77.182.192.46]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LvB6w-1dyuaz2PdS-010Kvj; Sat, 03 Jun 2017 20:32:07 +0200 Subject: [PATCH 6/9] ARM: OMAP2+: Improve a size determination in sr_dev_init() From: SF Markus Elfring To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , Tony Lindgren Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <82c5d47e-5b98-5e6d-c161-fbd0093a38db@users.sourceforge.net> Date: Sat, 3 Jun 2017 20:32:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:VWS0rjPbQPz43zaurFowgJJRpLoevAFh2J9OvAn1XG/MdxHfBeC RkKQpBi48fhEPVJiT6G57JY8NPWWcRUTezZiJ1YZBA5Vp1XCahrJDijK8OUjxkt1xVOqzqB q0VdVO0Ii1NynmoG5ts23OW/KQBswrCB9Fp5w9fD8VXQFxfWyxn0MEmiJKW8m6dozvEs2wm VUwcINfmB3ZKa5MmW5T2w== X-UI-Out-Filterresults: notjunk:1; V01:K0:N2iXpriHLeM=:eRialtbCNl2dNfKeB1DNEd cjg6sEMIagolT8UIskEecK0pvLjEPPZl5cNRBOuPKVyrrejDIiodRmoYYSBrjAqCWG2boB+Ca Xe0PzmP3/UBPxfXrn2Jl7ZG5ZNPEHFiD68Ch/pQm8wg++0SjqOt1+gn6l3nDDC603xMBlCJel 6h3ueeFfLDIu5oO53xKPf868fhWgdR40f8tTrEmZRSVK1cTxbi1Iawsm706sPZzcHjIpRA8cW PuchIgv7x1RQ1e4piiDifzeIgvTxGWPdyb4lAz7flDWoFQE1mzLYSaFWzFPjzuQeLExOMxr3B 4t9tBqvxnN7Oc04RluGtmNtXUJJyH109J3EjFVtfMEtaiHBtO9lgYWMOK0VRPWb7rfpyXo+l8 Dy9eZ9tioRI3//HUrjsUABe2xR3ZWef13HEWKBKCL4vZOgQtq/VEEFXscqCc04QLyYSeBaKuL XEKc4q9NwtqoiRUCISrD1sfmA67hs89iwtat5yqr5BCDpn7zAzrGi8D4EycwHmxPCws9xKg8u vRzz5OB8ePbBz+WKV22p6yTtGgxyx7y+sRHyj1MV8qJyGpwVjZ5mvjcTxtix+dDYHCjO5Qk9Z fvJTXScChYGrpIUYQVYvwkf8VOfUPfRI+LTicyl3ys0X++zWGOpXRzsoiXNtwFK0dxIWkrVFu zo46Rc1B+5lXuz3N7p1dZW/nZb9vJgDDz7NVVcL2HpPqvc4RMR5grmQcuMCY3vy3wio1tVvk7 yjQ+lRx1gYJ37RXjU60/mYSDGIo08hRiE/0lgvIETU9zOfSfSTNv5uph5RjLRDrOFyv6hC/48 eseCgp2 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 3 Jun 2017 19:02:24 +0200 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 --- arch/arm/mach-omap2/sr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c index d7cff2632d1e..01df4907c0e3 100644 --- a/arch/arm/mach-omap2/sr_device.c +++ b/arch/arm/mach-omap2/sr_device.c @@ -102,5 +102,5 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user) char *name = "smartreflex"; static int i; - sr_data = kzalloc(sizeof(struct omap_sr_data), GFP_KERNEL); + sr_data = kzalloc(sizeof(*sr_data), GFP_KERNEL); if (!sr_data) {