Skip to content

Commit 66da97c

Browse files
gugulotmichalsimek
authored andcommitted
phy: xilinx-xhdmiphy: Fix GT pll-selection allowed range of values
Fix GT rx-pll-selection and tx-pll-selection allowed range of values. This issue is reported by clang with below warnings. drivers/phy/xilinx/xhdmiphy.c:560:14: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare] if (val < 0 && val > 6) { ~~~~~~~^~~~~~~~~ drivers/phy/xilinx/xhdmiphy.c:546:14: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare] if (val < 0 && val > 6) { ~~~~~~~^~~~~~~~~ Signed-off-by: Rajesh Gugulothu <rajesh.gugulothu@amd.com> Reviewed-by: Vishal Sagar <vishal.sagar@amd.com> Acked-by: Gaddipati, Naveen <naveen.gaddipati@amd.com>
1 parent b6f18f6 commit 66da97c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎drivers/phy/xilinx/xhdmiphy.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ static int xhdmiphy_parse_of(struct xhdmiphy_dev *priv)
543543
return rc;
544544
}
545545

546-
if (val < 0 && val > 6) {
546+
if (val < 0 || val > 6) {
547547
dev_err(priv->dev, "dt rx-pll-selection %d is invalid\n",
548548
val);
549549
return -EINVAL;
@@ -557,7 +557,7 @@ static int xhdmiphy_parse_of(struct xhdmiphy_dev *priv)
557557
return rc;
558558
}
559559

560-
if (val < 0 && val > 6) {
560+
if (val < 0 || val > 6) {
561561
dev_err(priv->dev, "dt tx-pll-selection %d is invalid\n",
562562
val);
563563
return -EINVAL;

0 commit comments

Comments
 (0)