diff mbox

[U-Boot,01/24] drivers: SPI: sunxi SPL: fix warning

Message ID 1479653838-3574-2-git-send-email-andre.przywara@arm.com
State Accepted
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Andre Przywara Nov. 20, 2016, 2:56 p.m. UTC
Somehow an int returning function without a return statement sneaked
in, fix it.
Also fix some whitespace damage on the way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 drivers/mtd/spi/sunxi_spi_spl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jagan Teki Nov. 21, 2016, 9:37 a.m. UTC | #1
On Sun, Nov 20, 2016 at 8:26 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> Somehow an int returning function without a return statement sneaked
> in, fix it.
> Also fix some whitespace damage on the way.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  drivers/mtd/spi/sunxi_spi_spl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c
> index 67c7edd..7502314 100644
> --- a/drivers/mtd/spi/sunxi_spi_spl.c
> +++ b/drivers/mtd/spi/sunxi_spi_spl.c
> @@ -158,9 +158,10 @@ static void spi0_disable_clock(void)
>                              (1 << AHB_RESET_SPI0_SHIFT));
>  }
>
> -static int spi0_init(void)
> +static void spi0_init(void)
>  {
>         unsigned int pin_function = SUNXI_GPC_SPI0;
> +

Applied to u-boot-spi/master

thanks!
Alexander Graf Nov. 21, 2016, 3:28 p.m. UTC | #2
On 20/11/2016 15:56, Andre Przywara wrote:
> Somehow an int returning function without a return statement sneaked
> in, fix it.
> Also fix some whitespace damage on the way.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Reviewed-by: Alexander Graf <agraf@suse.de>

Alex
diff mbox

Patch

diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c
index 67c7edd..7502314 100644
--- a/drivers/mtd/spi/sunxi_spi_spl.c
+++ b/drivers/mtd/spi/sunxi_spi_spl.c
@@ -158,9 +158,10 @@  static void spi0_disable_clock(void)
 			     (1 << AHB_RESET_SPI0_SHIFT));
 }
 
-static int spi0_init(void)
+static void spi0_init(void)
 {
 	unsigned int pin_function = SUNXI_GPC_SPI0;
+
 	if (IS_ENABLED(CONFIG_MACH_SUN50I))
 		pin_function = SUN50I_GPC_SPI0;