Received: by 10.223.176.46 with SMTP id f43csp2552602wra; Thu, 25 Jan 2018 11:38:01 -0800 (PST) X-Google-Smtp-Source: AH8x225Cy0z7Ja1sg8bc9bRD7ebVUW+LQcWLmhd3u9LigpxA/MqFmt16yaOWnaI4RnTJuYrWWYvs X-Received: by 10.101.101.144 with SMTP id u16mr13635379pgv.73.1516909081020; Thu, 25 Jan 2018 11:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516909080; cv=none; d=google.com; s=arc-20160816; b=Vw/79DHeu1gr1/uV0OSdV2nuptTNvb7gfA8cqpvplcAtRgbGuPOjh+qOgIh0SOgEz9 UUIRgwQXv6N37LpPTVzfyUUmNuyng5sK/zJ3tEXQv6w5YP1HIv/LhdrJ/ojs0VO1IHqD toDdb714f//Yioxv/2CVGBO+scjrTvbDv4cH+jdpITnz5Bqpsw1jRKPVNiiFDLQNkuNB DfWFR7ezoeRNJ3yNhCMiALzO2H2rugKiTY4rw2duD3INsQpmt5+PbIwRN1qn7R36o9bq XHO66+bRgJeNeHPvnVV9V+uZukdGsR5zs3UuEDjpfimrsoq3gDnO5eSxel3E7L4OmGhU tMtw== 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=c0aA/WzU2mjYifGKxWi3sGIWHkRTeV4hoOAe3UUmTio=; b=k1E5XK0BEhFVTpJbh05u9InQDXrBsdUVQ6lXVMJdtiEH3oePYRL2cQ84UCYP8BjK7T NEoDsjYs/APaVJgQdQloJQcDys1qj73wpUP/a1GD0utnQen++bcPpH4dJaqsGRVz2CKg t6tpJWs9UaSp0tG1Z5McnBDFJewCWZOpHH9KxsTG4fVLStQmdU5rQjSSD5SeInvNDoaV wUMNtSOqkFivfVnvZ8EmFDRCWlmk+r7iucTtna28eLPsQIE7Yl0bwNz02AO5E9ZxowjV oTxIyH15JTaU2t1DU3E8Mf8ssX28inF2IN1pBRiXwR+oSx3aYRC3E3X97dc7S14TcVNK rO4g== 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 o68si5049584pfk.327.2018.01.25.11.37.46; Thu, 25 Jan 2018 11:38:00 -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 S1751405AbeAYTg1 (ORCPT + 99 others); Thu, 25 Jan 2018 14:36:27 -0500 Received: from mout.web.de ([212.227.15.14]:54273 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751174AbeAYTgZ (ORCPT ); Thu, 25 Jan 2018 14:36:25 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lzaxm-1erbGO3sPa-014mYD; Thu, 25 Jan 2018 20:36:23 +0100 Subject: [PATCH 2/2] Input: da9063_onkey: Improve a size determination in da9063_onkey_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, support.opensource@diasemi.com, Dmitry Torokhov , Steve Twiss Cc: LKML , kernel-janitors@vger.kernel.org References: <9b0e8f6a-6386-d307-34fc-7936c52bd0c6@users.sourceforge.net> Message-ID: Date: Thu, 25 Jan 2018 20:36:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <9b0e8f6a-6386-d307-34fc-7936c52bd0c6@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:K5BNWoEUJBOQ2DsQhaCbanziCtoae2okfT161AuPQn+ZdQuD2vR JInwPifvd2c68DewysQ9Ph03cZ2e8AKQ9kFhlo4c/M19Csw+No+u4uKmvf2QTmY7DeEICgT Z2nl+EtjTX+8iwa9SuRXd0iVvL2nFLYfDL5DWqSaPm3+uuCIpJ3P1lR/j3+FCMJf9xi+reN hzJ6LeDnVVGDYm19/imRQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:UQWtIo0Xf4c=:knYXGZIHevmQrfpn4DTblw U1m8oTliqEXxh+doW8RfF2KEOIAfsxnL9mn2jAryRhCjqs97w28eOXdI7KLtYh7YzTrTcrHv3 VPOB1JFJp7JgjV8xA9mgE7S+a+Ozmx5PISXybeZmJzFns1D+DDPAn+wUR9tVNOXdabWUTE1n5 1p9u5WP2Zh5ajozT4Hm7uQ1gZ1b68uLbY9tIvk5LWEZ9HhrAAKfwbQ27TWISYVQm4KFmFWo75 x2wqpNlYewWz8ilNR/3WPSX2HfKKw3Thh60vwjvt6foCmtg2bDoy1g72H10Qqw5Zr5GgOZyz+ xBCJB2N2mgxMhYUi1j6rp+f3TgUxakm8JsRJhzBHSE2zvIozuxXoUoBpFX7wyDQQCEI1t6Kh/ T/25Gt5HeXuSzpWHhTg2glY7AfM/wvxB37bANzINgpH7FPnkr7rznjoAtoR1MmS/LLJ26fzTL 8IhgtcqHKrIN7S7PIVqCEw2InmNf1wVqR6olb4qQhsuCLw6VJLCUqcaECvGhPCkYk/QKTgiOh C7RkdPNOlEzuSNnK8W/VqYAdn8lTvr03Xd35P0RZRLwGKEA1iJ9YG/GS3PoNyXKk/ExvB/G+D bhQAI0rOQgYtBDIELgm3OxKqvVYaf7Jbkm7uFEiIzIUBjHb0LzGMMpT3FckZL1kpAAi+uxGt6 SCNvKNxcPKF1KRAwoOENidY7t8Vsax4TucXIOGyK+BHsByWivYdeFjKP4AEkRlmgZwqiRZhNf DVbjorS37lH80yMDlhaLNFDU084gzNTT0jWLPPqIl41Q36FsMppkOiw8MBmVAKFtNwhbe1Nea 2Q7F0ZwfjrmNb2GGI9wup4wBMPnD/95Sla7gsIyl0V/sZn1ogw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Thu, 25 Jan 2018 20:24:47 +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/misc/da9063_onkey.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c index acf592975bef..310f9c408636 100644 --- a/drivers/input/misc/da9063_onkey.c +++ b/drivers/input/misc/da9063_onkey.c @@ -213,8 +213,7 @@ static int da9063_onkey_probe(struct platform_device *pdev) if (!match) return -ENXIO; - onkey = devm_kzalloc(&pdev->dev, sizeof(struct da9063_onkey), - GFP_KERNEL); + onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL); if (!onkey) return -ENOMEM; -- 2.16.1