Received: by 10.223.176.46 with SMTP id f43csp2121472wra; Sun, 21 Jan 2018 11:49:50 -0800 (PST) X-Google-Smtp-Source: AH8x224RqA1V4datOHnuT7qF/IHJD4YPKDxkM53f8kpwNxbQBJ3CXtuhPMpZ9k8G7MFvBm5yE0op X-Received: by 10.101.82.68 with SMTP id q4mr5101260pgp.369.1516564190219; Sun, 21 Jan 2018 11:49:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516564190; cv=none; d=google.com; s=arc-20160816; b=ds1y59xelsKOKVet27icQYokO9M56SyKpCiDu39iVvPdkEd7vIMKGKhG7B5X0ac8pL XAN0dUZNHTjo7+RksSS5Iz7yj+t/zMMVysTSQUBwNpnX1HT2XIe3aFZbhgX44CG/RzcW 5fFpMi0ANCy7adHMWpbCq/su9U1RZUSZxi9/sdoZUOM8S2QdofgedgkaGbOymlNJY0Mp Uci2fdzYK/nS6ZzeqhspeE7FLJyBaD1iimGRrBE7gSCEB7w1Z/LDbLbnTnWEQBhPD1pB kvegoSqHWe1Sm8ttOrKN6plHwPrrQjECfB+hqFtlKXsvV3IirFr6KCrsSa4lf2ROWh3q rorA== 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=HyUvHV660Tg4iEO/qvRNcwxje7s7y1gQ4NX/JI9FguQ=; b=jd0wCnbwtXSZh2sp/AYswfx99bNgVP2E4rhkodyN5xKOt+8XeoCuGhypfs76uD2nv6 yJYF6REk5VBygwHmvxguCbXRddFmi+bgP7ZDdDKX1QtKi0fK8bnqUm3yD7wy5r356eaa cC4oS54jbl67PqJb7jZaZwcC90IC+qlMHACs4jKMJs67105obWCqFQn6c0gtw4dq8vQ6 NCN70wZ9mjX0BLgmyVTO1jESXefLhP6GZjuEQCD7RuILdEGUf0kHIVEmB3rtRXLCv7pU 6ddZfTQLIt3e00izlKhUN0lSlw0RIAhrR1bo1oPMmZli1rUFCVrEFUk3PyispC+LWUQo cmEg== 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 f25si8153266pge.163.2018.01.21.11.49.36; Sun, 21 Jan 2018 11:49:50 -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 S1751092AbeAUTsm (ORCPT + 99 others); Sun, 21 Jan 2018 14:48:42 -0500 Received: from mout.web.de ([217.72.192.78]:61359 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbeAUTsl (ORCPT ); Sun, 21 Jan 2018 14:48:41 -0500 Received: from [192.168.1.3] ([77.181.34.161]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LfRnJ-1fASRL3xBx-00p4oc; Sun, 21 Jan 2018 20:48:39 +0100 Subject: [PATCH 2/2] Input: da9034-ts: Improve a size determination in da9034_touch_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: <44ae37ef-deaa-c963-e0f7-c407159afa0c@users.sourceforge.net> Message-ID: <8e27d655-4f18-b156-3d78-a12b28f79b5b@users.sourceforge.net> Date: Sun, 21 Jan 2018 20:48:37 +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: <44ae37ef-deaa-c963-e0f7-c407159afa0c@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:bS4xSooAdosw05Yi635icO4seRePi6XXofA7ZHhCXD76JlXl0Mb Y+4g30mGNcI3Gk0bd2wsxESc9pWCvjEFx+Qg00wJ7OXoecXIvLxnlnZ63RVd3pCbPBVoMaM t8ToM1EuCmwOfPW6UsbXET5VmtIueCXO/T4dGZ6eDfssCpVeD4D1BlNH6WNLJIqCtIub6d1 6z695WGfaNgkNhTP307HA== X-UI-Out-Filterresults: notjunk:1;V01:K0:4dVhHl6OBnE=:g0tyaTRQEKCAqdflj9Rc6o YssS08epIhaVLraWKgHKSBonakzHxzj3JWOyODSt+zM3UdhVa7KrN6lUVrt5vuDa9z3zL9tBX /ASXAbwv1+OWVtIIEZMQ2jsbLelv9ppcVDGL2cX2qinSgALeGfLohZ5jQG+pdFKexOiFIouzS vVmvh/6WY+9rcrQ1OoDQzJrSLTXqpZQSmwOfIlI3E6ljJFS2ZDKV0EeFDcQMh7I2oPGem4T40 BL7sVjvxpjwxfpAZg8TJfjj3JJNT1NhmIKf6jzJu1fSRAw5HhNHQo53NpmAIAyEoUhHYOJiT9 lt6wMHiMXDP81HzQ5uFlW1dVCDF9r3O3c+55JxKLN9h4Y8ITd5SeuoKYYdJ3X6hjIL7iCfshi HbLnBrJxdzmZlLHnF9gz0NxgI5pzgl02WYXwdvhe7L+RMEhcabnTRyp/ffgvwtDwTOdFsFHRd UVEd1ppzoBbeHJeOn8B9XR5COKIDngrTKRstMvFfaXRfv3sP58Hwbb7trBLHe1Q3xjIMwUike TkIt08sANZrxpE0TBh7njyRcbn4FJpf7Je8MQuqq9iD26SW4sNmCcT2Fl2b54YAFOFxro3enq NpECPV3Td6UER+29QKZV7bbLDckLWdxatXYmdxTG5cPt54jodIxPDZ7pS3I5Ew3FjxNJUiMxb PoUHwB4T2wI/jlYduAG7S7/0PRfojmj92XrUTjjyC/d7nm2ACF5zuTllvL6lSuqKATiN3LJ/v +TLgvZtG0exOo1Nu/798+7R0YGQmjyGcrmJFmqwNPJQ99H9zj3JLCKwUatVp1kaQvqgBdb6ZL 3+jX+2pH3Y0QsVj/vzoOPxg5HKi5qPlSQqLZYPoshroYBxVVkw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Sun, 21 Jan 2018 20:36:20 +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/da9034-ts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c index b30cfe1e62da..c9c423aebe1e 100644 --- a/drivers/input/touchscreen/da9034-ts.c +++ b/drivers/input/touchscreen/da9034-ts.c @@ -303,8 +303,7 @@ static int da9034_touch_probe(struct platform_device *pdev) struct input_dev *input_dev; int error; - touch = devm_kzalloc(&pdev->dev, sizeof(struct da9034_touch), - GFP_KERNEL); + touch = devm_kzalloc(&pdev->dev, sizeof(*touch), GFP_KERNEL); if (!touch) return -ENOMEM; -- 2.16.0