From patchwork Mon Jan 15 13:16:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10164187 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 B15BB602C2 for ; Mon, 15 Jan 2018 13:16:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE3732679B for ; Mon, 15 Jan 2018 13:16:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2BBC286A1; Mon, 15 Jan 2018 13:16:25 +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 273972679B for ; Mon, 15 Jan 2018 13:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967303AbeAONQX (ORCPT ); Mon, 15 Jan 2018 08:16:23 -0500 Received: from mout.web.de ([212.227.15.14]:55741 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967615AbeAONQV (ORCPT ); Mon, 15 Jan 2018 08:16:21 -0500 Received: from [192.168.1.3] ([92.224.130.50]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LgHf2-1fDQ6o1V9I-00nlO5; Mon, 15 Jan 2018 14:16:18 +0100 Subject: [PATCH 2/3] mfd/omap-usb-tll: Improve a size determination in usbtll_omap_probe() From: SF Markus Elfring To: linux-omap@vger.kernel.org, Lee Jones , Tony Lindgren Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <49a9d036-ab90-4342-90a8-db63e027017e@users.sourceforge.net> Date: Mon, 15 Jan 2018 14:16:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:xnswknvlHp0fjQ4AwBheGUjZ75GDY9n9OvZMToCmoqa03HIH/Z9 OxVebMxIQGgO1EGXvJSz+avDxu9gGehJP2DbqRq0nCOWV3MtI3k2oLEyIiWGXwaEZ75lZ62 qHRxgcyDMXyQUPtBhmqvUsZJrCwEJopkxeY2jEjX4ujf3Y3lySqDKbET/cqv2ZalK/QV0vK 302xwnIFQgK+Ul2Id3nfw== X-UI-Out-Filterresults: notjunk:1; V01:K0:6nqHUZigjbw=:dXd6INjRHFI00GH+/M5wxU Iah5HWVhVkVwq4khlLG6jMMQERJrmwlHyblGk/4tb8Ejy77MB+uyGemVKHKfuGs9HG0H9hO+a MzjrTidczvlWji5l4t75MS68kDdyLhTCwFwuAOBFtPhv3SNXB1ggSpUbmaTjHEjvtzSMsfvtg NFEUutfpjmL15JwXZPy1yAX6RzJ+MlQdbaPOANP7AhMZGx71mU8bDw70XhYlxzrV1wH4+1cp6 ZIEe9ZB12mLjkGWj+RuqhbHenFP+7DpY8N0RipzH5bB/o0gRtf4RlBzzMyBKh4pck2+rhc5lG m3dMtyeuXdPN5F8b7QBaKMzQ7lVvQgbx6zzofm9lG+9LlSk8KTeblP2nKG/P+ZkCMo3q1uhb+ fdqNqTHY4lQoAfxo3v29j6njktJ6/n7uBCnshmxRjZWIOrmEPnWhu1UOSzEidEepQDj15We9T hS/CfOdhtalzb5Kh6GVhJIJ+6HDc4x+Gihx1pa/OTYt49mWCT24V+x9DCgeuIMiYI48JKeOBH /Z+6O2JLAAp0SV4DuM9mGdQbHmviiMjRBtaWKj86GQiOrAZ6+AdmFOuNr7diDqJhHnwZ/uqsj rUv69/TIZsBc0sKSFNTCNcpJLPDNyoWQKMKIdAaXupBUIFlqds3vnQCz3wKAmLVa3gGBDlqlS XItjTTOjWHF5nCC3rM7YJ/YWsYWv7UKsLMI6WKALc50uqptPW9AHuw4OB/80eOhHmk7aId6F2 /doz9vz2q4BNcMw+Z29SMQwY4g3TNqPsnZbzDt0Jt6sx01YJ1NBzjUC1p0Ix6N91m6J2lHIpB D5lM9JCJw1OfEYOsPOJYNZdmCn+zX9IArXVguDqGbAL4Dcu6os= 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: Mon, 15 Jan 2018 13:43:53 +0100 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/mfd/omap-usb-tll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 7945efa0152e..c8b4ad40910a 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c @@ -220,8 +220,7 @@ static int usbtll_omap_probe(struct platform_device *pdev) int i, ver; dev_dbg(dev, "starting TI HSUSB TLL Controller\n"); - - tll = devm_kzalloc(dev, sizeof(struct usbtll_omap), GFP_KERNEL); + tll = devm_kzalloc(dev, sizeof(*tll), GFP_KERNEL); if (!tll) return -ENOMEM;