All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: <Ajay.Kathat@microchip.com>
Cc: <linux-wireless@vger.kernel.org>, <Claudiu.Beznea@microchip.com>
Subject: Re: [PATCH] wilc1000: use wilc handler as cookie in request_threaded_irq()
Date: Wed, 24 Feb 2021 17:28:35 +0200	[thread overview]
Message-ID: <87tuq1fpss.fsf@codeaurora.org> (raw)
In-Reply-To: <20210224122044.15146-1-ajay.kathat@microchip.com> (Ajay Kathat's message of "Wed, 24 Feb 2021 12:21:28 +0000")

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Use same cookie for request_threaded_irq() & free_irq() to properly free
> IRQ during module unload. free_irq() already uses *wilc* handler so the
> changes are required for request_threaded_irq().
>
> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
> ---
>  drivers/net/wireless/microchip/wilc1000/netdev.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.c b/drivers/net/wireless/microchip/wilc1000/netdev.c
> index 1b205e7d97a8..66f725aad209 100644
> --- a/drivers/net/wireless/microchip/wilc1000/netdev.c
> +++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
> @@ -24,12 +24,10 @@
>  
>  static irqreturn_t isr_uh_routine(int irq, void *user_data)
>  {
> -	struct net_device *dev = user_data;
> -	struct wilc_vif *vif = netdev_priv(dev);
> -	struct wilc *wilc = vif->wilc;
> +	struct wilc *wilc = (struct wilc *)user_data;

No need to cast a void pointer.

>  
>  	if (wilc->close) {
> -		netdev_err(dev, "Can't handle UH interrupt\n");
> +		pr_err("Can't handle UH interrupt");
>  		return IRQ_HANDLED;
>  	}
>  	return IRQ_WAKE_THREAD;
> @@ -37,12 +35,10 @@ static irqreturn_t isr_uh_routine(int irq, void *user_data)
>  
>  static irqreturn_t isr_bh_routine(int irq, void *userdata)
>  {
> -	struct net_device *dev = userdata;
> -	struct wilc_vif *vif = netdev_priv(userdata);
> -	struct wilc *wilc = vif->wilc;
> +	struct wilc *wilc = (struct wilc *)userdata;

Same here.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2021-02-24 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 12:21 [PATCH] wilc1000: use wilc handler as cookie in request_threaded_irq() Ajay.Kathat
2021-02-24 15:28 ` Kalle Valo [this message]
2021-02-25  4:21   ` Ajay.Kathat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuq1fpss.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=Ajay.Kathat@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.