Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5081136ybc; Tue, 26 Nov 2019 21:07:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwas4IZZY2QUysgb95bdDovAYvGgkuMEs38OpnEaqnNVPLtehRsZ58LlhYQxHnDctMmoymE X-Received: by 2002:a17:906:49c5:: with SMTP id w5mr31535493ejv.21.1574831227930; Tue, 26 Nov 2019 21:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574831227; cv=none; d=google.com; s=arc-20160816; b=lX61vt5tin9DykkBzP2hwdqiLkUk79JISdhkHxwDEWPKTEB+Wt23RYuluMI8HeV7B3 82uFoWzSlcvjzArun4gQgnl8jwRMlIVmuNutRGzvdxtXQu1oPdP23XseaCOxm6WmIgsV WCd9tjeiYkEf/hJGFY6r7adr31STDMMFeYRbQ1YlN1yGqL8se9WnL0BHXE9uFUOlxRHp fTYY75ikQ52BWC2ZnbMMPvsWuawAcYb+x2FmkjzN9Y5G12kGMaM8uBfxDbO+ha8t7jL3 Z8u9NiqBGVf739u8vHjwRbrPATvRlhKES/WizRPneRwvVCf0Oi2enUMzE0ORWfqcf9KQ xHFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xZ4O83bgDIw/8dIBhV4hXPyaX+XZAbVnynBzLd9+iLI=; b=ljY2RLItMhSSVwlZnQYOeY/tHSU6wqeRV0kvyrUH+a/3+uuiDd1SFpl7z4ZbpHyljn TIDH3XKjEfDDe/ZUs6A9AwjpWOZDleQsR5ZfOYTgT7nGC9eS0ol3HcqQ1gpN6VtGztzq UI7X3lOMJ4rPOw2qZ469MvGtuSR8OgaTc/Z8NVRHRJPLgvG8I31sDS4+N0/AaxofljIy 0ocoHdvxkivSM/Aae54oe+FotkAI6l4+KdcQ/GSTtgd5fHzRvoqB/WzQVYme46tPD6mM OVYLpOQ2AvvNNqIN43If360aacJ08/tbTR7k3yPjMEwpgXaiE3xYN83wL0uaMlOG95ME C96g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JLaTbp8I; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si10477911edk.5.2019.11.26.21.06.43; Tue, 26 Nov 2019 21:07:07 -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=@chromium.org header.s=google header.b=JLaTbp8I; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726143AbfK0FFo (ORCPT + 99 others); Wed, 27 Nov 2019 00:05:44 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:44164 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbfK0FFn (ORCPT ); Wed, 27 Nov 2019 00:05:43 -0500 Received: by mail-pj1-f67.google.com with SMTP id w8so9347559pjh.11 for ; Tue, 26 Nov 2019 21:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xZ4O83bgDIw/8dIBhV4hXPyaX+XZAbVnynBzLd9+iLI=; b=JLaTbp8IWD3cAfVShRjwwPtl0yRZr6oE7Ksf4+lSwE3sJZ6lsicMVJulQ6G1kM9Dus OXHEYfdMsxCiR3NLCf+GjSURk4lk+VsPw08Zn8+s3EUJSvdinEWQWNBxF9btYJQPqnTC 4zqtp3YYKPt274JrfE7hL+cLC8Ebd0hEeP7+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xZ4O83bgDIw/8dIBhV4hXPyaX+XZAbVnynBzLd9+iLI=; b=FXhkuBU48Nmh8/AEkCxfb/OfNtZg23PFdlGw46ZeW2S0eO3IkLKdUgBGwtPUQAGWk3 ON9I//ZrSzT28GpOP9HU5lQDQm5bQ/eJ8w9/xPCeOFDYPyE0EktOtdzhscTHSDu+LsWa xVcb4M4Bud61nBHqtHrK6FAZj0OKSjZ4QqqFs1CIWoHaUoLXAOF/dV/B3nhxzxFAmFgO 5R9LFu1O2UT8bieQZDFIzAXge2iZT1pmOHyvVdp7RHXkuu7EjuRjQfWNABfHphf8DB7n km9FAHthLAC3LiJCs2E82dut0Wnr/b4qIH9yWQ2fv6H+e9uSniRyVPsqxiALCuEznSGn /02Q== X-Gm-Message-State: APjAAAUY+9V7Lp8//hJGpSYP0NcNlxwgqNZ9aEoCcSBSQe6BP1E2u/rE rHEeXA9rbdsHCK0YUHc/9Uh8bw== X-Received: by 2002:a17:90a:d353:: with SMTP id i19mr3658245pjx.43.1574831141772; Tue, 26 Nov 2019 21:05:41 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f10sm14155169pfd.28.2019.11.26.21.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 21:05:40 -0800 (PST) Date: Tue, 26 Nov 2019 21:05:39 -0800 From: Kees Cook To: Phong Tran Cc: Larry.Finger@lwfinger.net, jakub.kicinski@netronome.com, kvalo@codeaurora.org, Wright.Feng@cypress.com, arend.vanspriel@broadcom.com, davem@davemloft.net, emmanuel.grumbach@intel.com, franky.lin@broadcom.com, johannes.berg@intel.com, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, luciano.coelho@intel.com, netdev@vger.kernel.org, p.figiel@camlintechnologies.com, pieter-paul.giesberts@broadcom.com, pkshih@realtek.com, rafal@milecki.pl, sara.sharon@intel.com, shahar.s.matityahu@intel.com, yhchuang@realtek.com, yuehaibing@huawei.com Subject: Re: [Patch v2 1/4] b43legacy: Fix -Wcast-function-type Message-ID: <201911262105.83DCA06@keescook> References: <20191125150215.29263-1-tranmanphong@gmail.com> <20191126175529.10909-1-tranmanphong@gmail.com> <20191126175529.10909-2-tranmanphong@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191126175529.10909-2-tranmanphong@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 27, 2019 at 12:55:26AM +0700, Phong Tran wrote: > correct usage prototype of callback in tasklet_init(). > Report by https://github.com/KSPP/linux/issues/20 > > Tested-by: Larry Finger > Signed-off-by: Phong Tran Thanks for sending these! Reviewed-by: Kees Cook -Kees > --- > drivers/net/wireless/broadcom/b43legacy/main.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c > index 4325e91736eb..8b6b657c4b85 100644 > --- a/drivers/net/wireless/broadcom/b43legacy/main.c > +++ b/drivers/net/wireless/broadcom/b43legacy/main.c > @@ -1275,8 +1275,9 @@ static void handle_irq_ucode_debug(struct b43legacy_wldev *dev) > } > > /* Interrupt handler bottom-half */ > -static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev) > +static void b43legacy_interrupt_tasklet(unsigned long data) > { > + struct b43legacy_wldev *dev = (struct b43legacy_wldev *)data; > u32 reason; > u32 dma_reason[ARRAY_SIZE(dev->dma_reason)]; > u32 merged_dma_reason = 0; > @@ -3741,7 +3742,7 @@ static int b43legacy_one_core_attach(struct ssb_device *dev, > b43legacy_set_status(wldev, B43legacy_STAT_UNINIT); > wldev->bad_frames_preempt = modparam_bad_frames_preempt; > tasklet_init(&wldev->isr_tasklet, > - (void (*)(unsigned long))b43legacy_interrupt_tasklet, > + b43legacy_interrupt_tasklet, > (unsigned long)wldev); > if (modparam_pio) > wldev->__using_pio = true; > -- > 2.20.1 > -- Kees Cook