Received: by 10.223.176.46 with SMTP id f43csp2083789wra; Sun, 21 Jan 2018 10:53:20 -0800 (PST) X-Google-Smtp-Source: AH8x227aZpHvO/lgZG12LoGZntvu5kO57j0BeSBkQntiS1uecDJO0IfpwuryTt+qSAXnPQN6DyVu X-Received: by 10.98.153.197 with SMTP id t66mr3887760pfk.142.1516560800757; Sun, 21 Jan 2018 10:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516560800; cv=none; d=google.com; s=arc-20160816; b=OGv4+XUJHtQBXrNy9Tl0PfZojClej3qvc9CWLQi6h9as1zPA0iMJKiehPpgNvuU1N0 CZK0uFqUZn3b//YnljS0dwlr8nRgmEgncx/wBVZViU19ybUG/nO08mydT9eZmnW5gIQa QxcqGtooxTXupAoSMEl40YqoQImHG/pvcPwql9KDbIn1ff7DUSYYlJjIjsOENJjFcs/O u+NieuAM3WFxCGTETmhQnea0KSKODB4p9ceD8CAlnxKD0qJACi9wzt3gOM0aq8cGpg7g GhxkKd8H8w3DWmfFvIEwZEIPtjp4FcxOfQyHDIK2+6UKWCgIlBi1NfelXIidCYRvl955 Uupg== 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=tzq5CPssqPG5kbp5I17zKV3kZZUcHLshwVP1+NXzUH0=; b=ctuyNPfqDsk4NWSRrtAtvu2R6m6/CrDX+NfwChU5qXs5Nb9AOUrxMPE5ggcr9zqtKB UxgH+7kSTrEoK1puGoSNwAx70gxkfFLPVlrTSEDRIIEeX8/j+bMdKR/UMjwHoq2CVkr8 og8nZJtazPPEdTp7lVZHF7fkG7w1wT5zhV7y984Xnh5Yw8hRkTr0XIkKDCi4oucoGenu nwQOaBqfRDkt0jfXeV9IzZQilGBHQMWhjPxD8k1E4Mg2RFQHp/A82i6u4ZSxo5P3nCwn mEYmBGt+G1t45wt36UhQS61fIDhj2rNyvvsklhiE0e7daZ7DPK1CJP1/ZlLXwzVoAIzX /ngw== 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 q16si13864428pfj.192.2018.01.21.10.53.06; Sun, 21 Jan 2018 10:53:20 -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 S1751439AbeAUSwQ (ORCPT + 99 others); Sun, 21 Jan 2018 13:52:16 -0500 Received: from mout.web.de ([212.227.17.11]:52896 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbeAUSwN (ORCPT ); Sun, 21 Jan 2018 13:52:13 -0500 Received: from [192.168.1.3] ([77.181.34.161]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MKrPw-1edKiC1xfk-0003Kz; Sun, 21 Jan 2018 19:51:24 +0100 Subject: [PATCH 2/2] Input: egalax_ts: Improve a size determination in egalax_ts_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov , =?UTF-8?B?R8O8bnRlciBSw7Zjaw==?= Cc: LKML , kernel-janitors@vger.kernel.org References: <52f0c32d-2cf9-bef3-4fb3-4120c5b758c4@users.sourceforge.net> Message-ID: <9010bf32-e058-d29d-8ea2-acb43f200175@users.sourceforge.net> Date: Sun, 21 Jan 2018 19:51:23 +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: <52f0c32d-2cf9-bef3-4fb3-4120c5b758c4@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:Pt1SOmnkGC/Zn/NMqsPZH6Shozxtweuaif+WBIOBcX8c+iXmmux QKzp/pm1gYb77k6tPBOGKN1EK/vRXjZwNBiWPbP5PfzDPxTD4qGVTqcf97/g18PgJWuUqB+ 3VmxwnPJwjD1A3sYy/IdJh6zY5B2LdiryzR1FPUv7joycql+0+co/YHlTpiPdlH/0sMhYfp FPCkAIIvlSiQVOKz4+Iew== X-UI-Out-Filterresults: notjunk:1;V01:K0:qKsQzrZ651k=:ozTSgrXHo3foH3wUIduStM 19q2iLhdRdmJ2FdVHOuobDHWk/EzOoNDH+90ETATiqR+7MCXCo/pgm+XVimdNRAwQKJjKSlUs aJZbLLt13cwXMVkcegcpCpOoMm7LLCYS3wU9YcrC/eDyRN+Muiz80Fe70zcVmDdaNu4QeHMLV ixsESE+1OdnEUbWspYh6kOKE+jPn+fEzBxaoPE/tCNAX+6XPnGnRIlHrUbs9/jy9tkcXEszVb shVVeCbuoauEyILu+Ek3CNWbxziSa+J8SHpCJJ0qN6KzwCrb7f4vSMpCLVOe6P8FMPJX37DjL tRBuvWIsCpYsls9s/jR37OHjKAMlMpN8vcAONZN9PnaTZG62xaWRamO6ZWxCklyxM9svFxDSL JHJGI8/KnYBQs+8k7ma5z/N3oZQ707JlJILzIv141Xdonlp5DqWwhDrODb7syoIXnXYhOYLD9 gemzQ+RTILD4NGFb7r72c6yAkT/goXilOxhjoXMn+YK0oX5nOk7MT40HlNDFkruU0S0kR03rq vrrOwWqrBaPcageoL1pzfyBA1lkuoVtBmWnBFGrr88Xj/QpK3HrDi1WwkedUjx3beUfPxmvNK S4Yy3kh8Z4rBmnPeYwLohdphiPgXU73PJBoWRsKsAC1z+hVV0xUgclWn+Kp6RLdJWeo1w5HS2 u0EGO9Ruz6aY6vA9c9/fO2ZVMgCNLFBHcmamuT1ceRT5lXtGyN9YhSkHVLUPLR3XYrVWLCPfy knfTcvoM9qeXAR5DSk/+qZ+3Azwq4z4Q/vUAQ3lfnPDsqqRZnTekiXrGj6JhbjOOU3d6LE1eD H/mRDZ3xPpGQJgCoQgwoLpZXpJnGPcN6BUwD6GAcwO00H1gaVY= 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 19:40:30 +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/egalax_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index 29ec1166626d..da8b46ee2c1c 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c @@ -171,7 +171,7 @@ static int egalax_ts_probe(struct i2c_client *client, struct input_dev *input_dev; int error; - ts = devm_kzalloc(&client->dev, sizeof(struct egalax_ts), GFP_KERNEL); + ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL); if (!ts) return -ENOMEM; -- 2.16.0