Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751496AbbECSjG (ORCPT ); Sun, 3 May 2015 14:39:06 -0400 Received: from mailsec119.isp.belgacom.be ([195.238.20.115]:14557 "EHLO mailsec119.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384AbbECSi6 (ORCPT ); Sun, 3 May 2015 14:38:58 -0400 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=wisUSL2q+2X910teRg2xg/30tBFW7lBMAi45pEFXNHU= c=1 sm=2 a=IkcTkHD0fZMA:10 a=7OG-XdSIaB7vgwyPOUEA:9 a=QEXdDO2ut3YA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AbCwCjakZV/9EU7sNcgwyBL4MdsGgBAQEBAQEGmUkCgT88EAEBAQEBAQGBCkEFg1oBAQEDASNWBQsFBhgCAhgOAgJXBhMRiBIMsguGUYweAQEBBwIBH4EhhHaFIoUFB4JogUUFsn0jYIEFghE8MYJFAQEB Date: Sun, 3 May 2015 20:38:56 +0200 (CEST) From: Fabian Frederick Reply-To: Fabian Frederick To: Richard Weinberger Cc: Andrew Morton , LKML , linux-fsdevel Message-ID: <383011431.191678.1430678336214.open-xchange@webmail.nmp.proximus.be> In-Reply-To: <5546679F.5070000@nod.at> References: <1430592980-28856-1-git-send-email-fabf@skynet.be> <1190129389.190434.1430676950131.open-xchange@webmail.nmp.proximus.be> <5546679F.5070000@nod.at> Subject: Re: [PATCH 1/1 linux-next] affs: add default case in switch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.2.2-Rev27 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1072 Lines: 36 > On 03 May 2015 at 20:23 Richard Weinberger wrote: > > > Am 03.05.2015 um 20:15 schrieb Fabian Frederick: > >> If the code can be reached you need to take a proper action of not the > >> warning is bogus. > > > > As far as I understand, switch in affs_lookup() only updates inode number > > when > > it's a link so we can simply add default:break to silence gcc warning or > > replace > > by if(). > > Does the warning trigger with our default set of compiler warnings? > Not all gcc warnings are useful. :) Only with W=123 > > > affs_iget() switch on the other hand applies to any type of file. > > Maybe we could add default: BUG() to avoid working on bad inode ? > > Or cancel the operation and return -EIO to userspace. Ok, thanks, I'll send another version :) Regards, Fabian > > Thanks, > //richard -- 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/