All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: kblaiech@nvidia.com, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq
Date: Wed, 31 Mar 2021 09:25:37 +0200	[thread overview]
Message-ID: <20210331072537.GD1025@ninjato> (raw)
In-Reply-To: <1616144165-54498-1-git-send-email-tiantao6@hisilicon.com>

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

On Fri, Mar 19, 2021 at 04:56:05PM +0800, Tian Tao wrote:
> Use devm_request_irq to request interrupts,devm_free_irq is
> not needed to release interrupts. so just remove it.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

So, we are sure that interrupts can't happen anymore? Otherwise we would
get an OOPS because of the missing adapter. And if so, what about
the devm_release_mem_region() above. Can't they be removed, too?

> ---
>  drivers/i2c/busses/i2c-mlxbf.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
> index 2fb0532..ea839de 100644
> --- a/drivers/i2c/busses/i2c-mlxbf.c
> +++ b/drivers/i2c/busses/i2c-mlxbf.c
> @@ -2426,8 +2426,6 @@ static int mlxbf_i2c_remove(struct platform_device *pdev)
>  	}
>  	mutex_unlock(&mlxbf_i2c_bus_lock);
>  
> -	devm_free_irq(dev, priv->irq, priv);
> -
>  	i2c_del_adapter(&priv->adap);
>  
>  	return 0;
> -- 
> 2.7.4
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2021-03-31  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  8:56 [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq Tian Tao
2021-03-23 23:56 ` Khalil Blaiech
2021-03-31  7:25 ` Wolfram Sang [this message]

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=20210331072537.GD1025@ninjato \
    --to=wsa@kernel.org \
    --cc=kblaiech@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=tiantao6@hisilicon.com \
    /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.