On 02/14/2018 09:05 PM, Stephen Rothwell wrote: > Hi Progyan, > > On Thu, 15 Feb 2018 09:50:03 +0530 Progyan Bhattacharya <bprog...@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