Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp163736ybs; Sun, 24 May 2020 01:14:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR2rK0EhxlF5hDhbp62m7q+RqvfXTwSDzjYtOZswHCSOEUGVS/h8zE+Z31JGiMXUFvu7fW X-Received: by 2002:a17:906:4886:: with SMTP id v6mr15020442ejq.11.1590308064078; Sun, 24 May 2020 01:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590308064; cv=none; d=google.com; s=arc-20160816; b=daWTiQwV/Olw+Af95NDuLenkqQm0SxvtnOBM4tkWYEqGEQRT9H1leQY1FtX9MRl3AF MicFE0WFosLbppGKw5fK5uxDksOgXim+IrwSIdhjMHMihkxWQyz5AC54KRBk11MUiOfN 1eR+cxMW1iuO9tlvuzMLjG9SFcu2NfKpI5Q6UqLd1KyGdPOYPgzDxC5lXXl0OHD7GfGh 0/GNPckC+rh5M1rQkS6xvzb9YOmN4rT8w+eRh+UDV6HY4ElKGCigeqfXuLneUrOuYMgk JV/KHVKxUAAJSPpLguDsFPfuqagQsnu9ISnvR622YxqjZC3ZT+/KVUUXa61cZSlNeDhQ Th+A== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Dhy78bZVLP3PtmlJDCNuYkUn6DiVhmyUpoMsI1PQPB0=; b=XfcmWnzHqA4iTTjux2RiRGHLKvNKhy7HCu0h0YrN6ai0lv2P/FalP7Dqe97ZRlgOwP bjCn2kYHCDjtQ7B5TRSr9Th2yhNaEBaysXi6S/hl3uTcx+QeMsCbYUp6Kw75mJ3tuvRP Zqlzn+bGCrJfLt+YfvVyed3Un6+NZxn1m/MGvkQG7v+l+/FKO51/l7vnPt5EtK6VnHe+ ypBef5x8SsHUkV3LX/AmaDRuMWuB800L7f7NAWbM4W1JlWhKR4cSfKZpHKS4bfHz9r0R IyBfKJdW3zus6l5BHdpuqGMZYEbe2Y6UtLdpqZdJzhp2RK6P+MKtZFvXsQg0w2KoFwQK 7LoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=UkZ5fwVE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i60si7509005edd.0.2020.05.24.01.13.41; Sun, 24 May 2020 01:14:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=UkZ5fwVE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728168AbgEXIKU (ORCPT + 99 others); Sun, 24 May 2020 04:10:20 -0400 Received: from mout.gmx.net ([212.227.15.15]:55429 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726331AbgEXIKT (ORCPT ); Sun, 24 May 2020 04:10:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590307797; bh=Yh4A99YJCgkA9UbuO3RfCVtF8HiYdKwmMW3V19IImEM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=UkZ5fwVEuQEPo519I9Bim3bwomLEMCwU16ReQvnBT1hYayPucK9Kd/yr2CyAsCfsP cttCbWQFQ+AwXocbrl/2yj2bOPxeQILT1EJ4VN6HvtCFnMNjIHAmeqNFd5LCOMtyGP ty0Qy/7xjEr6EN2mDa78Ajhq/ex8OuT/Dtbn6Sgc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.52.229.196]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MbAcs-1j1V0v2EQK-00bXzT; Sun, 24 May 2020 10:09:57 +0200 From: Oscar Carter To: Kees Cook , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, Oscar Carter Subject: [PATCH] drivers/irqchip: Remove function callback casts Date: Sun, 24 May 2020 10:09:10 +0200 Message-Id: <20200524080910.13087-1-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:DPSzdRpyRux4A5kUtqLHMEMr9pHGkwQE+bKYyADNmfAZpC447sS BVR1oCo6gXQUg+ZC3B0H4u04qrR/36ilTAe4FoXmoduPjLqwXF8dgtNgUX7zQfXCaDLMl9U oz9L2o6IP2ZpdOHJ79dk10pmPl8bLERfuJOzdfmR/oZMiqlr7HgSMGiXXXPiKGSEveS1lFn hljV+i1ABOCLBauvj1Kcw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:2CgksPlfxEg=:lbVsvV8SCTgDDaPaOCYklz OyoJ6CqTZX6vsMElVRTIXKQwIb3GZdtmDPZDs9f/O/96geY1kGCEiqcYmC7CedcxyBpwFr2aX RCuQT4JR2Wyj0Wy70477E/I4TmTwLiu8gvL13Ep9+LjfMj+EWq8wyBXCQKGh0NAdT7ZM1trs1 2H4f7T5JO1YBNnSJ4OazykSas5qGy1P/0F9GHi46HbHW0vHQ0QjfTmsXIfZzMNQIMh0CsXfI2 na6JQTMFrQfAfwtR2To6AHhqdiPNGeVTnEWtd4FA3XPvr7S+1ryLSideOgaFmrnDGRhuxmNAI wdk73/mK63o/ucMKYgVTwcZO2rnsq7G9j9Fcb5vfPXtArZpdm5iUYYr9Qka6giv2Pokl8slQ/ gXZWJBpcggcBpPJIEeKdXfryDuOiAgxWhRH7wzR3458FMyxgD/fZM27BqRLAGLd7ieLU/nmHo 6JcfeCYyKqxoegB3iqbdPB8xjkPjxeMQ79nMf4/u2Fs4WQqe4/PcFZ3LqNf+vG3t24Mlxf+d2 U6HoYDNSU7RRG7Gac9ZEFwc+jK6cKdHzhnXShBr5L57xBhQ83uLHjkH0oLuEbsONdVZeElBJh 2ZsqJmwCJPcQn/t7v/EGCnMM659/FCkxRqTSuVNj+OVvQbrJqSxIkJo4/38eg6d656wTrUkn+ PChQmeMS7PBLoIiuUPhqMPCEas/xFGR/sZ2dk0i8tMXurbIWxzHBthGtLghuJ3SuJFkuBawie yeIs2j2KjFvs4jZy/BmfJMg8BNWCx1UJXD9QS/sPF0b89IY0LSa6N2Fv2URQwOIvYCbz9Co5D yP75P5QmwF6bTFNune7Z37zG82/UhUwDxqrOmqwGbLmwMFZ8YXDtSg9b7sXzfRyGs1K8ihISy WB5h/sPxKrWwUleT+Vdn4YUFlXs29iwc7yFsvWUJzpAZDhPXpum+2IZOw8cSt+7xf/1O+RlHG RuhDlB7F8ERpxPd80LqKSuv99HmhUSkvHNiFv/q2WjvTrhnmES2Uy7T7aEsxaL5P4N/PmyRxm cWAMc5ng/qSMQ26ItQkTq+SfTLw9aWwqZSjxeftA0KqnxpZ0NRs7kHqq/GKDe4cy9i430bJbP qwkM8mxZpOcwCGgWbqA9xPu/LyYn6HZoUvdc+Iz/mm0eabzMqmXGQLiSsXrY6CW51kLz9eQ32 MlsBGLENs4MZcXsYLBrpSsb7ilQnPGG160geMK6xFdZbEgCAaK7gv2CearH0mPtDkhCopX63C +sfOsXti/aMf+X76y Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, remove all the function callback casts. To do this, modify the IRQCHIP_ACPI_DECLARE macro initializing the acpi_probe_entry struct directly instead of use the existent macro ACPI_DECLARE_PROBE_ENTRY. In this new initialization use the probe_subtbl field instead of the probe_table field use in the ACPI_DECLARE_PROBE_ENTRY macro. Signed-off-by: Oscar Carter =2D-- include/linux/irqchip.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 950e4b2458f0..1f464fd10df0 100644 =2D-- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -39,8 +39,14 @@ * @fn: initialization function */ #define IRQCHIP_ACPI_DECLARE(name, subtable, validate, data, fn) \ - ACPI_DECLARE_PROBE_ENTRY(irqchip, name, ACPI_SIG_MADT, \ - subtable, validate, data, fn) + static const struct acpi_probe_entry __acpi_probe_##name \ + __used __section(__irqchip_acpi_probe_table) =3D { \ + .id =3D ACPI_SIG_MADT, \ + .type =3D subtable, \ + .subtable_valid =3D validate, \ + .probe_subtbl =3D (acpi_tbl_entry_handler)fn, \ + .driver_data =3D data, \ + } #ifdef CONFIG_IRQCHIP void irqchip_init(void); =2D- 2.20.1