From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz0C4-0003B8-HD for qemu-devel@nongnu.org; Thu, 11 Dec 2014 04:38:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz0Bz-0003II-IH for qemu-devel@nongnu.org; Thu, 11 Dec 2014 04:37:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz0Bz-0003I3-Ae for qemu-devel@nongnu.org; Thu, 11 Dec 2014 04:37:51 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBB9bnKh029921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 11 Dec 2014 04:37:50 -0500 Date: Thu, 11 Dec 2014 17:38:07 +0800 From: Amos Kong Message-ID: <20141211093807.GB4076@air.redhat.com> References: <236dc0c1f599c40fd608de173e08402e0d43a1b6.1418284167.git.amit.shah@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Content-Disposition: inline In-Reply-To: <236dc0c1f599c40fd608de173e08402e0d43a1b6.1418284167.git.amit.shah@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/1] virtio-rng: fix check for period_ms validity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu list --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 11, 2014 at 01:19:27PM +0530, Amit Shah wrote: > This was reported for this warning: >=20 > hw/virtio/virtio-rng.c:150:31: warning: logical not is only applied to > the left hand side of comparison [-Wlogical-not-parentheses] >=20 > Reported-by: dcb > Suggested-by: dcb > Bug: https://bugs.launchpad.net/qemu/+bug/1393486 > Signed-off-by: Amit Shah > --- > hw/virtio/virtio-rng.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c > index 473c044..06e7178 100644 > --- a/hw/virtio/virtio-rng.c > +++ b/hw/virtio/virtio-rng.c > @@ -149,7 +149,7 @@ static void virtio_rng_device_realize(DeviceState *de= v, Error **errp) > VirtIORNG *vrng =3D VIRTIO_RNG(dev); > Error *local_err =3D NULL; > =20 > - if (!vrng->conf.period_ms > 0) { > + if (vrng->conf.period_ms <=3D 0) { Thanks. Reviewed-by: Amos Kong > error_setg(errp, "'period' parameter expects a positive integer"= ); > return; > } > --=20 > 2.1.0 --=20 Amos. --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUiWX/AAoJELxSv6I5vP9jZzoP/jQP9Nb7mzx/SmTUfyV9xvjW rEZCQfPdssDO5FUU4IMjmxLZp0R9nxiRCc+byko+QxHJYlIKp6oskEdlVAeG4kX4 VSbUbEctL+9FUWJd4sBq3jwfayBZ1zLMpI7Pcg6af311DUaZcQGODXe4cIr5vPG5 /fz6eWEHhToxpAVUZIuOQhyrWHH485hU8ux0l6Wb/jbtqc4NKD2/5h8rASWnkK1C zKvL43NCRqD2BUyA37nxrW6e02h/aHcirFqNz2/24Y3+4bdz4pBaVQLI17Ai7RTN k75OSieDc2d2GuUOXNtXTTfskoUwvBJ/zng9nAf6969ihMcVJr7J0FJlXreuYKkx tZN3bESfH/UaE2zdTrFPCyuxkU17br8+P4nTmjEF4RFF4UybL8vT80cgXgcHi+Bz pqD5SNLGe5MuUoQLfCu7yCuxr0GgKEFrrKiviCatG2zWCbTW9zNoeVEsINIFlWKt GPaB+V1YEX3qpeicRpIhiRwWJ5qRhbuX2FRX2oH1mpUHIVNpWKfyNYC2j5W/Z5Qy OABBgtoLrfnDzPzojUpLYvuDA+W8aHAFd9jCR/Ak3WFMVYleTu4pRui4m5+0bS7K j0FHk1I6B2rMoPFy+kytj21zr6oZdEXH+z9PnIh9VNn4ucY+sa/H2DQs5QDRrI07 6zwV0QoetqONGhQ+//xj =FMp7 -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU--