All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerald Schaefer <gerald.schaefer-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
Subject: Re: [PATCH 1/3] iommu: Return ERR_PTR() values from device_group call-backs
Date: Wed, 28 Jun 2017 17:48:08 +0200	[thread overview]
Message-ID: <20170628174808.09a85fc6@thinkpad> (raw)
In-Reply-To: <1498651258-23700-1-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>

On Wed, 28 Jun 2017 14:00:56 +0200
Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> wrote:

> From: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
> 
> The generic device_group call-backs in iommu.c return NULL
> in case of error. Since they are getting ERR_PTR values from
> iommu_group_alloc(), just pass them up instead.
> 
> Reported-by: Gerald Schaefer <gerald.schaefer-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
> ---

Looks good,
Reviewed-by: Gerald Schaefer <gerald.schaefer-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>


>  drivers/iommu/iommu.c | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index cf7ca7e..de09e1e 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -915,13 +915,7 @@ static int get_pci_alias_or_group(struct pci_dev *pdev, u16 alias, void *opaque)
>   */
>  struct iommu_group *generic_device_group(struct device *dev)
>  {
> -	struct iommu_group *group;
> -
> -	group = iommu_group_alloc();
> -	if (IS_ERR(group))
> -		return NULL;
> -
> -	return group;
> +	return iommu_group_alloc();
>  }
> 
>  /*
> @@ -988,11 +982,7 @@ struct iommu_group *pci_device_group(struct device *dev)
>  		return group;
> 
>  	/* No shared group found, allocate new */
> -	group = iommu_group_alloc();
> -	if (IS_ERR(group))
> -		return NULL;
> -
> -	return group;
> +	return iommu_group_alloc();
>  }
> 
>  /**

WARNING: multiple messages have this Message-ID (diff)
From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Suman Anna <s-anna@ti.com>, Joerg Roedel <jroedel@suse.de>
Subject: Re: [PATCH 1/3] iommu: Return ERR_PTR() values from device_group call-backs
Date: Wed, 28 Jun 2017 17:48:08 +0200	[thread overview]
Message-ID: <20170628174808.09a85fc6@thinkpad> (raw)
In-Reply-To: <1498651258-23700-1-git-send-email-joro@8bytes.org>

On Wed, 28 Jun 2017 14:00:56 +0200
Joerg Roedel <joro@8bytes.org> wrote:

> From: Joerg Roedel <jroedel@suse.de>
> 
> The generic device_group call-backs in iommu.c return NULL
> in case of error. Since they are getting ERR_PTR values from
> iommu_group_alloc(), just pass them up instead.
> 
> Reported-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---

Looks good,
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>


>  drivers/iommu/iommu.c | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index cf7ca7e..de09e1e 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -915,13 +915,7 @@ static int get_pci_alias_or_group(struct pci_dev *pdev, u16 alias, void *opaque)
>   */
>  struct iommu_group *generic_device_group(struct device *dev)
>  {
> -	struct iommu_group *group;
> -
> -	group = iommu_group_alloc();
> -	if (IS_ERR(group))
> -		return NULL;
> -
> -	return group;
> +	return iommu_group_alloc();
>  }
> 
>  /*
> @@ -988,11 +982,7 @@ struct iommu_group *pci_device_group(struct device *dev)
>  		return group;
> 
>  	/* No shared group found, allocate new */
> -	group = iommu_group_alloc();
> -	if (IS_ERR(group))
> -		return NULL;
> -
> -	return group;
> +	return iommu_group_alloc();
>  }
> 
>  /**

  parent reply	other threads:[~2017-06-28 15:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 12:00 [PATCH 1/3] iommu: Return ERR_PTR() values from device_group call-backs Joerg Roedel
2017-06-28 12:00 ` Joerg Roedel
     [not found] ` <1498651258-23700-1-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2017-06-28 12:00   ` [PATCH 2/3] iommu/omap: Return ERR_PTR in device_group call-back Joerg Roedel
2017-06-28 12:00     ` Joerg Roedel
     [not found]     ` <1498651258-23700-2-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2017-06-28 16:32       ` Suman Anna via iommu
2017-06-28 16:32         ` Suman Anna
2017-06-28 12:00   ` [PATCH 3/3] iommu: Warn once when device_group callback returns NULL Joerg Roedel
2017-06-28 12:00     ` Joerg Roedel
2017-06-28 15:48   ` Gerald Schaefer [this message]
2017-06-28 15:48     ` [PATCH 1/3] iommu: Return ERR_PTR() values from device_group call-backs Gerald Schaefer

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=20170628174808.09a85fc6@thinkpad \
    --to=gerald.schaefer-ta70fqpds9bqt0dzr+alfa@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
    --cc=jroedel-l3A5Bk7waGM@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.