From patchwork Tue May 16 18:54:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9729553 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B5CCA60386 for ; Tue, 16 May 2017 18:55:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A733D289A8 for ; Tue, 16 May 2017 18:55:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C164289C3; Tue, 16 May 2017 18:55:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43247289A8 for ; Tue, 16 May 2017 18:55:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbdEPSzO (ORCPT ); Tue, 16 May 2017 14:55:14 -0400 Received: from mout.web.de ([217.72.192.78]:59280 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752712AbdEPSzL (ORCPT ); Tue, 16 May 2017 14:55:11 -0400 Received: from [192.168.1.3] ([77.182.68.193]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M89mf-1dwuWN3wnZ-00vdcB; Tue, 16 May 2017 20:54:31 +0200 Subject: [PATCH 1/2] sh/intc: Improve a size determination in add_virq_to_pirq() From: SF Markus Elfring To: linux-sh@vger.kernel.org, Andrew Morton , Jan Kara , Johannes Weiner , Rich Felker , Yoshinori Sato Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <359e6a4f-66e3-87a2-0c55-8d57e9d1101f@users.sourceforge.net> Date: Tue, 16 May 2017 20:54:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K0:eSklBtxzti6YTuN9RMtK8U3Ma6Jtwk9fG0D6ZuF3RMVGRxVxzs0 kWlZaYHoWlnnDs22keURaWLiHlXDcGYUWZVeAL+Nock4YjwewmQFO7fw6RL3nYRhju+kVWs Z6K9DXQlZbdxw9Iyjk/t9rQVXbabl/7IrsVuyMMneCZDuSLaOpF2oY7+xagUCqMqD+KPD7F eWEjmD5HepOh+Mxxhfylg== X-UI-Out-Filterresults: notjunk:1; V01:K0:XGJ+hQbiuw0=:5M+hsyngmKMLtWDMFutH4L qq+59awaFA5KIWKcsXKZU+PX7znKcpX1440uy9rfn0WPUHAljmjnRYZp4V6DBjUoh3wR8Qrel OdAQMJB/mTTl2/n2IbP40t0m7Dj7EufRD3SLl+s1F3gDI+jlyT3pRA90LDVr9vsLJVXGgRnp6 vCATfUmYqPgWnkZkg7cjmez5LszTBEc4VNmE2+a4M1HzZCP7mB2lTa4B6x/p7JuEooHC9/peu TvppRBsfwAmY6q5e2qadkPa4DSGJ+1GdcymN27GEcWjJX9SCDd323n7/8U7gsvcESJdFyF2ai opnd9KIdMyS9mTZIsfJ9uYlUmWCGNVCm3z0bqgybXNKmsf05QlZl6A8CeQlZbi6ct8b4ZXjXa hrq968HXI8/i3YsqsGOLh9WZcoYengnuQZPMyz3zZDK+KkCX+DsduO7wUClWLSHddImJbyWeF K/E8Iyxc3k7xWxrpjTP+xtfPl5wcCZqPRldNlvg7pk5zRyYdD22UhBaXdyy+u21lv1Di81RXW 4kn9nf7BfCa2Qe0Py/60DnbSo7AC5dO5grGgVrgdT+ayN76oUgnhpeE1njp39Q9zVTuep33zf crstR06Y1+N4O3INoQLnu5T2TqnoKYIUHbtyUFRtDUy9PH/Dn1QUXKPY7fbIOrAOol1TMHApx yS9YrnnTZ3qlLYyrDx1zZ364DRj8HBYkfSZhfiI9LU4o9huw7ecoeO7o4i0wh+uYNwjEvHHxA xkGAJpMxRDBUdJa15E0fgHnFU1vy5Ir76mOpDLnGrxDwOpqQVdBeBwpEtz+zTXEDb4B2A9K90 DszrUxE Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Tue, 16 May 2017 19:56:47 +0200 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. Signed-off-by: Markus Elfring --- drivers/sh/intc/virq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c index 35bbe288ddb4..2079425c95ed 100644 --- a/drivers/sh/intc/virq.c +++ b/drivers/sh/intc/virq.c @@ -93,5 +93,5 @@ static int add_virq_to_pirq(unsigned int irq, unsigned int virq) last = &entry->next; } - entry = kzalloc(sizeof(struct intc_virq_list), GFP_ATOMIC); + entry = kzalloc(sizeof(*entry), GFP_ATOMIC); if (!entry) {