Re: [PATCH] Staging: rtl8192u: fix brace style coding issue in r819xU_firmware.c

From: Joe Perches
Date: Thu Sep 04 2014 - 11:32:38 EST


On Thu, 2014-09-04 at 20:41 +0530, Chaitra Ramaiah wrote:
[]
> diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
[]
> @@ -153,11 +153,10 @@ static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
> break;
> }while(check_bootOk_time--);
>
> - if (!(CPU_status&CPU_GEN_BOOT_RDY)) {
> + if (!(CPU_status&CPU_GEN_BOOT_RDY))
> goto CPUCheckMainCodeOKAndTurnOnCPU_Fail;
> - } else {
> + else
> RT_TRACE(COMP_FIRMWARE, "Download Firmware: Boot ready!\n");
> - }

This would be better as:

if (!(CPU_status & CPU_GEN_BOOT_RDY))
goto CPUCheckMainCodeOKandTurnOnCPU_Fail;

RT_TRACE(etc...)

It'd be nice to eliminate the StudlyCaps and
rather long labels too.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/