From patchwork Wed Sep 27 19:40:51 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: 9974629 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 110216037F for ; Wed, 27 Sep 2017 19:41:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01C13292F6 for ; Wed, 27 Sep 2017 19:41:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7C1729311; Wed, 27 Sep 2017 19:41:00 +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 0F9BB29316 for ; Wed, 27 Sep 2017 19:40:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751263AbdI0Tk7 (ORCPT ); Wed, 27 Sep 2017 15:40:59 -0400 Received: from mout.web.de ([217.72.192.78]:51007 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154AbdI0Tk6 (ORCPT ); Wed, 27 Sep 2017 15:40:58 -0400 Received: from [192.168.1.3] ([92.228.186.72]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LdVza-1dWAas2gT4-00ikqV; Wed, 27 Sep 2017 21:40:52 +0200 Subject: [PATCH 2/2] clk/versatile: Improve a size determination in icst_clk_setup() From: SF Markus Elfring To: linux-clk@vger.kernel.org, Linus Walleij , Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org References: <66ff55fd-caae-9c98-197d-f6c3fe7a9c49@users.sourceforge.net> Message-ID: Date: Wed, 27 Sep 2017 21:40:51 +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: <66ff55fd-caae-9c98-197d-f6c3fe7a9c49@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:Jd20eaTSrWby47mujSu9fZs2Qr4s0sp6AVjPmzS6vS8VgTOxuZO sdJyz3BNW+HNE04LocFACXdjpUjivlOQ3qSjmKqXwcUS5MACTnPfE+oOlyO6wzyHdOQkgvQ 0lGqWA/Bu+z17QfbKkZRCg1Vi+1w9uO6LxR67IupVG1zTmi8oTiSmUvHqvIfSHttY59gyNK Tq/7MwAo73o2apdPsnysQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:FGVH1766Dk8=:DJnB2vOu4OflWQ6LQU20hj 5MKVVDKLuhfK1pYP1RDd8J8cAPfk7BtwrBMkRGfJ4GY+qeFGGsdRM5GVVcyCiPiOFNIMqK3qQ DreWwgXmhYtWCsOfCgWbi20gzDj8bzEafwcxzlqLDz4OVN1fkM5Sp20UzAVBbLTVaviPhjolm 3li8074mfS8ph88OeBuM7mlj9gTrgX+7/+p0ypJQrv5ydie1LOse1s1Mw7frzAknIeN93Fn8r 2TXFVTVTWcmNtSShBcomTEjOR7IXclXtcuyQKBYpvSZ/nZEddzSfLglEagrvavfFSzhDNICs9 YMdyTyeIqb45QTDOjZymBDokuM7m0+nEDv5NBo32C27PMBOHx8Yw4gr3RMo/CmRCcQa8YFAKB xJYLiXIYCCBByUblgW1QepFQnMBnscEd9AVCsrSryPeniDfnVaS1hqwiS6+LFTmTm8wLNZua1 aoRcb72VklLXOBJCc+qDr+hetxn5dr5deJ/GXGnPy04WPbD0A2qyOYx+1xqVD7RVi/MXy7BC5 iM7KL2uyJ9x3LkhrnMVg2JzpfmA5z54DRaO1ItUpdYijX1rD5tssewRBcsyITQmWqnI2528cm RdKw9lA/eNVNArzjQ9HUqJh60FK60hmVNssJd+e6IOhaH7R0OyVIX6G1mZK1H2dkRTL6v79sG B3XH3pdS9dRZlDq85foPnPTWGUQsq9CHeQuzxiV2zvj0ocBHoBFK6kih+7RRwDxOPCFiGWUm8 XtfHIaE9gjpWcYfMlFwbFwTqj8k/ROj0sr3mEUoRNRGNwQte9CYNWcUEPXrsv6/j+ifeuMQDe GyFPKCyaB0zP0A/+4d/YJSPsVGcYHvmTt36OgShOkgr2oiAmc0= Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 27 Sep 2017 21:24:43 +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 Acked-by: Linus Walleij --- drivers/clk/versatile/clk-icst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c index 20ab4ceffb28..dafe7a45875d 100644 --- a/drivers/clk/versatile/clk-icst.c +++ b/drivers/clk/versatile/clk-icst.c @@ -359,7 +359,7 @@ static struct clk *icst_clk_setup(struct device *dev, struct clk_init_data init; struct icst_params *pclone; - icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL); + icst = kzalloc(sizeof(*icst), GFP_KERNEL); if (!icst) return ERR_PTR(-ENOMEM);