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: 9764459 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 6F98660360 for ; Sat, 3 Jun 2017 18:32:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68BCB284EE for ; Sat, 3 Jun 2017 18:32:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AF8428557; Sat, 3 Jun 2017 18:32:34 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E50C9284EE for ; Sat, 3 Jun 2017 18:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=shSWUBSVT++s8NtNlOlgW96DcNUySpEywfHf4yJqk6k=; b=kkMgpV/S3Xu7Yc 3GKq2ymNUzmxQAt09pju0k53f14s8O328pVc+OCe9qgudyrQIFhXXe2CIN7a/s9CVi5HTa+v8rSiM lv/9nv35e3alS+gsu7RIj4DaA6FY9F8WDYn0TjFt7kIHgAflA4kpaytNR8HC8LqUnI8x6yzOGaSbN H/mwyd2nWgRFGvulDWl/4/8RKeN00Q2/Zx/R+24wGN+SXiPU+f/yWYRulrJm20p0bw5JPGZwh7x10 BCK5dOLfiJucSDr10Ixjd4oGm9Z+sRbSP4yfVHYCTKD333drUpBWPIqEysUxtLU0wErsTNr6vKONU iVu85MJ6WyqjVf+0yVCg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dHDqj-0007yF-3V; Sat, 03 Jun 2017 18:32:33 +0000 Received: from mout.web.de ([212.227.15.3]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dHDqg-0007wf-Gn for linux-arm-kernel@lists.infradead.org; Sat, 03 Jun 2017 18:32:32 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170603_113230_890547_BD99E118 X-CRM114-Status: UNSURE ( 8.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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) {