Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755213Ab3IYWGz (ORCPT ); Wed, 25 Sep 2013 18:06:55 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:51672 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754729Ab3IYWGx (ORCPT ); Wed, 25 Sep 2013 18:06:53 -0400 Date: Wed, 25 Sep 2013 15:06:51 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Andrew Morton cc: Dave Jones , KOSAKI Motohiro , Chen Gang , Rik van Riel , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch] mm, mempolicy: make mpol_to_str robust and always succeed In-Reply-To: <20130925143009.913fb1c042abe10d91c86c8b@linux-foundation.org> Message-ID: References: <5215639D.1080202@asianux.com> <5227CF48.5080700@asianux.com> <20130925031127.GA4210@redhat.com> <20130925032530.GA4771@redhat.com> <20130925143009.913fb1c042abe10d91c86c8b@linux-foundation.org> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1051 Lines: 39 On Wed, 25 Sep 2013, Andrew Morton wrote: > > I fully agree and have code in the oom killer that has the "fall through" > > comment if there's code in between the case statements, but I think things > > like > > > > case MPOL_BIND: > > case MPOL_INTERLEAVE: > > ... > > > > is quite easy to read. I don't feel strongly at all, though, so I'll just > > leave it to Andrew's preference. > > I've never even thought about it, but that won't prevent me from > pretending otherwise! How about: > > This: > > case WIBBLE: > something(); > something_else(); > case WOBBLE: > > needs a /* fall through */ comment (because it *looks* like a mistake), > whereas > > case WIBBLE: > case WOBBLE: > > does not? > The switch-case examples given in Documentation/CodingStyle agree with that. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/