From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Thumshirn Date: Thu, 12 Nov 2015 09:59:21 +0000 Subject: Re: [patch] hpsa: logical vs bitwise AND typo Message-Id: <1447322361.2616.10.camel@suse.de> List-Id: References: <20151112094338.GB28432@mwanda> In-Reply-To: <20151112094338.GB28432@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Dan Carpenter , Don Brace , Scott Teel Cc: "James E.J. Bottomley" , iss_storagedev@hp.com, storagedev@pmcs.com, linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org On Thu, 2015-11-12 at 12:43 +0300, Dan Carpenter wrote: > HPSA_DIAG_OPTS_DISABLE_RLD_CACHING is a mask and bitwise AND was > intended here instead of logical &&.  This bug is essentially > harmless, > it means that sometimes we don't print a warning message which we > wanted > to print. > > Fixes: c2adae44e916 ('hpsa: disable report lun data caching') > Signed-off-by: Dan Carpenter > > diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c > index 6a8f958..a386036 100644 > --- a/drivers/scsi/hpsa.c > +++ b/drivers/scsi/hpsa.c > @@ -8671,7 +8671,7 @@ static void hpsa_disable_rld_caching(struct > ctlr_info *h) >   if ((rc != 0)  || (c->err_info->CommandStatus != 0)) >   goto errout; >   > - if (*options && HPSA_DIAG_OPTS_DISABLE_RLD_CACHING) > + if (*options & HPSA_DIAG_OPTS_DISABLE_RLD_CACHING) >   goto out; >   >  errout: Reviewed-by: Johannes Thumshirn > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" > in > the body of a message to majordomo@vger.kernel.org > More majordomo info at  http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Thumshirn Subject: Re: [patch] hpsa: logical vs bitwise AND typo Date: Thu, 12 Nov 2015 10:59:21 +0100 Message-ID: <1447322361.2616.10.camel@suse.de> References: <20151112094338.GB28432@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mx2.suse.de ([195.135.220.15]:45052 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753644AbbKLJ7Y (ORCPT ); Thu, 12 Nov 2015 04:59:24 -0500 In-Reply-To: <20151112094338.GB28432@mwanda> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Dan Carpenter , Don Brace , Scott Teel Cc: "James E.J. Bottomley" , iss_storagedev@hp.com, storagedev@pmcs.com, linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org On Thu, 2015-11-12 at 12:43 +0300, Dan Carpenter wrote: > HPSA_DIAG_OPTS_DISABLE_RLD_CACHING is a mask and bitwise AND was > intended here instead of logical &&.=C2=A0=C2=A0This bug is essential= ly > harmless, > it means that sometimes we don't print a warning message which we > wanted > to print. >=20 > Fixes: c2adae44e916 ('hpsa: disable report lun data caching') > Signed-off-by: Dan Carpenter >=20 > diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c > index 6a8f958..a386036 100644 > --- a/drivers/scsi/hpsa.c > +++ b/drivers/scsi/hpsa.c > @@ -8671,7 +8671,7 @@ static void hpsa_disable_rld_caching(struct > ctlr_info *h) > =C2=A0 if ((rc !=3D 0)=C2=A0=C2=A0|| (c->err_info->CommandStatus !=3D= 0)) > =C2=A0 goto errout; > =C2=A0 > - if (*options && HPSA_DIAG_OPTS_DISABLE_RLD_CACHING) > + if (*options & HPSA_DIAG_OPTS_DISABLE_RLD_CACHING) > =C2=A0 goto out; > =C2=A0 > =C2=A0errout: Reviewed-by: Johannes Thumshirn > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi"= =20 > in > the body of a message to majordomo@vger.kernel.org > More majordomo info at=C2=A0=C2=A0http://vger.kernel.org/majordomo-in= fo.html -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html