From patchwork Sat Sep 17 15:11:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9337147 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 C7C5C60839 for ; Sat, 17 Sep 2016 15:12:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8BCA275A2 for ; Sat, 17 Sep 2016 15:12:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD7B328C6E; Sat, 17 Sep 2016 15:12:25 +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 21E1A275A2 for ; Sat, 17 Sep 2016 15:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbcIQPMY (ORCPT ); Sat, 17 Sep 2016 11:12:24 -0400 Received: from mout.web.de ([212.227.17.11]:56094 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543AbcIQPMX (ORCPT ); Sat, 17 Sep 2016 11:12:23 -0400 Received: from [192.168.1.2] ([78.48.101.40]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MbyMU-1bT3fy3zpG-00JHOC; Sat, 17 Sep 2016 17:11:53 +0200 Subject: [PATCH 05/24] ste_dma40: Improve a size determination in d40_of_probe() To: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dan Williams , Linus Walleij , Vinod Koul References: <566ABCD9.1060404@users.sourceforge.net> <92810066-69b6-94e7-dcec-a28594b1328f@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <7872b8b2-e004-ac91-81d4-407596dc12b7@users.sourceforge.net> Date: Sat, 17 Sep 2016 17:11:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <92810066-69b6-94e7-dcec-a28594b1328f@users.sourceforge.net> X-Provags-ID: V03:K0:aO/JTlrm9okO1xDPGcHNqHi361Xa4GAWEGGr5kW1V+qakKmyPK1 7qkHS2cG+uMystL3Xdd11M1sd3huXLf1c5kzTXLq7PLvo9djRETLrINO5sfP1YRLY74F1NL sca4lstTOwSiCe65phla718VJ21HRvaAp1funLQLQjHIa7opKBwXakBosVk88/Vp83wB18E EoDpfru6x9eg/7z/YNwog== X-UI-Out-Filterresults: notjunk:1; V01:K0:Fjp5c5vUWdU=:8PCzFbhUOWaBxLl3+2p4XH mjMPQRKozMMQp02abiOGxXYnHV671MElj/r+xdiWXehnHTAZWZtmpaeJa3OU14xTB0XbGUC+W TlvwZShTM1csB2aUbQNrrX7euyZeWbHsV7UOZ/Oq02FqeWSbH6KNnwFsCXH6+fY3/TtaembM7 JX08YdQoAdW+hNXUy4b+cuB+Qz4gVH46gzNdpSiYp5tT07+3tTATiimRo/JpRbj3CBu2imO0J hi1nFbl+jhnSIKUqAg7+/PxV499/X8cgc3EUXiU451JIwfSTgAO2ZORyxIexlQ8NytWEgtqyb /4XxmnZ8wJUOTeQ0igbFOFbOi9rJUaPoM5qsWTKVHXTJPOOcq1bebBGf/SDVLVOGW04eDZa+C cvIt9vMTF4Doj8KYYtLS27l2vGgXxseZZMOvQF807UulPR1g9p1uXJEdxlaXCTBf5wJEwurkq pRloOKkfcb28hzpylLvIlHaKGkzKmS8gEo07FLSjb1ZqUl4RwU1XA9AqMx7GYWW4C+2dreWR+ jViy/tOaGykMjUsMpUhE7BLDbUl5/GpYUwnwzz+4Mu8oa3mXJimJJXfeY+NXAlLpS7s4xpntH 4qFPMk523cRS+kKJP6E3G720zUDAfpgqP7v7RemRQb5cuYk5WhhxjH0CEkZ9TXSYGiFU4DK1Y XWc92bL/SNX5owGjLt8c/520YXwRx/V6dLdLOhVRCuDSo0t9+3zH3BYEdHDe55/aVjhbsFZ3S zjXVNqSDWnoJm1qi348Y9p/bLj1kCwqJUiXvE8kpfOk10xI9FvBqU7dFke3pWhQy99kMTciSr y53BrJ6 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 17 Sep 2016 08:28:05 +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 --- drivers/dma/ste_dma40.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 220129e..57d87a8 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3487,9 +3487,7 @@ static int __init d40_of_probe(struct platform_device *pdev, int num_phy = 0, num_memcpy = 0, num_disabled = 0; const __be32 *list; - pdata = devm_kzalloc(&pdev->dev, - sizeof(struct stedma40_platform_data), - GFP_KERNEL); + pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM;