]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
cxl: remove a dead branch
authorMathieu Malaterre <malat@debian.org>
Thu, 22 Mar 2018 21:05:28 +0000 (22:05 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 10 Aug 2018 12:12:36 +0000 (22:12 +1000)
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@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/guest.c

index f5dc740fcd13aa1fd320b547783bd7437766f251..3bc0c15d4d85b7f16e8ad10fa00847c17ee5dc7e 100644 (file)
@@ -913,11 +913,6 @@ static int afu_properties_look_ok(struct cxl_afu *afu)
                return -EINVAL;
        }
 
-       if (afu->crs_len < 0) {
-               dev_err(&afu->dev, "Unexpected configuration record size value\n");
-               return -EINVAL;
-       }
-
        return 0;
 }