lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200917223338.14164-14-marek.behun@nic.cz>
Date:   Fri, 18 Sep 2020 00:33:01 +0200
From:   Marek Behún <marek.behun@....cz>
To:     linux-leds@...r.kernel.org
Cc:     Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        Ondřej Jirman <megous@...ous.com>,
        linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        devicetree@...r.kernel.org,
        Marek Behún <marek.behun@....cz>,
        Álvaro Fernández Rojas 
        <noltari@...il.com>, Kevin Cernekee <cernekee@...il.com>,
        Jaedon Shin <jaedon.shin@...il.com>
Subject: [PATCH leds v2 13/50] leds: bcm6358: cosmetic: use reverse christmas tree

Only a cosmetic change: use reverse christmas tree variables
declaration.

Signed-off-by: Marek Behún <marek.behun@....cz>
Cc: Álvaro Fernández Rojas <noltari@...il.com>
Cc: Kevin Cernekee <cernekee@...il.com>
Cc: Jaedon Shin <jaedon.shin@...il.com>
---
 drivers/leds/leds-bcm6358.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/leds/leds-bcm6358.c b/drivers/leds/leds-bcm6358.c
index 49f703c59ecdc..71c49d5fa811f 100644
--- a/drivers/leds/leds-bcm6358.c
+++ b/drivers/leds/leds-bcm6358.c
@@ -150,11 +150,10 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg,
 static int bcm6358_leds_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *np = dev_of_node(&pdev->dev);
-	struct device_node *child;
+	struct device_node *np, *child;
 	void __iomem *mem;
-	spinlock_t *lock; /* memory lock */
 	unsigned long val;
+	spinlock_t *lock; /* memory lock */
 	u32 clk_div;
 
 	mem = devm_platform_ioremap_resource(pdev, 0);
@@ -167,6 +166,8 @@ static int bcm6358_leds_probe(struct platform_device *pdev)
 
 	spin_lock_init(lock);
 
+	np = dev_of_node(dev);
+
 	val = bcm6358_led_busy(mem);
 	val &= ~(BCM6358_SLED_POLARITY | BCM6358_SLED_CLKDIV_MASK);
 	if (of_property_read_bool(np, "brcm,clk-dat-low"))
@@ -189,8 +190,8 @@ static int bcm6358_leds_probe(struct platform_device *pdev)
 	bcm6358_led_write(mem + BCM6358_REG_CTRL, val);
 
 	for_each_available_child_of_node(np, child) {
-		int rc;
 		u32 reg;
+		int rc;
 
 		if (of_property_read_u32(child, "reg", &reg))
 			continue;
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ