From patchwork Sat Jan 20 21:00: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: 10176723 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 755A36056F for ; Sat, 20 Jan 2018 21:00:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65EBF205AD for ; Sat, 20 Jan 2018 21:00:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59F0E205F7; Sat, 20 Jan 2018 21:00: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 EEDB4205AD for ; Sat, 20 Jan 2018 21:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756667AbeATVAV (ORCPT ); Sat, 20 Jan 2018 16:00:21 -0500 Received: from mout.web.de ([217.72.192.78]:63079 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756642AbeATVAU (ORCPT ); Sat, 20 Jan 2018 16:00:20 -0500 Received: from [192.168.1.3] ([77.182.145.92]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lo0dI-1fIff80lOC-00fxxc; Sat, 20 Jan 2018 22:00:18 +0100 Subject: [PATCH 2/2] Input: tps6507x-ts: Improve a size determination in tps6507x_ts_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov , Yegor Yefremov Cc: LKML , kernel-janitors@vger.kernel.org References: <1ee278a0-a855-cfb3-fd04-24034ec42a65@users.sourceforge.net> Message-ID: <61c1f15b-64aa-8bad-6f56-9607590421c4@users.sourceforge.net> Date: Sat, 20 Jan 2018 22:00: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: <1ee278a0-a855-cfb3-fd04-24034ec42a65@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:sRMK17QbZzPDa4iGgztjo8psEa5TtyhSc49+fEvRZEgKaYKHkxE uqhzS+YeugyWaDecCgRG48rVVYPpZX8ZPWQtBm6mZf9WmLMSw3qHc0t6BXx+w7n+lmlgkBF ZfBa1p6mw2xJg3hpHLpnqjUsQQTbZjiqFLNoiVdevpUs6Uw17KBtgtGNPxOcwunP/4QTI9J i2J1teiA+WDCaVby2KMUg== X-UI-Out-Filterresults: notjunk:1; V01:K0:362qCao7lTo=:wD4hS1NPxitoccgMpkewS0 eetVBG/v+yRQxCNiQXkZtQ23ewiROkVCFt7ghvqG/5rcqS++zCkVcrlsYouhIMr01Mq3+K30z ubjYUmvxVUV1d4+2b/x5sGVtHnkyWT5fOeqiQ8SsIg2ad7y9i9XX/YpwhLNpcvGvT1lBAbn+r Vxi4Dcl+S9wgl+Fp3ga934VbxHYTOO/D/kpOEJA6amq6VWmpPdirBeII7pWI+qfwIdtWeOTaJ Hnmaov4eb5SXx28Lt/6Fl5a/L+gmDbRLXq+vQmFyBVOC6YWDza7R6VOoWXLM7clGWBPU3Uvio 1qzxeA2rrzXE3Qtrh2pzP6/GxX8R9jv7YL2wvsSdubN4KjR0F2dFJUNbamFd4b8i4ZiKVv0RH SjmW7QtaohP3nEMdEKqdWXHQIk3XgnYBAkDEimy92NlBq4UJB1SU0uteIdcfFdSZmxQU0Tgou 8pTb8r1j+goNyEtQ4AvoIa1xKncDmxlaP3GwzLHnea+/f3Ce+uzt75H9bI6GirEgXZ67KyTts FdilmUsAPiqTuOrny9LJMn81fUlicZoy/6amDwnxCPteCgUqDXfsOEOQnD1/zAUYye6wvN3DL EiIZCMskX9oR0Nj/1edOzcpkIdROzCjIjHlvIOXxsZZbvYk4AyWcCjIZm6DhRmx2tRhDokhgn x4E7MDMGUti7MqxjrfVTv7hTK8A1JwYQM/2AOB6buvvDxAfrfasQWgC46izxRLDljlTDg8Xyf wU+HdeE7IfbBspxi41seX01/xB8sQ/+9aVsNNWTIkl+yJgHwJ8cibaFjGtKG2WbhBrHeRoyza NtvKYXpv1mCUmEuG+gxYsNdtBEl08wWMv1xb6n1hJ3aPVDykHk= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 20 Jan 2018 21:47:16 +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/input/touchscreen/tps6507x-ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 5b2756ec1766..83b24e202d8e 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c @@ -226,7 +226,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev) */ init_data = tps_board->tps6507x_ts_init_data; - tsc = devm_kzalloc(&pdev->dev, sizeof(struct tps6507x_ts), GFP_KERNEL); + tsc = devm_kzalloc(&pdev->dev, sizeof(*tsc), GFP_KERNEL); if (!tsc) return -ENOMEM;