diff mbox series

[U-Boot,020/080] spi: spi-uclass: Fix style violations

Message ID 20170929125238.26226-20-mario.six@gdsys.cc
State Accepted
Commit 24fc1ec2ee71cd852e556f90bd352cc809ddeef9
Delegated to: Wolfgang Denk
Headers show
Series [U-Boot,001/080] mpc8308rdb: Fix style violation | expand

Commit Message

Mario Six Sept. 29, 2017, 12:51 p.m. UTC
Remove a superfluous newline, and reduce the scope of a variable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
---
 drivers/spi/spi-uclass.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Simon Glass Oct. 9, 2017, 4:47 a.m. UTC | #1
On 29 September 2017 at 06:51, Mario Six <mario.six@gdsys.cc> wrote:
> Remove a superfluous newline, and reduce the scope of a variable.
>
> Signed-off-by: Mario Six <mario.six@gdsys.cc>
> ---
>  drivers/spi/spi-uclass.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Jagan Teki Oct. 9, 2017, 9:36 a.m. UTC | #2
On Fri, Sep 29, 2017 at 6:21 PM, Mario Six <mario.six@gdsys.cc> wrote:
> Remove a superfluous newline, and reduce the scope of a variable.
>
> Signed-off-by: Mario Six <mario.six@gdsys.cc>
> ---

Reviewed-by: Jagan Teki <jagan@openedev.com>

thanks!
diff mbox series

Patch

diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 6db0eb02b4..15d90a54a1 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -50,7 +50,6 @@  int dm_spi_claim_bus(struct udevice *dev)
 	struct dm_spi_bus *spi = dev_get_uclass_priv(bus);
 	struct spi_slave *slave = dev_get_parent_priv(dev);
 	int speed;
-	int ret;
 
 	speed = slave->max_hz;
 	if (spi->max_hz) {
@@ -62,7 +61,8 @@  int dm_spi_claim_bus(struct udevice *dev)
 	if (!speed)
 		speed = 100000;
 	if (speed != slave->speed) {
-		ret = spi_set_speed_mode(bus, speed, slave->mode);
+		int ret = spi_set_speed_mode(bus, speed, slave->mode);
+
 		if (ret)
 			return ret;
 		slave->speed = speed;
@@ -129,7 +129,6 @@  static int spi_post_probe(struct udevice *bus)
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 	struct dm_spi_ops *ops = spi_get_ops(bus);
 
-
 	if (ops->claim_bus)
 		ops->claim_bus += gd->reloc_off;
 	if (ops->release_bus)