From patchwork Sun Nov 26 14:17:34 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: 10075399 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 1359860353 for ; Sun, 26 Nov 2017 14:17:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0536727853 for ; Sun, 26 Nov 2017 14:17:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECA2728956; Sun, 26 Nov 2017 14:17:44 +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, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 943B527853 for ; Sun, 26 Nov 2017 14:17:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2EF089AC9; Sun, 26 Nov 2017 14:17:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.15.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1CD7389AC9 for ; Sun, 26 Nov 2017 14:17:41 +0000 (UTC) Received: from [192.168.1.3] ([78.49.168.181]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LcUIo-1f1P6P36uM-00jpJK; Sun, 26 Nov 2017 15:17:35 +0100 Subject: [PATCH 2/2] video: s3c-fb: Improve a size determination in s3c_fb_probe() From: SF Markus Elfring To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Jingoo Han References: <2c837da0-6b0f-12e7-4d76-960b660a8911@users.sourceforge.net> Message-ID: <3eb68979-60cd-81e2-7a6b-9caf4afc1737@users.sourceforge.net> Date: Sun, 26 Nov 2017 15:17:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <2c837da0-6b0f-12e7-4d76-960b660a8911@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:F7V24WDdoTAO9Kv+AJnBp3F8kETErOJ8vjVkEmCpbSVAfNUaaSu ofKaxdsdiM4NrL6Ofrkf+DdeEe+zGaSUktq4XTf+J7/9aSIXGCicq0+HYjdLKkWEVHP7OCO lmAn8anuoAVrbSi2hgCh6b4iBzrJsWMJpsrH3wuG5HWzDeQqnrq0mj7Par+TPJCB5kVMzmN Q4+bDml4KH/nufWXuJ/5g== X-UI-Out-Filterresults: notjunk:1; V01:K0:lWeTeJOtK5s=:qDZdEbI51xDPPkXTExFI9t YGq3LPiArlXikEgG/sDZN4o0tCkV6XSyQ/hrC/YDifTZYMBtHfbrdhSJPDjjeH9cgT+Gsh5ug PX18/p78zg62D4JR+WFcm9mIFz3vPeLkH09vd3fiEncMoLrIeIARsSrNc9qcn0NzvOGjLP/cE lx1dyxBeXdM9wM2phG1rtLF9w2G4aEtY/aUEXu+mahMyWvZ0BfWo+ZioiEv75YmuYDrdb4xgG iBRC4Zu5weK14Ermlxviw+xIhFCMQEo02FcaAayPYQVPNJnEL5eglWLRExj+lWDZ8yVpZ77Qs CwuFmXHSh4gdIZ3P8pUGlroePoH0hflqZBkLIouZOSdfx/7S6e5M4PY2rocbuN1YDpZZltjg9 Yv5nEKYoUD5aDVkwb+gnxD7JNEphiCOPhwLm1yqt5yIhHa81JpOu1Zw+E/7dBFeIyTecBdOpr qzB5FqCyRVZ7ko4+e4XJqs9o6Bt2UpoauAHL2u+v0dGzJdKqDsDHiyCVw4uHVKP64z1aZIBjl 0spRoHu9bbhb9+3F5fq8rWHBLiOciNRjLKyuXIEQKUWS7mHVVlBxD/KSU10wO/QyPpUXtVH8c Ropt9DgwYxBEVSGZqDZm988HYrsLMkQbpknyPAjghXUtvjrTOz+p+E/cwSCuq5GcE6zogYHzW oGNXt5X/PLJpaeVI1163Gb2Pwr0IY/w+FHLXVFcE/tDbagNb/OQsXay1QTZmJFA6JwtfucRXb LdHR4Wce7nR1qqScvJZ0G5nwG2bgDh3CTeQ5MsvUlaNe08ElH0ItPZIJooEfmVNlaoBlr+J8Q E3Vhm3kIOX3KlPbCZr5aUHZGc2R9xfcHcActGYy5RI2Rh0Rzes= Cc: kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 26 Nov 2017 15:03:03 +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 Acked-by: Jingoo Han --- drivers/video/fbdev/s3c-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/s3c-fb.c b/drivers/video/fbdev/s3c-fb.c index 0914c973cbd9..8c7623d63eb1 100644 --- a/drivers/video/fbdev/s3c-fb.c +++ b/drivers/video/fbdev/s3c-fb.c @@ -1383,7 +1383,7 @@ static int s3c_fb_probe(struct platform_device *pdev) return -EINVAL; } - sfb = devm_kzalloc(dev, sizeof(struct s3c_fb), GFP_KERNEL); + sfb = devm_kzalloc(dev, sizeof(*sfb), GFP_KERNEL); if (!sfb) return -ENOMEM;