Skip to contentSkip to conversation

PCI: Remove extra parenthesis from calculate_mem_align()

PATCH In review Ilpo Järvinen 2 participants 2 messages Jun 12, 2024 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Remove extra parenthesis from calculate_mem_align()

RHS of <<= does not need parenthesis so remove them.

---

This patch can be folded into the commit 658bf5d36dc5 ("PCI: Make minimum bridge window alignment reference more obvious") in pci/resource if so desired.

---
 drivers/pci/setup-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/setup-bus.c +1 -1
index 11ee60b9ca71..23082bc0ca37 100644
@@ -960,7 +960,7 @@ static inline resource_size_t calculate_mem_align(resource_size_t *aligns,
 	for (order = 0; order <= max_order; order++) {
 		resource_size_t align1 = 1;
 
-		align1 <<= (order + __ffs(SZ_1M));
+		align1 <<= order + __ffs(SZ_1M);
 
 		if (!align)
 			min_align = align1;
Signature · 1 line
2.39.2
#1 lore raw
Quoted 3 lines · Ilpo Järvinen

RHS of <<= does not need parenthesis so remove them.

Squashed, thanks!

Quoted 25 lines

---

This patch can be folded into the commit 658bf5d36dc5 ("PCI: Make minimum bridge window alignment reference more obvious") in pci/resource if so desired.

---
 drivers/pci/setup-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/setup-bus.c +1 -1
index 11ee60b9ca71..23082bc0ca37 100644
@@ -960,7 +960,7 @@ static inline resource_size_t calculate_mem_align(resource_size_t *aligns,
 	for (order = 0; order <= max_order; order++) {
 		resource_size_t align1 = 1;
 
-		align1 <<= (order + __ffs(SZ_1M));
+		align1 <<= order + __ffs(SZ_1M);
 
 		if (!align)
 			min_align = align1;
Signature · 1 line
2.39.2