• Mathieu Malaterre's avatar
    cxl: remove a dead branch · e4ecafb1
    Mathieu Malaterre authored
    In commit 14baf4d9 ("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: default avatarMathieu Malaterre <malat@debian.org>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    e4ecafb1
guest.c 27.4 KB