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: 9761105 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 12D3A60375 for ; Thu, 1 Jun 2017 20:48:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F39222851B for ; Thu, 1 Jun 2017 20:48:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E66E02853A; Thu, 1 Jun 2017 20:48:39 +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 9A5DB2851B for ; Thu, 1 Jun 2017 20:48:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751050AbdFAUsh (ORCPT ); Thu, 1 Jun 2017 16:48:37 -0400 Received: from mout.web.de ([212.227.15.3]:56160 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbdFAUsg (ORCPT ); Thu, 1 Jun 2017 16:48:36 -0400 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 Cc: LKML , kernel-janitors@vger.kernel.org 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+Zfy4WgeDB/H0cr4h852clR 7RWzS+z3Uh5pEmdzZB+OO6FvmXx9U8PfP3sJF/ifdo0reoPyo5ZrwX3V4cdxGC0T/kvjmSW CwCQ9amt1JwvVlJ+molZfCMTZpDpYN7O6StuUJ9JasloLvpT448FA5y/WnmA+xuEAb1lHzq nRF7mO4U8RU4D6hdwtgSA== X-UI-Out-Filterresults: notjunk:1; V01:K0:7+0R670/1LY=:9saJbPEvX3rLCQIySbfU+M BLswIa+ZMZEYNDIdPe1kPcYmY6Qlq1jFVcn7Jr+pgD7Qscnl9jycTta5SPI/ktYAUY/Zhe2OO bF9pTWeTnT9Zw0eCAT2dzDGG5gRKDvk57f66mlTEKwLbDhGzs2Sc3dXnBTeHTZWG5L4375VLm DEEDYPuqjKS+ZOUopF/p8GmgyOi/CaSZzNNqhdwWs81cmyHf/EkHxPeMgXFTUTRdrE2ni+JtJ pbU0ggT7dXptw8UHyu/8oXwERxBPMy9qx5+V25jDhBU7l9oL1A9JIlyt99gQFtAdUkUgqGy/F gmSo4MmNx8zTryrq4/dmpNYkuQVZ6MxrbQAO5rrgsB/8dfYIODTgc192Ec/g1C9iv21SB/y7Y CniJSj4jyFSLTMZTbtEZx52++SM7dKID7zdDVb7piv73WQIgbjO/DSqCgSG8HI0kLDet1zThx olNkyP3kPnCGGUB5Mj9ngs5/4mgDZdSD7NfxopOxNqoRRHm//Oa8fqWNuvKt5dJWlerw9E8uz 3JfN9FmGQ9E4INWqhLYf5JKO6mxx9A/EF+m2zFGXht+PgXUYM5Tw6WVh2m5GUWyklomJkmfmP tH5zJ0D1K4i5izmogZZSlr43jrgYUeJZXpCuPrtWtD4lpNXzqjYCjWe5wfrY77CzRLXFBO5bb +0OkjybazZ3Ijj7ljVe2/1mO04teLtrxTLyc/yYl4RyjHYlLvuElpo6hors8Pt/HlXdkXEzxG cNYnc4s/atrri+5QlDuNl77p0OHe9zyxZHTmnaMHZRHeVwLnJSeVnAYO6poRxdQqeS03nhhD0 YezqKHV 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: 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) {