Received: by 10.223.176.46 with SMTP id f43csp2298071wra; Thu, 25 Jan 2018 07:50:24 -0800 (PST) X-Google-Smtp-Source: AH8x227AaVPMMOr8SXSlVNxWKBsFsr+Q1fXZf3TAvuMRP08pvzibqSBNh739XltPCfc3Spw5rBRT X-Received: by 10.99.112.75 with SMTP id a11mr14066988pgn.47.1516895424215; Thu, 25 Jan 2018 07:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516895424; cv=none; d=google.com; s=arc-20160816; b=yeRMrJXFlRTSTbZNFpvyDC1/7nkGiC2yeZ9n7IR7vOkeXgh600/LiMHkLFxctfr98n b+CaxNvJbhFCPcAvpwfuAq3bpvPpv0R+rcuZ7ko/M/EdxuKRL8I8kDhK6wppZBUQm1fm eCu8HdVw8OykVVQhl4SAtMnomafAh49j2IU+TmDt4Gf4HNp2AQPjhSG2hJI3KRlyH1iB TzYVoT1kVrRymOsFzane1RAm1b2hk8owcQru8ORtbphUjylDoBx9k4zMK3DtrzBtfl1S tyz6Zt56cMslcemtInGnHOs/Z4OZuCtw2J3PKYD8sFKaa0c6GKXBsuRAHABvBK0z3c/O t3aA== 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=a1/fFOmvX7GYT70NJeSyLHUnwvm7pqVxQGvwjAAtojE=; b=G6ZwX1WV6voR1gkEboZ/egKMfqJiqAFejitqeEORTmsy+p7vKZ9nQ06QhT3CgHp0YH FjmQIf7oOSQph5G1rRqq2QSL+3pUkT+COPTWiOZ4zyQzkbrCulm8h6d+mRSnmzXn470I EqZfhf1LDutOoIWGXMLfy0b5+EuGzqxVYf8ia0k776ORLW3FhiQvh+cR68pF4ojUQ4rn 8rlIu6ontPY4t7vPt3ppkJ7BTkf19o+y4juFvXtjx1Kk/FgWe5GMt6gB1l9Lhf/rjiEV KVxAD4cNAg1pVhxD3FDBkDWYMLKmx+sEDHB/qbIreuZDqg8qvk5I/5wvW29NJMjyvO1b V3zQ== 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 j4-v6si1296922plt.556.2018.01.25.07.50.09; Thu, 25 Jan 2018 07:50:24 -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 S1751291AbeAYPsj (ORCPT + 99 others); Thu, 25 Jan 2018 10:48:39 -0500 Received: from mout.web.de ([212.227.15.14]:50263 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbeAYPsh (ORCPT ); Thu, 25 Jan 2018 10:48:37 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MXYTG-1eKGXs0N8g-00WSmm; Thu, 25 Jan 2018 16:48:18 +0100 Subject: [PATCH 2/2] Input: sirfsoc-onkey: Improve a size determination in sirfsoc_pwrc_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Barry Song , Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <07e55fcd-8ba5-bae4-0d05-34ada8453a47@users.sourceforge.net> Date: Thu, 25 Jan 2018 16:48:16 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:rn/AEhe8S0KCwKm7tjGakImX+erekl9dAqZYOBFkNU40rPa+PnS QyPWCab6MveT9vkfTXu1BIpdpzOftqOfNflJwVzv/Pyq1hSS/j77yO+/ULcAXcVL31AX25g EYiqp5hOzB11+hEuRifA8oW9dFt0QQsPmNfH+OscMt/xiEXMjol+S+6RzOKMK9z19wyOaf/ ykrTNskUHqzOXLWRk26Ew== X-UI-Out-Filterresults: notjunk:1;V01:K0:jiDmKO8B0ro=:qomiN3GHS4ZSipjiURaTD1 pDDGji777RUz8MI/kfs4xWc+KeZzW4Zxqgy2T3vpal6UxFSSsCqHe9Q8sNH0rtAcTa6h8O8rZ mYSJNg0o0h3iaYwRfAje79XA9V9NSly9JLrUODEAIMDaP0yHUeJt85/A+QEUKgGWeu+YSFiNt BM+AFPD4MEouoBzrKgsfNFrF79H9fXyd293kU387F1nfXz5xxU+ksdbOh9ke+1JgqrwX9sz8n Oil84iIV1wyHSUl93xFUxXtdmuW9kBJvtkhlLAtvlAOfaO73h5RLfJx04h869myrTuPuHJJAm +uGsTMgk8lwKCYLIUISHQzjwRSWocJXyiz79rgurC8C5mt2xFkKRCpgBJqGM0wS7MKeA+E/Pt EgG8Uj7Au6Gg/tis5z1KSbm/HIiR//d/RS9MdV6zUFsOG03JJfBlPV3wF+fxeyYGpXLghxdNQ vXAf6epG6Zz5C9wyqmKCrw9mlgGgD5YPij+4qm7fdcdoS6O70WloWQaSMiwyqpb/E2+8q9gIP 7lIPtuel7YX8Nn824ZGOjFv9Rv8gsAEFVCn2+yBseWTsn9ouMBFRJN5Ccnp3LFWTQF+XCP/Uh HZ04o3lhpZJPEDeT/qBurBC/Xtcq1jkEVZnF99Ozz26vw50GvBSohrZHTP2/xEk9ZxmnzLep2 H1EZezaSbh6NThSwNvdWkGu0u/NDFjnsqBFi+Pg6oFvyNA4YxsBsZqqMj1nUqhlFoZFEop3gE xOjJGgEeoJbsHH5ZtIQnnH5zIwHjOfpqe4nk4hZY7ITHsIb9Pu7UiPv6jM8YFlS7KVBwHnSoZ NlrK8bcIuLn1h0ke1/nKNAqwL8qmdoG3P0oacmV18tYWNFoPjg= 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 16:35:13 +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/sirfsoc-onkey.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c index 9d8b4e2d7063..cdad20811d35 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c @@ -111,8 +111,7 @@ static int sirfsoc_pwrc_probe(struct platform_device *pdev) int irq; int error; - pwrcdrv = devm_kzalloc(&pdev->dev, sizeof(struct sirfsoc_pwrc_drvdata), - GFP_KERNEL); + pwrcdrv = devm_kzalloc(&pdev->dev, sizeof(*pwrcdrv), GFP_KERNEL); if (!pwrcdrv) return -ENOMEM; -- 2.16.1