Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1616650ybv; Fri, 21 Feb 2020 00:21:35 -0800 (PST) X-Google-Smtp-Source: APXvYqyD0XvLAvN1s2dOxwkJF/Yb6S9CyKQ7tJLEiDQeQonixbc2FeDJzaCnr33fnAjqzcl1uHIu X-Received: by 2002:a05:6830:139a:: with SMTP id d26mr28128004otq.75.1582273295084; Fri, 21 Feb 2020 00:21:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273295; cv=none; d=google.com; s=arc-20160816; b=Z8w7zucg+09YCHm8ZNEPm+0XSVvRl/nOQO0pJhceEaHquHwr0GgvfLXwnc3KWSaTCw 5+B3Otf8ABfXl8tomki0nnT7L2PjQisnUTbCHP+1yxnVrQ0E+RU9c7jEyRJNKs2R4yUJ zUMDB62QTYo/Pwy9RrPJAcy0y0qC2XRv8D3m+sdRvaWQkR9ZYhd8/rfLRVCEocc3k6GD UFzBRwVeGC8uNe6R6KKsBMtUfSl381LN7zFvwCwZ+pH3wIXDqClSrzwKJbJOYT04giEd KjIj8Y15owr2XSlN1WHYnwRWVaIda/1vm1cW4TPrgFNEtwSfqfqCMRwRksxD8B0GkwLF /Adw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pQYd/EQFCS76XsCcJXETxkW2fjNfCHhPy02dnEO1y0A=; b=KwdF7IiBiBRuIQT8J6eSdk4hSXKOY7mciQDn6q37Uxy5wP6MU1GiSVSdDGx3+Zvg8z WojwGPaVRPlfX0TZzTzOsyEXJyY202nJoxAV4S+SfuwuSXrs/Se1rd+SUsfuMIvmONYD uJ8i+EIdhSB3rPesdIVqk8XEXH154zuKlkJ0im6Z0RNO2vC4lne4bpFOMRpbh89WiWd7 2MpmIjG4AjKB1bGaFpYldiKFnPSmwyl9f+9m35mBds9ZLhG+5issu2oh4/audahZZpjn dXGxXaCFZ7zM3Ii4Ny6sngyqOSRCpFmBQUyxTErmlT8KOV/bYmQN1nxmEI8aNoOEdN3H Cdvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WwjfHC4I; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si483947oiw.127.2020.02.21.00.21.23; Fri, 21 Feb 2020 00:21:35 -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; dkim=pass header.i=@kernel.org header.s=default header.b=WwjfHC4I; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387629AbgBUITt (ORCPT + 99 others); Fri, 21 Feb 2020 03:19:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:58516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387635AbgBUITr (ORCPT ); Fri, 21 Feb 2020 03:19:47 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 33C1D24691; Fri, 21 Feb 2020 08:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273185; bh=CoIgWPm//MmwiWgsjrj4wp4Wsg+IhmrTqthUXsRDOQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WwjfHC4Il7wTYDaf89Wtyj24T9/kdWpWaggfO5p8N6wuLp04MXb50gAGdO2PqHKUy PxVI42OAfhmqOLoUuyLNTu6ZbPyD7m8A0/C6lQzoGc1rV5rUMraarv690Y4YLJo9iR il1igS1wuRQcUtv/CXYAZZnuKtH/m+60p7BKsY08= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Phong Tran , Kees Cook , Kalle Valo , Sasha Levin Subject: [PATCH 4.19 076/191] ipw2x00: Fix -Wcast-function-type Date: Fri, 21 Feb 2020 08:40:49 +0100 Message-Id: <20200221072300.410693059@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Phong Tran [ Upstream commit ebd77feb27e91bb5fe35a7818b7c13ea7435fb98 ] correct usage prototype of callback in tasklet_init(). Report by https://github.com/KSPP/linux/issues/20 Signed-off-by: Phong Tran Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 7 ++++--- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c index 910db46db6a12..a3a470976a5c7 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c @@ -3220,8 +3220,9 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv) } } -static void ipw2100_irq_tasklet(struct ipw2100_priv *priv) +static void ipw2100_irq_tasklet(unsigned long data) { + struct ipw2100_priv *priv = (struct ipw2100_priv *)data; struct net_device *dev = priv->net_dev; unsigned long flags; u32 inta, tmp; @@ -6025,7 +6026,7 @@ static void ipw2100_rf_kill(struct work_struct *work) spin_unlock_irqrestore(&priv->low_lock, flags); } -static void ipw2100_irq_tasklet(struct ipw2100_priv *priv); +static void ipw2100_irq_tasklet(unsigned long data); static const struct net_device_ops ipw2100_netdev_ops = { .ndo_open = ipw2100_open, @@ -6155,7 +6156,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event); - tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) + tasklet_init(&priv->irq_tasklet, ipw2100_irq_tasklet, (unsigned long)priv); /* NOTE: We do not start the deferred work for status checks yet */ diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index 9644e7b93645f..04aee2fdba375 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -1959,8 +1959,9 @@ static void notify_wx_assoc_event(struct ipw_priv *priv) wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL); } -static void ipw_irq_tasklet(struct ipw_priv *priv) +static void ipw_irq_tasklet(unsigned long data) { + struct ipw_priv *priv = (struct ipw_priv *)data; u32 inta, inta_mask, handled = 0; unsigned long flags; int rc = 0; @@ -10694,7 +10695,7 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv) INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate); #endif /* CONFIG_IPW2200_QOS */ - tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) + tasklet_init(&priv->irq_tasklet, ipw_irq_tasklet, (unsigned long)priv); return ret; -- 2.20.1