[PATCH] atm: idt77252: remove redundant bit-wise or'ing of zero

Subsystems: atm, the rest

STALE3112d

2 messages, 2 authors, 2018-02-23 · open the first message on its own page

[PATCH] atm: idt77252: remove redundant bit-wise or'ing of zero

From: Colin King <hidden>
Date: 2018-02-23 12:22:55

From: Colin Ian King <redacted>

Zero is being bit-wise or'd in a calculation twice; these are redundant
and can be removed.

Signed-off-by: Colin Ian King <redacted>
---
 drivers/atm/idt77252.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 0277f36be85b..6e737142ceaa 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3173,14 +3173,10 @@ static void init_sram(struct idt77252_dev *card)
 				    (u32) 0xffffffff);
 	}
 
-	writel((SAR_FBQ0_LOW << 28) | 0x00000000 | 0x00000000 |
-	       (SAR_FB_SIZE_0 / 48), SAR_REG_FBQS0);
-	writel((SAR_FBQ1_LOW << 28) | 0x00000000 | 0x00000000 |
-	       (SAR_FB_SIZE_1 / 48), SAR_REG_FBQS1);
-	writel((SAR_FBQ2_LOW << 28) | 0x00000000 | 0x00000000 |
-	       (SAR_FB_SIZE_2 / 48), SAR_REG_FBQS2);
-	writel((SAR_FBQ3_LOW << 28) | 0x00000000 | 0x00000000 |
-	       (SAR_FB_SIZE_3 / 48), SAR_REG_FBQS3);
+	writel((SAR_FBQ0_LOW << 28) | (SAR_FB_SIZE_0 / 48), SAR_REG_FBQS0);
+	writel((SAR_FBQ1_LOW << 28) | (SAR_FB_SIZE_1 / 48), SAR_REG_FBQS1);
+	writel((SAR_FBQ2_LOW << 28) | (SAR_FB_SIZE_2 / 48), SAR_REG_FBQS2);
+	writel((SAR_FBQ3_LOW << 28) | (SAR_FB_SIZE_3 / 48), SAR_REG_FBQS3);
 
 	/* Initialize rate table  */
 	for (i = 0; i < 256; i++) {
-- 
2.15.1

Re: [PATCH] atm: idt77252: remove redundant bit-wise or'ing of zero

From: David Miller <davem@davemloft.net>
Date: 2018-02-23 17:45:07

From: Colin King <redacted>
Date: Fri, 23 Feb 2018 12:22:52 +0000
From: Colin Ian King <redacted>

Zero is being bit-wise or'd in a calculation twice; these are redundant
and can be removed.

Signed-off-by: Colin Ian King <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help