Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1930530ybv; Fri, 14 Feb 2020 08:25:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyjCliYNYeEEdQvojbk3mpxG8Eov4bpRdJuUkvrTcANlelY3oqDIgd1Uq+VBlO8a3L6ouTC X-Received: by 2002:a9d:7cd0:: with SMTP id r16mr3075185otn.50.1581697508532; Fri, 14 Feb 2020 08:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581697508; cv=none; d=google.com; s=arc-20160816; b=uVZpwGHLBjNCHCLPCFUK5I5C2BAzrHyYvVCqodZX5Pud6tLMKLaXZFzVjkOI1dYAop xovSuwNxhH5z6csR1BzhINQoMHU5r7qupk+Pq39NwqNBCkU7U9tzW7tlVzqD08z+9Vj6 Xp1qRMMfh7iZl5MvwhbLMpy7Eb9Yk/BBOZEzpr0B5Tazeu1LyfNarLIOPxHqOJGXKo/k 7njWy6AfnPprACmAKQw4koyXpHunl4gSfQEad7lNYOOQswAdwORMs/js1HT1MdAK9nRS 0EEVJl7Uze3kntIAsQ1IE9aiq6n36Oiig56jR0QUO2+XztvwW3y1Zf5rBGuWyhrTA15R stUw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yAl+yJDCAEpaT7QipUp+1H5ePEBjE+rnIPksF96/hWU=; b=JOUbYxj0+UBkQ4wHcc5sKB5A79QJ/sRafMpP8uX+7+erQRSVb4o9o9gQihKCiJNN8M tXTIXolR8yvGov6bra2F/Drq5eb/u/5X5+fc6RkI4TrNSZ9dsSWg0r75IwgfqMT1mVS6 lEqX7zTT893H41pj3VnKNyKVnrw6Yf1unwU/BuHLxQbCpTajdtg8nIvtWmYAiJpP3AUF 7WsvdJjSotb7DJyyvYzhkcs3uaUtIHHY3Mt0yi5kV/RmP4YBlA1xmc8EG+K+FUzt1Ess 7A/O3vyDzaTG5je5yDQ5jihEixuPzFLzY5qzYUO2eBN9tCWFVjetgy5rG4NvA2UdfGJQ OmUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="E/k9PW91"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si3010899otq.23.2020.02.14.08.24.56; Fri, 14 Feb 2020 08:25:08 -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="E/k9PW91"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393119AbgBNQY0 (ORCPT + 99 others); Fri, 14 Feb 2020 11:24:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:58564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405524AbgBNQWp (ORCPT ); Fri, 14 Feb 2020 11:22:45 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 67AFB24747; Fri, 14 Feb 2020 16:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697364; bh=r8IpIj2XCyyUfnuawEC+y01fh8/vqReQBesAHgoKrmQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E/k9PW91bPX4nv5CKVKG2ggDAlBiYmbgarjBYFEqZf+kGwHQOhyUulUZyTjpPYImt CisK6x3fUq8DZRN7pkd9xzEs0cwCMf91od/12k7EVymphhsuD9p8MiWU4AFLPclNbv WwGLM4oMgFSEkdukAMZRgT8BGqjB2ZTWFzoLBDHg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Phong Tran , Kees Cook , Kalle Valo , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 064/141] rtlwifi: rtl_pci: Fix -Wcast-function-type Date: Fri, 14 Feb 2020 11:20:04 -0500 Message-Id: <20200214162122.19794-64-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 cb775c88da5d48a85d99d95219f637b6fad2e0e9 ] 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/realtek/rtlwifi/pci.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index e15b462d096bf..21b7cb845bf40 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -1095,13 +1095,15 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) return ret; } -static void _rtl_pci_irq_tasklet(struct ieee80211_hw *hw) +static void _rtl_pci_irq_tasklet(unsigned long data) { + struct ieee80211_hw *hw = (struct ieee80211_hw *)data; _rtl_pci_tx_chk_waitq(hw); } -static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw) +static void _rtl_pci_prepare_bcn_tasklet(unsigned long data) { + struct ieee80211_hw *hw = (struct ieee80211_hw *)data; struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); @@ -1223,10 +1225,10 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw, /*task */ tasklet_init(&rtlpriv->works.irq_tasklet, - (void (*)(unsigned long))_rtl_pci_irq_tasklet, + _rtl_pci_irq_tasklet, (unsigned long)hw); tasklet_init(&rtlpriv->works.irq_prepare_bcn_tasklet, - (void (*)(unsigned long))_rtl_pci_prepare_bcn_tasklet, + _rtl_pci_prepare_bcn_tasklet, (unsigned long)hw); INIT_WORK(&rtlpriv->works.lps_change_work, rtl_lps_change_work_callback); -- 2.20.1