Received: by 10.223.176.46 with SMTP id f43csp21285wra; Thu, 18 Jan 2018 13:17:21 -0800 (PST) X-Google-Smtp-Source: ACJfBovo1V4aZsod8e/31JBQtEndWxoXnyQ83JKqxc+tzLRKE2x5bx8BGMtqVVx1ocsW5g6BxOLe X-Received: by 2002:a17:902:8549:: with SMTP id d9-v6mr441836plo.121.1516310240888; Thu, 18 Jan 2018 13:17:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516310240; cv=none; d=google.com; s=arc-20160816; b=W0sk446QVTyuGRJye7V/xEZOcgMHpuDFi7HQTUcHxVbYU5pkClG1Ic8bQZT7nTJxKi U1cBYiX25adCQ7OUM8dazl1SElSeb9+efiB6uhZuykdA67tqlE/IC91Obckx4J7GCa5f ZlH6VJE4Em67q09A3AUpsCokPQm+av7ZCcwbguyXXB4YMx+ePf7zOKD6x4XRERCBQgGL 4KmEFQSs8EpPLnWcf0UIN6u8AIu+LUf2O+ts5ZZw9IhC8stml9f2ZL3QK/EgkP86NPt5 MC2crXCSFGWja6vOD4yVdaSJMnlW3+D+RBYbZlWWNkhKTen0Fusr47M9MYibXmYskaIQ KgkQ== 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=FxBd6Y5dD3wn0ApEYJQHCI+Emc6BR40XbZ+BHg4SLpE=; b=ZBEbksArLU9XDTf3GK7RH9OrLhfDLf7YbRJzV1fcPGxllmLtCj4EHYmJfjqH5aNJ2h wLmsE3crdUVY2va/4uW7ifPn6KdY+jmjJ10jI8Ugi5n8a+BhXhQS+0uoOCsbtBYALPX3 IooBrQw1FV9+0gE922fClI4FL2S2/0fwrteXqlFHWgOA/mutWMdm11HuaqNC3kRZJjBn zEQvADuBkkiF0tOaCldy6lGMrh2MOzyiICWBoG6NqYULXocuvkXLAqEDWqSVU9IHpPFI rlr0lMHOqDgnan+WSjG84LjPkNE3kb2ZRoVTmadzP5zgquNj99EpA+492JtIThKfqP7a s2kA== 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 o20-v6si208354pli.757.2018.01.18.13.17.06; Thu, 18 Jan 2018 13:17: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 S1754685AbeARVQE (ORCPT + 99 others); Thu, 18 Jan 2018 16:16:04 -0500 Received: from mout.web.de ([212.227.17.11]:63612 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754590AbeARVP5 (ORCPT ); Thu, 18 Jan 2018 16:15:57 -0500 Received: from [192.168.1.3] ([92.228.88.14]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M6mTI-1ezbEv1r08-00wWG6; Thu, 18 Jan 2018 22:15:41 +0100 Subject: [PATCH 2/3] irq-imx-gpcv2: Improve a size determination in imx_gpcv2_irqchip_init() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Jason Cooper , Marc Zyngier , Shenwei Wang , Thomas Gleixner Cc: LKML References: Message-ID: <56c51505-0ac3-7c59-6ba3-768dd3a675da@users.sourceforge.net> Date: Thu, 18 Jan 2018 22:15:40 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:7wPtRLv5EwMjBvhwLQdigPSrLWIw1A8AFybfTJD0fb27SDX+3xZ 4mIqstIL7+VG4x6L5v9XrqQiE8tOl/4f6Ae7EGn6sP9CG1MoQZhWiHL1cjMYOrf0xteC0EA txMSVquYQh0QlDdk2snuiSGUBmldtSVObuKHhcc8be0iApUws2zS8EN3PtCc3H6sGYxw/PZ qeutv87wd0yAWQH4uOjUg== X-UI-Out-Filterresults: notjunk:1;V01:K0:HIPnuTjaFGM=:GodOjlrhhn8KTzgiXkhgwy PRDOQgn8v6jwQEAI5SaZ0Bd/lOzuU1PXSByJounHjWh04eHAeRT5Z/RwcAaT8SWJjJMlFMcfW YrAp7Ra3mHDmoZtHmUqaIXhyPae9jksQSpcbigx7Edd+7GoS48xpHnICZMCrtM/JmQAJq5Lki PYLiZWnIs7+SA2sfAh/DmPaNiNDTaRnXalxBNYixihB33thrnjvj9kfsAENaDb4WWDEFx/uWI yFPEahnEI+Un3ULXxWNuz9m+E99z/x5WXg5yDpbjrBDK4EQhpnZ2AGA4BKXGnEhFK1USLCfsY HRHDINhnScHioq/J1FX+u8FbNSDP1zgwQxpsjHggnambbu29UKgIsS0O06llkgh39Twa35y77 ylZpnYkGIWgHMQtw91txZ3MdPEQAK0HCFebHpQNJUitnZueUPocILL+crj+J0cIVl7LC6/3ba 7oEEmUkLe+LLvex3AA6ypgbwq9s4S4SXxs+a3GSr94aayM7fsvvCWWhA1FxnLoticLL51aQNU oBVh+qbXwqmQVDikFsgkiqvIFH1rKRuPwH1QqEZLf7A5R4N39fiVv82s01Vl5rOWWU9IC4VmK ZKZvYc2inT3mVy2ICvGpBxRWokSybHljDwsMsiFFRkeOEX+1AkdbTEwT5snXp9XWwxcxkGggj vtWd6gg15xxfKVM04KTBCi/UMX9E4Km8zhSlfaatsr3/F9OApkgcZPtYY0q1p5e9DL5BXRlv6 YNMrrQOJp+jzb7utg8KIUihKpJqSuEDIWTlRstCrWI+hrvOfXDHCWzJ/w48f0VuY0r1QuIL96 Na5J6LMy6vrjItZZXN318GZBUtn+gSDt7nAG62CLHKrTHJqp7Y= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Thu, 18 Jan 2018 21:25: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/irqchip/irq-imx-gpcv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index f08fcbb46b1b..e62f22c84112 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -224,7 +224,7 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node, return -ENXIO; } - cd = kzalloc(sizeof(struct gpcv2_irqchip_data), GFP_KERNEL); + cd = kzalloc(sizeof(*cd), GFP_KERNEL); if (!cd) return -ENOMEM; -- 2.15.1