[v4,03/19] irqdomain: Drop leftover brackets

Message ID 20230116135044.14998-4-johan+linaro@kernel.org
State New
Headers
Series irqdomain: fix mapping race and clean up locking |

Commit Message

Johan Hovold Jan. 16, 2023, 1:50 p.m. UTC
  Drop some unnecessary brackets that were left in place when the
corresponding code was updated.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
Tested-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 kernel/irq/irqdomain.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Comments

Thomas Gleixner Jan. 17, 2023, 9:19 p.m. UTC | #1
On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote:
> Drop some unnecessary brackets that were left in place when the
> corresponding code was updated.

This is really the wrong patch order. Real fixes first, then the
cleanups and cosmetics.
  
Johan Hovold Jan. 18, 2023, 9:05 a.m. UTC | #2
On Tue, Jan 17, 2023 at 10:19:02PM +0100, Thomas Gleixner wrote:
> On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote:
> > Drop some unnecessary brackets that were left in place when the
> > corresponding code was updated.
> 
> This is really the wrong patch order. Real fixes first, then the
> cleanups and cosmetics.

Yeah, that's what I'd normally do. Perhaps I took Marc's:

	No, let's put the code in shape *first*, then add work on the
	locking, as it should make the patch simpler. Backports aren't
	my concern, really.

	https://lore.kernel.org/lkml/87v8rhwf9r.wl-maz@kernel.org/

too literally.

Johan
  

Patch

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index fe9ec53fe7aa..dfd60bd49109 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -219,9 +219,8 @@  struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, unsigned int s
 	domain->host_data = host_data;
 	domain->hwirq_max = hwirq_max;
 
-	if (direct_max) {
+	if (direct_max)
 		domain->flags |= IRQ_DOMAIN_FLAG_NO_MAP;
-	}
 
 	domain->revmap_size = size;
 
@@ -615,9 +614,8 @@  void irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base,
 	pr_debug("%s(%s, irqbase=%i, hwbase=%i, count=%i)\n", __func__,
 		of_node_full_name(of_node), irq_base, (int)hwirq_base, count);
 
-	for (i = 0; i < count; i++) {
+	for (i = 0; i < count; i++)
 		irq_domain_associate(domain, irq_base + i, hwirq_base + i);
-	}
 }
 EXPORT_SYMBOL_GPL(irq_domain_associate_many);