[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29d2c48b-6a5c-f1d5-aa43-09988b162388@embeddedor.com>
Date: Fri, 6 Jul 2018 06:47:03 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Vinod <vkoul@...nel.org>
Cc: Dan Williams <dan.j.williams@...el.com>, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dmaengine: nbpfaxi: Mark expected switch fall-through
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@...eddedor.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
Powered by blists - more mailing lists