cxl: remove a dead branch

Michael Ellerman patch-notifications at ellerman.id.au
Mon Aug 13 21:22:55 AEST 2018


On Thu, 2018-03-22 at 21:05:28 UTC, Mathieu Malaterre wrote:
> In commit 14baf4d9c739 ("cxl: Add guest-specific code") the following code
> was added:
> 
> 	if (afu->crs_len < 0) {
> 		dev_err(&afu->dev, "Unexpected configuration record size value\n");
> 		return -EINVAL;
> 	}
> 
> However the variable `crs_len` is of type u64 and cannot be compared < 0.
> Remove the dead code section. Fix the following warning treated as error
> with W=1:
> 
> ../drivers/misc/cxl/guest.c:919:19: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
> 
> Signed-off-by: Mathieu Malaterre <malat at debian.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/e4ecafb14fd9cd77d8f4320af1922e

cheers


More information about the Linuxppc-dev mailing list