From patchwork Thu Jun 1 20:48:00 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: 9761103 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 BAB7A60375 for ; Thu, 1 Jun 2017 20:48:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA0272851B for ; Thu, 1 Jun 2017 20:48:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D7542853A; Thu, 1 Jun 2017 20:48: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=-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 374E92851B for ; Thu, 1 Jun 2017 20:48:37 +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=/ahUFiL1gcZozcoDV49KPZaEWpFq/EOKhD8acE4VU4s=; b=D8JU8pCNnefcrU oHPO1Oisq61pDecvnTtndnTTGRf+o9jWYJE05hkyK2fVEnfW8mN3RjKuaCIJqallBHGPZaR2UsSOt t0GFTjVzyV+BEyuafr9UL1AfLdGMRC8XGxHyxH3lwqSE4WU/nBmnEtgR887a9S0Jcpqqvjjw9BxCz kmuvID4ZKmaokYycpBAtH7OGAq7i0vyg1h8OF4IRGlYo7KamXXLg7qiEfSOXrmFyUv5lmNxqK+BcZ z7+Y4bpIZOz98fwvezbmzkaubqAkc/Hk/4GEUYQuWBguKk9c33Cnno+sfWqckjow3Il0MY4fHSc79 F2EoebO1uKZRC+a4HUaw==; 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 1dGX1I-00072f-6q; Thu, 01 Jun 2017 20:48:36 +0000 Received: from mout.web.de ([212.227.15.3]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dGX1E-00070P-Kg for linux-arm-kernel@lists.infradead.org; Thu, 01 Jun 2017 20:48:34 +0000 Received: from [192.168.1.2] ([77.181.221.49]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0McWXI-1dY3ta0HGS-00Hcjb; Thu, 01 Jun 2017 22:48:02 +0200 Subject: [PATCH 1/5] ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() From: SF Markus Elfring To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Aaro Koskinen , Russell King , Tony Lindgren References: <85e2ec7f-f650-28a2-6cc5-0b4b52e44183@users.sourceforge.net> Message-ID: <9765c4ce-fe2b-dee7-b79a-b6393fb79594@users.sourceforge.net> Date: Thu, 1 Jun 2017 22:48:00 +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: <85e2ec7f-f650-28a2-6cc5-0b4b52e44183@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:WvYkU9r85kYszUhblKrVmtk8XjbL+Zfy4Wg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100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170601_134833_014136_601F8A85 X-CRM114-Status: UNSURE ( 9.19 ) 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: Thu, 1 Jun 2017 21:48:11 +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-omap1/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index c821c1d5610e..823dba3dc033 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c @@ -339,5 +339,5 @@ static int __init omap1_system_dma_init(void) goto exit_iounmap; } - d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL); + d = kzalloc(sizeof(*d), GFP_KERNEL); if (!d) {