lkml.org 
[lkml]   [2018]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Build: Scripts/Makefile: Remove Repeated Lines
From
Date
On 02/14/2018 09:05 PM, Stephen Rothwell wrote:
> Hi Progyan,
>
> On Thu, 15 Feb 2018 09:50:03 +0530 Progyan Bhattacharya <bprogyan@gmail.com> wrote:
>>
>
>> PS: I have another question, Is use of range expression within case
>> statements allowed in Kernel? If not, are we using If-Else ladder for that?
>
> I am not sure if we have a policy on ranges in case labels, but it is
> not standard C (well, C11 at least). If-else ladders are certainly
> common.

I found 964 case ranges in 4.16-rc1.

or you use something like:

switch (val) {
case 5:
case 10:
case 15:
// handle multiples of 5:
break;
default:
}



--
~Randy

\
 
 \ /
  Last update: 2018-02-15 06:25    [W:0.039 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site