From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Dunlap Subject: Re: [PATCH] Build: Scripts/Makefile: Remove Repeated Lines Date: Wed, 14 Feb 2018 21:24:55 -0800 Message-ID: References: <20180214092558.5846-1-progyanb@acm.org> <20180214224937.3f2feb80@canb.auug.org.au> <20180215160520.5828f900@canb.auug.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from bombadil.infradead.org ([198.137.202.133]:49726 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbeBOFZI (ORCPT ); Thu, 15 Feb 2018 00:25:08 -0500 In-Reply-To: <20180215160520.5828f900@canb.auug.org.au> Content-Language: en-US Sender: linux-next-owner@vger.kernel.org List-ID: To: Stephen Rothwell , Progyan Bhattacharya Cc: linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, narmstrong@baylibre.com, akpm@linux-foundation.org, Arnd Bergmann , Daniel Golle , Joe Perches On 02/14/2018 09:05 PM, Stephen Rothwell wrote: > Hi Progyan, > > On Thu, 15 Feb 2018 09:50:03 +0530 Progyan Bhattacharya 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