From: Eric Auger <eric.auger@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Baptiste Reynal <b.reynal@virtualopensystems.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
Arnd Bergmann <arnd@arndb.de>,
kvm@vger.kernel.org, kernel-janitors@vger.kernel.org, "Lendacky,
Thomas" <Thomas.Lendacky@amd.com>
Subject: Re: [patch] VFIO: platform: reset: fix a warning message condition
Date: Thu, 17 Dec 2015 12:45:52 +0000 [thread overview]
Message-ID: <5672AE80.3010806@linaro.org> (raw)
In-Reply-To: <20151217122707.GA4267@mwanda>
Hi Dan,
thanks for pointing this out.
Reviewed-by: Eric Auger <eric.auger@linaro.org>
I add Thomas in CC since the bug also exists in the native driver I
think (drivers/net/ethernet/amd/xgbe/drivers/net/ethernet/amd/xgbe
/xgbe-dev.c, xgbe_exit function).
Best Regards
Eric
On 12/17/2015 01:27 PM, Dan Carpenter wrote:
> This loop ends with count set to -1 and not zero so the warning message
> isn't printed when it should be. I've fixed this by change the postop
> to a preop.
>
> Fixes: 0990822c9866 ('VFIO: platform: reset: AMD xgbe reset module')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c
> index da5356f..d4030d0 100644
> --- a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c
> +++ b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c
> @@ -110,7 +110,7 @@ int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev)
> usleep_range(10, 15);
>
> count = 2000;
> - while (count-- && (ioread32(xgmac_regs->ioaddr + DMA_MR) & 1))
> + while (--count && (ioread32(xgmac_regs->ioaddr + DMA_MR) & 1))
> usleep_range(500, 600);
>
> if (!count)
>
WARNING: multiple messages have this Message-ID (diff)
From: Eric Auger <eric.auger@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Baptiste Reynal <b.reynal@virtualopensystems.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
Arnd Bergmann <arnd@arndb.de>,
kvm@vger.kernel.org, kernel-janitors@vger.kernel.org, "Lendacky,
Thomas" <Thomas.Lendacky@amd.com>
Subject: Re: [patch] VFIO: platform: reset: fix a warning message condition
Date: Thu, 17 Dec 2015 13:45:52 +0100 [thread overview]
Message-ID: <5672AE80.3010806@linaro.org> (raw)
In-Reply-To: <20151217122707.GA4267@mwanda>
Hi Dan,
thanks for pointing this out.
Reviewed-by: Eric Auger <eric.auger@linaro.org>
I add Thomas in CC since the bug also exists in the native driver I
think (drivers/net/ethernet/amd/xgbe/drivers/net/ethernet/amd/xgbe
/xgbe-dev.c, xgbe_exit function).
Best Regards
Eric
On 12/17/2015 01:27 PM, Dan Carpenter wrote:
> This loop ends with count set to -1 and not zero so the warning message
> isn't printed when it should be. I've fixed this by change the postop
> to a preop.
>
> Fixes: 0990822c9866 ('VFIO: platform: reset: AMD xgbe reset module')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c
> index da5356f..d4030d0 100644
> --- a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c
> +++ b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c
> @@ -110,7 +110,7 @@ int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev)
> usleep_range(10, 15);
>
> count = 2000;
> - while (count-- && (ioread32(xgmac_regs->ioaddr + DMA_MR) & 1))
> + while (--count && (ioread32(xgmac_regs->ioaddr + DMA_MR) & 1))
> usleep_range(500, 600);
>
> if (!count)
>
next prev parent reply other threads:[~2015-12-17 12:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 12:27 [patch] VFIO: platform: reset: fix a warning message condition Dan Carpenter
2015-12-17 12:27 ` Dan Carpenter
2015-12-17 12:45 ` Eric Auger [this message]
2015-12-17 12:45 ` Eric Auger
2015-12-17 13:13 ` Dan Carpenter
2015-12-17 13:13 ` Dan Carpenter
2015-12-22 20:09 ` Alex Williamson
2015-12-22 20:09 ` Alex Williamson
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=5672AE80.3010806@linaro.org \
--to=eric.auger@linaro.org \
--cc=Thomas.Lendacky@amd.com \
--cc=alex.williamson@redhat.com \
--cc=arnd@arndb.de \
--cc=b.reynal@virtualopensystems.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 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.