Re: [PATCH 05/25] MIPS: ath79: Avoid using unitialized 'reg' variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

On Mon, Jun 25, 2018 at 07:15:29PM +0200, John Crispin wrote:
> diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c
> index cd6055f9e7a0..fc3438150b3e 100644
> --- a/arch/mips/ath79/common.c
> +++ b/arch/mips/ath79/common.c
> @@ -110,7 +110,7 @@ void ath79_device_reset_set(u32 mask)
>  	else if (soc_is_qca956x() || soc_is_tp9343())
>  		reg = QCA956X_RESET_REG_RESET_MODULE;
>  	else
> -		BUG();
> +		panic("Reset register not defined for this SOC");
>  
>  	spin_lock_irqsave(&ath79_device_reset_lock, flags);
>  	t = ath79_reset_rr(reg);
> @@ -142,7 +142,7 @@ void ath79_device_reset_clear(u32 mask)
>  	else if (soc_is_qca956x() || soc_is_tp9343())
>  		reg = QCA956X_RESET_REG_RESET_MODULE;
>  	else
> -		BUG();
> +		panic("Reset register not defined for this SOC");
>  
>  	spin_lock_irqsave(&ath79_device_reset_lock, flags);
>  	t = ath79_reset_rr(reg);

This was rejected when first submitted nearly back in 2013:

    https://patchwork.linux-mips.org/patch/5742/

...and indeed I agree with Ralf's message from back then that it seems
odd for GCC to now be recognizing that code beyond a BUG() is
unreachable.

Could you specify which version(s) of GCC are problematic?

Thanks,
    Paul




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux