Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751800AbdI0TlA (ORCPT ); Wed, 27 Sep 2017 15:41:00 -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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1014 Lines: 29 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 --- 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); -- 2.14.2