From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP1aQ-0007Qn-JM for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:59:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP1aM-0002FV-H8 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:59:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP1aM-0002FR-BS for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:59:22 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD8E91555E for ; Mon, 18 Jul 2016 05:59:21 +0000 (UTC) References: <1468572278-24477-1-git-send-email-pbonzini@redhat.com> From: Jason Wang Message-ID: <578C7035.60504@redhat.com> Date: Mon, 18 Jul 2016 13:59:17 +0800 MIME-Version: 1.0 In-Reply-To: <1468572278-24477-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] e1000e: fix incorrect access to pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org On 2016=E5=B9=B407=E6=9C=8815=E6=97=A5 16:44, Paolo Bonzini wrote: > This is not dereferencing the pointer, and instead checking only > the value of the pointer. > > Signed-off-by: Paolo Bonzini > --- > hw/net/e1000e_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c > index 6050d8b..badb1fe 100644 > --- a/hw/net/e1000e_core.c > +++ b/hw/net/e1000e_core.c > @@ -281,7 +281,7 @@ e1000e_intrmgr_delay_rx_causes(E1000ECore *core, ui= nt32_t *causes) > =20 > /* Check if delayed RX interrupts disabled by client > or if there are causes that cannot be delayed */ > - if ((rdtr =3D=3D 0) || (causes !=3D 0)) { > + if ((rdtr =3D=3D 0) || (*causes !=3D 0)) { > return false; > } > =20 > @@ -322,7 +322,7 @@ e1000e_intrmgr_delay_tx_causes(E1000ECore *core, ui= nt32_t *causes) > *causes &=3D ~delayable_causes; > =20 > /* If there are causes that cannot be delayed */ > - if (causes !=3D 0) { > + if (*causes !=3D 0) { > return false; > } > =20 Applied to -net. Thanks