Re: [PATCH v2 1/1] EDAC: kill ->show_interleave_mode()

From: Borislav Petkov
Date: Mon Jan 23 2017 - 07:04:36 EST


On Sun, Jan 22, 2017 at 06:28:06PM +0100, Nicolas Iooss wrote:
> Function sbridge_register_mci() sets pvt->info.show_interleave_mode to
> knl_show_interleave_mode() on Knight's Landing and
> show_interleave_mode() anywhere else. These functions are only called in
> a debug statement and knl_show_interleave_mode() implementation causes a
> compiler warning (the compiler fails to understand that the default
> branch of the switch condition can never be reached because reg is a
> 2-bit value).
>
> Merge show_interleave_mode() and knl_show_interleave_mode() in a single
> implementation and use it without an indirect function pointer.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@xxxxxxx>
> ---
> drivers/edac/sb_edac.c | 44 ++++++++++----------------------------------
> 1 file changed, 10 insertions(+), 34 deletions(-)

Applied, thanks.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.