Re: [PATCH] EDAC, sb_edac: mark expected switch fall-through

2017-10-16 Thread Gustavo A. R. Silva


Quoting Borislav Petkov :


On Mon, Oct 16, 2017 at 03:00:53AM +, Zhuo, Qiuxu wrote:

Hi Silva,

The actual intention of the code is NOT to fall through, though  
current code can work correctly.
Thanks for this finding. If you don't mind, I'll submit a fix  
patch for it with the tag 'Reported-by:' by you.


I'd prefer if Gustavo would submit a patch fixing that, as he caught it
and I'd prefer if you don't top-post on public mailing lists please.



I can do that. I will send a patch shortly.

Thanks
--
Gustavo A. R. Silva






Re: [PATCH] EDAC, sb_edac: mark expected switch fall-through

2017-10-16 Thread Gustavo A. R. Silva


Quoting Borislav Petkov :


On Mon, Oct 16, 2017 at 03:00:53AM +, Zhuo, Qiuxu wrote:

Hi Silva,

The actual intention of the code is NOT to fall through, though  
current code can work correctly.
Thanks for this finding. If you don't mind, I'll submit a fix  
patch for it with the tag 'Reported-by:' by you.


I'd prefer if Gustavo would submit a patch fixing that, as he caught it
and I'd prefer if you don't top-post on public mailing lists please.



I can do that. I will send a patch shortly.

Thanks
--
Gustavo A. R. Silva






Re: [PATCH] EDAC, sb_edac: mark expected switch fall-through

2017-10-16 Thread Borislav Petkov
On Mon, Oct 16, 2017 at 03:00:53AM +, Zhuo, Qiuxu wrote:
> Hi Silva,
> 
> The actual intention of the code is NOT to fall through, though current 
> code can work correctly.
> Thanks for this finding. If you don't mind, I'll submit a fix patch for 
> it with the tag 'Reported-by:' by you.

I'd prefer if Gustavo would submit a patch fixing that, as he caught it
and I'd prefer if you don't top-post on public mailing lists please.

Thanks.

-- 
Regards/Gruss,
Boris.

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


Re: [PATCH] EDAC, sb_edac: mark expected switch fall-through

2017-10-16 Thread Borislav Petkov
On Mon, Oct 16, 2017 at 03:00:53AM +, Zhuo, Qiuxu wrote:
> Hi Silva,
> 
> The actual intention of the code is NOT to fall through, though current 
> code can work correctly.
> Thanks for this finding. If you don't mind, I'll submit a fix patch for 
> it with the tag 'Reported-by:' by you.

I'd prefer if Gustavo would submit a patch fixing that, as he caught it
and I'd prefer if you don't top-post on public mailing lists please.

Thanks.

-- 
Regards/Gruss,
Boris.

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


RE: [PATCH] EDAC, sb_edac: mark expected switch fall-through

2017-10-15 Thread Zhuo, Qiuxu
Hi Silva,

The actual intention of the code is NOT to fall through, though current 
code can work correctly.
Thanks for this finding. If you don't mind, I'll submit a fix patch for it 
with the tag 'Reported-by:' by you.

Thanks!
- Qiuxu

> From: linux-edac-ow...@vger.kernel.org [mailto:linux-edac-
> ow...@vger.kernel.org] On Behalf Of Gustavo A. R. Silva
> Sent: Saturday, October 14, 2017 4:28 AM
> To: Mauro Carvalho Chehab ; Borislav Petkov
> 
> Cc: linux-e...@vger.kernel.org; linux-kernel@vger.kernel.org; Gustavo A. R.
> Silva 
> Subject: [PATCH] EDAC, sb_edac: mark expected switch fall-through
> 
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we
> are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva 
> ---
> This code was tested by compilation only (GCC 7.2.0 was used).
> Please, verify if the actual intention of the code is to fall through.
> 
>  drivers/edac/sb_edac.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c index
> 72b98a0..b50d714 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -2485,6 +2485,7 @@ static int ibridge_mci_bind_devs(struct mem_ctl_info
> *mci,
>   case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA0_TA:
>   case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA1_TA:
>   pvt->pci_ta = pdev;
> + /* fall through */
>   case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA0_RAS:
>   case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA1_RAS:


RE: [PATCH] EDAC, sb_edac: mark expected switch fall-through

2017-10-15 Thread Zhuo, Qiuxu
Hi Silva,

The actual intention of the code is NOT to fall through, though current 
code can work correctly.
Thanks for this finding. If you don't mind, I'll submit a fix patch for it 
with the tag 'Reported-by:' by you.

Thanks!
- Qiuxu

> From: linux-edac-ow...@vger.kernel.org [mailto:linux-edac-
> ow...@vger.kernel.org] On Behalf Of Gustavo A. R. Silva
> Sent: Saturday, October 14, 2017 4:28 AM
> To: Mauro Carvalho Chehab ; Borislav Petkov
> 
> Cc: linux-e...@vger.kernel.org; linux-kernel@vger.kernel.org; Gustavo A. R.
> Silva 
> Subject: [PATCH] EDAC, sb_edac: mark expected switch fall-through
> 
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we
> are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva 
> ---
> This code was tested by compilation only (GCC 7.2.0 was used).
> Please, verify if the actual intention of the code is to fall through.
> 
>  drivers/edac/sb_edac.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c index
> 72b98a0..b50d714 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -2485,6 +2485,7 @@ static int ibridge_mci_bind_devs(struct mem_ctl_info
> *mci,
>   case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA0_TA:
>   case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA1_TA:
>   pvt->pci_ta = pdev;
> + /* fall through */
>   case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA0_RAS:
>   case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA1_RAS: