Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp191841ybs; Sun, 24 May 2020 02:18:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOkX21pQvEk7aFIwJysDklVDBenHPAws3ZiiTdiL4cYMdH0rlUZTBxJ213nbGoakxvFtkj X-Received: by 2002:a17:906:1199:: with SMTP id n25mr15568498eja.14.1590311920774; Sun, 24 May 2020 02:18:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590311920; cv=none; d=google.com; s=arc-20160816; b=Zaa6ac4RV9CpPaLYxq6Kyr1gQVw6gx3oBGa47R4j5y0f4OumSbDK0zNA3CArf2ByCP KSy8Df7DDSIEPIIjGSWovePbV4m9R3cKG1izXE1wbj+3KetH4Fp8O3zwtg++2K3xCz5D 3GrqtfjLREdlh4XwiBUNr0IrM3X2DMlJRZXP7qiLE38q0CQxIvYaQqOhEdKNl5WyFefL oADTntYdPNmSkyVPBluDZMCrfTvWRj5ofllI6t1GCmSIH4DZ3mBqEzBxiGd119lpZdYm WMim7Q1nXayrvwn7ZO3wBBfAi4D1ib89zngQcGyMAL1Mr3BbckB9DRwWlxhOFCs8p6d5 Tq1Q== 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=c6FXoe3kD29gEf7Gx8ntxMS0uzAy33eRVlaypqIa1q8=; b=thsO6B/XvdwsCSBZsyMYO/cLTvsC2miA1h4ViV6WCfoUlKBKLvx+C01xfME5QoHpt5 +U0TTLHm34wOKy+GpD5/dPfJcvOECTcsqtTV1Ux+w+TFjaeqclbZ6zlg5KEetz954R/k pU0ME7xS/zdExLSNO1tFuMwNZgTDbaLs4hSThgbcp2mHCUdR++AyMJRr726MKRYJCNAp lpgc29xzpmWVor+fJCDhFBY8+vg8s+OtiCs4YxjswUHhyfaVUkk9dPy9Xyn2JdYcVgpk X0k18a/eocL5uLeGB1HF0IqLurkEVQwA4RPfubdEnHZnl0nrisPXDzNqmembdl9lMYNE AMow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=h4Ys1wia; 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 dd15si7439616edb.187.2020.05.24.02.18.18; Sun, 24 May 2020 02:18:40 -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=h4Ys1wia; 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 S1728875AbgEXJQP (ORCPT + 99 others); Sun, 24 May 2020 05:16:15 -0400 Received: from mout.gmx.net ([212.227.15.15]:38387 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728252AbgEXJQP (ORCPT ); Sun, 24 May 2020 05:16:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590311748; bh=ARG58TJZqL4LOYQHfQdm/GMzrgiav1S9xozdFHT2etQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=h4Ys1wiaxQx23PPlL46GKPZuRSOzJ8vvN57fnJwPbpKoIvo6wCQFsCVeLK26Thr76 PHBP9VoBF2K5MRtEqyDspQYTtguCtdFiBp31yqFKxhUa2/V4ZItrYMcW+9U3wT+/Jv 6C89nAOZ6AybveCqx70GdG3R5ov3/bJXhHNkM3Gg= 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 1MvK4Z-1imT811W9R-00rHZH; Sun, 24 May 2020 11:15:48 +0200 From: Oscar Carter To: Kees Cook , Greg Kroah-Hartman Cc: kernel-hardening@lists.openwall.com, Colin Ian King , Arnd Bergmann , Jakub Kicinski , Pan Bian , Oscar Carter , Derek Robson , "Michael S . Tsirkin" , Michael Straube , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging/rtl8192e: Remove function callback casts Date: Sun, 24 May 2020 11:15:15 +0200 Message-Id: <20200524091515.21799-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:dJ70coFbqKi13dNoflxM6pg+cQq5o+SYkbZH6/Uf5Vb9nIO2hd9 KI7T5Y1NLZZ/cAyoVFESuHtCaBI/7YwMtDi3Ir5frvZMRxa8OhsZBBsJ6IRddD302MVO5cT 3kcteE5PghZZdbvoMK650TPsxI9b+/X8zT6VmAZOy4SA91HJy4Ow4b68zbUIrNTxjl1y+Rx UWeejXBrD5GKVN+iPqRNg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FNHUp8kSDug=:OfmwnDaotEN9a8MAHcjcpX AZa4IBMG9z0FjmlCWntsDxE8121LromUI6b40G0jKClUDjwY5IWaVKAZJDJY7L+QNVyXHwNX8 I76gJPS4jHQUxVfxpa2wcBATwX+KqvJ2DXyQgYsL7ILAzkbnDJT6NI+H/Kbag2xe0iMBCRRwN ceeOnF/feVJL1eg1fMmH8qsLZcC+aTZpvCj278vkJRhOpq2Vy10VfaV05S66NfmH5O3BjIEdG xwQrNP6xyxaRtpva/hP93OXcoVG+CY7BlSF0cIml+CSSHIoFO+D8NlC5iWAYpUSglNrcfZZbu OAXi9MkYNe+TeflyP7uZPniwG6GLem0lalgSV7UjyBq5vxlrFwYuUqeB/ZI1WN6Xxdlwi36Qe 9SLnCvKT+enQuyzvDxprcKQfTTRpTE4jK6YWtpcHxSfodZacYzg1etPA+RSIzfBudObMy4WGB 6gaZ7xQKNf56aUtDYCcc9u7a8qxoMs1ziVsqi8/VAMSWsMHw6yu2m/t435cl4NcbU7poDBWVD gqxZ+AbeO9/7yk4HD50H4uvWZ7Isl4nbbN6XRGlbIpD+PT5RPz68Ci53rdNcMvYsFd7vkkK0B 0Fr/bgjOhqAI1X8mnmWZXi1GbZZRgUzVAzI+Qr27Tm4jKlDhKkFEjnelHj4VdlU8DL39G2zh5 N784TkLOE+OlDKdvLzPQPCXi88AwIJcwZzPezFcVH97fyeI73hAyoevDDkzesn3Kf33TLOz8d PIeWkCx4/nbNs3LGvejtqIr7+7zYuBG5rb8qWt1JqRGwM6Httn0uJOmbNtqoHxQ2Fm9TKSjg0 9/wxCBnOI8xMWq9DdUYSAsiTKFReSRcuunKj8HGkeLppPsfQyRfmDPyRzG4bTkjLc3Ed0NUv1 3DwL74LsU402wf3eIfTba6A1qb/5AO2nHKDWdJHIOzlCKcvKS/KEeQyCebQ91IDfAZMROHDHZ CwrLPGwbOpl8K4LP4KgObyllRQnOFhtEVuPlhzh1PKtqAqImZW1Ap2uBhmymztBKfpaD324u8 HvDSj762s99AenQ/OuA4KE498tMzx8b79J8Xo8mJu7JqB4lCakMXwWqRzOYRAq5sEwF1byfYM t9dTvlrOhRjYNeXZGQfQntGi1+hIgNiQiLgQCRo28dYklHtsB10PalZgVVXPt+Vkwo2x/Ab3E Uc4ZnY6XcMDaVWMTmykB0oQ5II4qLNmVybqqmn0vPIx7JW+66RGmPsfPpmDH0/HLVZg6YwoY6 a4BP4/TZeDUSdG5Gn 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 function prototypes accordingly. Signed-off-by: Oscar Carter =2D-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/stagin= g/rtl8192e/rtl8192e/rtl_core.c index d3664e508cbe..a7cd4de65b28 100644 =2D-- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -81,8 +81,8 @@ static int _rtl92e_hard_start_xmit(struct sk_buff *skb, = struct net_device *dev); static void _rtl92e_tx_cmd(struct net_device *dev, struct sk_buff *skb); static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb); static short _rtl92e_pci_initdescring(struct net_device *dev); -static void _rtl92e_irq_tx_tasklet(struct r8192_priv *priv); -static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv); +static void _rtl92e_irq_tx_tasklet(unsigned long data); +static void _rtl92e_irq_rx_tasklet(unsigned long data); static void _rtl92e_cancel_deferred_work(struct r8192_priv *priv); static int _rtl92e_up(struct net_device *dev, bool is_silent_reset); static int _rtl92e_try_up(struct net_device *dev); @@ -516,8 +516,9 @@ static int _rtl92e_handle_assoc_response(struct net_de= vice *dev, return 0; } -static void _rtl92e_prepare_beacon(struct r8192_priv *priv) +static void _rtl92e_prepare_beacon(unsigned long data) { + struct r8192_priv *priv =3D (struct r8192_priv *)data; struct net_device *dev =3D priv->rtllib->dev; struct sk_buff *pskb =3D NULL, *pnewskb =3D NULL; struct cb_desc *tcb_desc =3D NULL; @@ -1007,14 +1008,11 @@ static void _rtl92e_init_priv_task(struct net_devi= ce *dev) (void *)rtl92e_hw_wakeup_wq, dev); INIT_DELAYED_WORK_RSL(&priv->rtllib->hw_sleep_wq, (void *)rtl92e_hw_sleep_wq, dev); - tasklet_init(&priv->irq_rx_tasklet, - (void(*)(unsigned long))_rtl92e_irq_rx_tasklet, + tasklet_init(&priv->irq_rx_tasklet, _rtl92e_irq_rx_tasklet, (unsigned long)priv); - tasklet_init(&priv->irq_tx_tasklet, - (void(*)(unsigned long))_rtl92e_irq_tx_tasklet, + tasklet_init(&priv->irq_tx_tasklet, _rtl92e_irq_tx_tasklet, (unsigned long)priv); - tasklet_init(&priv->irq_prepare_beacon_tasklet, - (void(*)(unsigned long))_rtl92e_prepare_beacon, + tasklet_init(&priv->irq_prepare_beacon_tasklet, _rtl92e_prepare_beacon, (unsigned long)priv); } @@ -2113,13 +2111,17 @@ static void _rtl92e_tx_resume(struct net_device *d= ev) } } -static void _rtl92e_irq_tx_tasklet(struct r8192_priv *priv) +static void _rtl92e_irq_tx_tasklet(unsigned long data) { + struct r8192_priv *priv =3D (struct r8192_priv *)data; + _rtl92e_tx_resume(priv->rtllib->dev); } -static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv) +static void _rtl92e_irq_rx_tasklet(unsigned long data) { + struct r8192_priv *priv =3D (struct r8192_priv *)data; + _rtl92e_rx_normal(priv->rtllib->dev); rtl92e_writel(priv->rtllib->dev, INTA_MASK, =2D- 2.20.1