Received: by 10.223.176.46 with SMTP id f43csp1195704wra; Sat, 20 Jan 2018 13:02:55 -0800 (PST) X-Google-Smtp-Source: AH8x227jJ8mWSJThfOrph0OJMfhjO3BS2dRYd8KZDei4a0JUdp+DB45/FCIXbB2HgPdSQ9WmtvvY X-Received: by 10.99.179.9 with SMTP id i9mr949008pgf.337.1516482175330; Sat, 20 Jan 2018 13:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516482175; cv=none; d=google.com; s=arc-20160816; b=kGopdodqluhH2L5mtFWSfhOVG1IY+Z0xYgQdsbY3cBO1IzyRifnc/zA1eG4vw06fu1 CbBvA1xiV50Tv2sbRVP9lq0cqfIa3BqTiPkb6craCWQXLLU199HtH2Qh6c9PHf89V43o Lsd9XeHbrlbrh660alrDqxeqL8BYgW6Ea9mf9oItRT4MBjmgfVM30BOEjfUMUONu4k+o jcDtWcGXO5Lnr9fejAtHozeeyD4llznp5bxgsDTP3Vc4FtdE/03oyfrOfQGG8Mu2I8Wq erI8T4cg41FWJW4dvOfjSN1/Gg8Ed8ctNa4LZpKSt9SsgM14eSrzrxRnbw7VpVnio5XZ WNYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=RbTu8ZU4jT/mTJScGvK20MdSLdyOqez4oUJfdQMXRaM=; b=wukPyhlopLJnc2JM2d6txg0EIrnFQXBKuDSdg6Ne22satEcpgnVSSWcJmrP68adOHe ceFl+FSHdYcovRfY0lWJMrnUwRFL6pc1/y2CPLi64CZpsqYJZ16elDNtZ9qyQ9Jbrcuc bTuZ/oTrs4W1wZi90ZHJaXb6qTm/nA/NgCduYLUEL42f1SM9blJOS7th38BIwynm8ZPj FB1f4N+kJvV4l5O7XkKPN/l8dvd0hhZG/8vgF9E5jhpzg4YniJ713tcPyzgCfGzb/MKc +yEQGK3XXrm0eHMM/3ZD20JrQ9tHWJwTYuY+iF9/tK5hFsGCIayaXrZYPhfiBhFsafBP MKmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si1990564pla.149.2018.01.20.13.02.41; Sat, 20 Jan 2018 13:02:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756718AbeATVA2 (ORCPT + 99 others); Sat, 20 Jan 2018 16:00:28 -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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.15.1