From: Alex Williamson <alex.williamson@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kvm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] vfio: Use ERR_CAST() instead of open coding it
Date: Tue, 13 Jun 2017 09:30:50 -0600 [thread overview]
Message-ID: <20170613093050.76c65d1a@w520.home> (raw)
In-Reply-To: <20170518073431.sc6x2at4n4j7hngu@mwanda>
On Thu, 18 May 2017 10:34:31 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> It's a small cleanup to use ERR_CAST() here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
> index 561084ab387f..6a49485eb49d 100644
> --- a/drivers/vfio/vfio.c
> +++ b/drivers/vfio/vfio.c
> @@ -382,7 +382,7 @@ static struct vfio_group *vfio_create_group(struct iommu_group *iommu_group)
> if (IS_ERR(dev)) {
> vfio_free_group_minor(minor);
> vfio_group_unlock_and_free(group);
> - return (struct vfio_group *)dev; /* ERR_PTR */
> + return ERR_CAST(dev);
> }
>
> group->minor = minor;
Applied to next branch for v4.13, thanks Dan!
Alex
prev parent reply other threads:[~2017-06-13 15:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 7:34 [PATCH] vfio: Use ERR_CAST() instead of open coding it Dan Carpenter
2017-06-13 15:30 ` Alex Williamson [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=20170613093050.76c65d1a@w520.home \
--to=alex.williamson@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox