Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933560AbbBDLmr (ORCPT ); Wed, 4 Feb 2015 06:42:47 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:48233 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932433AbbBDLmp (ORCPT ); Wed, 4 Feb 2015 06:42:45 -0500 Date: Wed, 4 Feb 2015 14:42:13 +0300 From: Dan Carpenter To: Nicholas Mc Guire Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Abel Moyo , Larry Finger Subject: Re: [PATCH] staging: rtl8188eu: core: switch with redundant cases Message-ID: <20150204114213.GA5336@mwanda> References: <1423047878-5783-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423047878-5783-1-git-send-email-hofrat@osadl.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet21.oracle.com [141.146.126.237] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1158 Lines: 30 On Wed, Feb 04, 2015 at 06:04:38AM -0500, Nicholas Mc Guire wrote: > A few redundant switch cases as well as a redundant if/else > within one of the cases was consolidated to a single call. > The cases are intentionally retained for documentation purposes. This statement is not clear. It obviously causes a bug if you just start deleting case statements. > > Signed-off-by: Nicholas Mc Guire > --- > case WIFI_REASSOCREQ,WIFI_PROBEREQ,WIFI_BEACON,WIFI_ACTION all > have the same effect - notably the also for WIFI_PROBEREQ where > the if/else is executing the same function. > > These redundant cases could all be dropped and consolidated into > the default but probably it is better for documentation/readability > to leave them in the switch/case explicitly. Oh. This explains what you meant. Stop putting this information below the cut off, it's annoying. regards, dan carpenter -- 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/