Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2019 15:10:28 +0000
From:      Alexey Dokuchaev <danfe@freebsd.org>
To:        Alexander Motin <mav@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r345815 - in head: lib/libcam sys/cam sys/cam/nvme
Message-ID:  <20190522151028.GA29205@FreeBSD.org>
In-Reply-To: <201904021937.x32JbrRk067921@repo.freebsd.org>
References:  <201904021937.x32JbrRk067921@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 02, 2019 at 07:37:53PM +0000, Alexander Motin wrote:
> New Revision: 345815
> URL: https://svnweb.freebsd.org/changeset/base/345815
> 
> Log:
>   Make cam_error_print() decode NVMe commands.
> 
> Modified: head/sys/cam/nvme/nvme_xpt.c
> ...
> @@ -769,11 +769,13 @@ nvme_proto_debug_out(union ccb *ccb)
>  {
>  	char cdb_str[(sizeof(struct nvme_command) * 3) + 1];
>  
> -	if (ccb->ccb_h.func_code != XPT_NVME_IO)
> +	if (ccb->ccb_h.func_code != XPT_NVME_IO ||
> +	    ccb->ccb_h.func_code != XPT_NVME_ADMIN)
>  		return;

PVS Studio complains that "Expression is always true. Probably the '&&'
operator should be used here".  Can you take a look?

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190522151028.GA29205>