From patchwork Mon Oct 2 17:59:19 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: 9981077 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 9603C602A0 for ; Mon, 2 Oct 2017 17:59:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84FE423794 for ; Mon, 2 Oct 2017 17:59:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79604288C5; Mon, 2 Oct 2017 17:59:54 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED 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 0F5C723794 for ; Mon, 2 Oct 2017 17:59:54 +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=+EyW2m2eKydamvElKOS9HYS+nA6R1iphTuwzkNCrgg8=; b=oxYiigWYP01SWn RjClIi4szOZfphYtv3PCGcIVsPh62yl9xyaibClSSeZVvXNMwURf3Gr2IIFeiHt0fs8ZTQGZsSKP1 WnHrRVl4vi+Wbl9RRrXdITqMbPSau4SCj5y92weU8373mzuZidrXfRaRd0b5BXm0Yvz4Eb0UFAzQ4 nQDnosixFomg4Blm0gVNgR5BrSyw6uITVLBwkimxTjphjIXs/EVGxBVNoPl/FAoMIKTXyOfWom1x2 p+myKD/joIiLvx5veRbKIPnh2VMn5qZXhTsscigo4iJsl1iwZlddS4ee+BND28WtZswSjm8JlfR4G ZM2SrQsMshYV+U24Ts8A==; 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 1dz50Q-0004hI-V4; Mon, 02 Oct 2017 17:59:50 +0000 Received: from mout.web.de ([212.227.17.12]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dz50J-0004Vq-Mb for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2017 17:59:49 +0000 Received: from [192.168.1.3] ([77.182.170.85]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M8hwt-1d3ev53dQ3-00wGEj; Mon, 02 Oct 2017 19:59:21 +0200 Subject: [PATCH 2/6] ARM: s3c24xx: Improve a size determination in s3c2410_iotiming_get() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , Kukjin Kim , Russell King References: Message-ID: <3cccfa2f-4bcd-9c45-c56c-2b71b2ae4a42@users.sourceforge.net> Date: Mon, 2 Oct 2017 19:59:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:wxHfj0FPWyMiACnHZv4rfHL3G2k16lS7qmIHRV6AeyTMwz5WOyG H8kvQ5iMT+Dxj6Jz+t+Kijcu/zpul+aVo0a0qy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0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171002_105944_081722_F2F1A2D3 X-CRM114-Status: UNSURE ( 9.27 ) 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: Mon, 2 Oct 2017 19:16:58 +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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c index f587c78fba33..c18769b5f15a 100644 --- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c @@ -453,7 +453,7 @@ int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg, s3c_freq_iodbg("%s: bank %d: con %08lx\n", __func__, bank, bankcon); - bt = kzalloc(sizeof(struct s3c2410_iobank_timing), GFP_KERNEL); + bt = kzalloc(sizeof(*bt), GFP_KERNEL); if (!bt) return -ENOMEM;