linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxl: remove a dead branch
@ 2018-03-22 21:05 Mathieu Malaterre
  2018-03-27 16:53 ` Frederic Barrat
  2018-08-13 11:22 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Mathieu Malaterre @ 2018-03-22 21:05 UTC (permalink / raw)
  To: Frederic Barrat
  Cc: Christophe Lombard, linuxppc-dev, Andrew Donnellan,
	Mathieu Malaterre

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>
---
 drivers/misc/cxl/guest.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
index f58b4b6c79f2..48103fcff0b5 100644
--- a/drivers/misc/cxl/guest.c
+++ b/drivers/misc/cxl/guest.c
@@ -916,11 +916,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;
 }
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-14  4:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-22 21:05 [PATCH] cxl: remove a dead branch Mathieu Malaterre
2018-03-27 16:53 ` Frederic Barrat
2018-08-13 11:22 ` Michael Ellerman
2018-08-13 11:25   ` Mathieu Malaterre
2018-08-14  4:13     ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).