Re: [PATCH v5 5/5] x86/CPU/AMD: Print the reason for the last reset

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

 



* Borislav Petkov <bp@xxxxxxxxx> wrote:

> +	for (i = 0; i <= ARRAY_SIZE(s5_reset_reason_txt); i++) {
> +		if (!(value & BIT(i)))
>  			continue;
>  
> -		nr_reasons++;
> -		pr_info("x86/amd: Previous system reset reason [0x%08lx]: %s\n",
> -			value, s5_reset_reason_txt[bit]);
> +		if (s5_reset_reason_txt[i])
> +			pr_info("x86/amd: Previous system reset reason [0x%08lx]: %s\n",
> +				value, s5_reset_reason_txt[i]);
>  	}

Yeah, this is much more straightforward code that gets us all the 
information - as diagnostics code should be.

Thanks,

	Ingo




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux