* [PATCH] dmaengine: nbpfaxi: mark expected switch fall-through
@ 2017-10-13 20:17 Gustavo A. R. Silva
2017-10-16 6:48 ` Vinod Koul
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-13 20:17 UTC (permalink / raw)
To: Dan Williams, Vinod Koul; +Cc: dmaengine, linux-kernel, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/dma/nbpfaxi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index d3f918a..68a3a83 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
default:
pr_warn("%s(): invalid bus width %u\n", __func__, width);
+ /* fall through */
case DMA_SLAVE_BUSWIDTH_1_BYTE:
size = burst;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dmaengine: nbpfaxi: mark expected switch fall-through
2017-10-13 20:17 [PATCH] dmaengine: nbpfaxi: mark expected switch fall-through Gustavo A. R. Silva
@ 2017-10-16 6:48 ` Vinod Koul
0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2017-10-16 6:48 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: Dan Williams, dmaengine, linux-kernel
On Fri, Oct 13, 2017 at 03:17:19PM -0500, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> drivers/dma/nbpfaxi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
> index d3f918a..68a3a83 100644
> --- a/drivers/dma/nbpfaxi.c
> +++ b/drivers/dma/nbpfaxi.c
> @@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
>
> default:
> pr_warn("%s(): invalid bus width %u\n", __func__, width);
> + /* fall through */
can we add more details why we are falling thru and why this value is sane
default..
> case DMA_SLAVE_BUSWIDTH_1_BYTE:
> size = burst;
> }
> --
> 2.7.4
>
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dmaengine: nbpfaxi: Mark expected switch fall-through
2018-07-06 11:47 ` Gustavo A. R. Silva
@ 2018-07-09 11:32 ` Vinod
0 siblings, 0 replies; 6+ messages in thread
From: Vinod @ 2018-07-09 11:32 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: Dan Williams, dmaengine, linux-kernel
On 06-07-18, 06:47, Gustavo A. R. Silva wrote:
> Hi Vinod,
>
> On 07/06/2018 12:56 AM, Vinod wrote:
> > On 02-07-18, 13:06, Gustavo A. R. Silva wrote:
> >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> >> where we are expecting to fall through.
> >>
> >> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> >> ---
> >> drivers/dma/nbpfaxi.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
> >> index 2f9974d..8c7b2e8 100644
> >> --- a/drivers/dma/nbpfaxi.c
> >> +++ b/drivers/dma/nbpfaxi.c
> >> @@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
> >>
> >> default:
> >> pr_warn("%s(): invalid bus width %u\n", __func__, width);
> >> + /* fall through */
> >
> > Hmm this looks okay but am not able to trigger this warning..(used W=1) Did you
> > see this warning on your build, if so what options?
>
> Add this to your Makefile:
>
> KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=2)
Thanks, that did it..
Applied now thanks
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dmaengine: nbpfaxi: Mark expected switch fall-through
2018-07-06 5:56 ` Vinod
@ 2018-07-06 11:47 ` Gustavo A. R. Silva
2018-07-09 11:32 ` Vinod
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-06 11:47 UTC (permalink / raw)
To: Vinod; +Cc: Dan Williams, dmaengine, linux-kernel
Hi Vinod,
On 07/06/2018 12:56 AM, Vinod wrote:
> On 02-07-18, 13:06, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>> drivers/dma/nbpfaxi.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
>> index 2f9974d..8c7b2e8 100644
>> --- a/drivers/dma/nbpfaxi.c
>> +++ b/drivers/dma/nbpfaxi.c
>> @@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
>>
>> default:
>> pr_warn("%s(): invalid bus width %u\n", __func__, width);
>> + /* fall through */
>
> Hmm this looks okay but am not able to trigger this warning..(used W=1) Did you
> see this warning on your build, if so what options?
>
Add this to your Makefile:
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=2)
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dmaengine: nbpfaxi: Mark expected switch fall-through
2018-07-02 18:06 [PATCH] dmaengine: nbpfaxi: Mark " Gustavo A. R. Silva
@ 2018-07-06 5:56 ` Vinod
2018-07-06 11:47 ` Gustavo A. R. Silva
0 siblings, 1 reply; 6+ messages in thread
From: Vinod @ 2018-07-06 5:56 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: Dan Williams, dmaengine, linux-kernel
On 02-07-18, 13:06, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/dma/nbpfaxi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
> index 2f9974d..8c7b2e8 100644
> --- a/drivers/dma/nbpfaxi.c
> +++ b/drivers/dma/nbpfaxi.c
> @@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
>
> default:
> pr_warn("%s(): invalid bus width %u\n", __func__, width);
> + /* fall through */
Hmm this looks okay but am not able to trigger this warning..(used W=1) Did you
see this warning on your build, if so what options?
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] dmaengine: nbpfaxi: Mark expected switch fall-through
@ 2018-07-02 18:06 Gustavo A. R. Silva
2018-07-06 5:56 ` Vinod
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-02 18:06 UTC (permalink / raw)
To: Vinod Koul, Dan Williams; +Cc: dmaengine, linux-kernel, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/dma/nbpfaxi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index 2f9974d..8c7b2e8 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
default:
pr_warn("%s(): invalid bus width %u\n", __func__, width);
+ /* fall through */
case DMA_SLAVE_BUSWIDTH_1_BYTE:
size = burst;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-09 11:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-13 20:17 [PATCH] dmaengine: nbpfaxi: mark expected switch fall-through Gustavo A. R. Silva
2017-10-16 6:48 ` Vinod Koul
2018-07-02 18:06 [PATCH] dmaengine: nbpfaxi: Mark " Gustavo A. R. Silva
2018-07-06 5:56 ` Vinod
2018-07-06 11:47 ` Gustavo A. R. Silva
2018-07-09 11:32 ` Vinod
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).