Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756543Ab3CaI0Q (ORCPT ); Sun, 31 Mar 2013 04:26:16 -0400 Received: from zoneX.GCU-Squad.org ([194.213.125.0]:46428 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755301Ab3CaI0L (ORCPT ); Sun, 31 Mar 2013 04:26:11 -0400 Date: Sun, 31 Mar 2013 10:25:47 +0200 From: Jean Delvare To: Lars-Peter Clausen Cc: Wolfram Sang , Ben Dooks , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Guan Xuetao , Mauro Carvalho Chehab , Ben Hutchings , Greg Kroah-Hartman , Alan Cox , Nicolas Ferre , Aaro Koskinen , Shawn Guo , Benjamin Herrenschmidt , Lars Poeschel Subject: Re: [PATCH 3/6] i2c: Ignore return value of i2c_del_adapter() Message-ID: <20130331102547.4d5d2e4c@endymion.delvare> In-Reply-To: <1362853009-20789-4-git-send-email-lars@metafoo.de> References: <1362853009-20789-1-git-send-email-lars@metafoo.de> <1362853009-20789-4-git-send-email-lars@metafoo.de> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.14; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2445 Lines: 51 On Sat, 9 Mar 2013 19:16:46 +0100, Lars-Peter Clausen wrote: > i2c_del_adapter() always returns 0. So all checks testing whether it will be > non zero will always evaluate to false and the conditional code is dead code. > This patch updates all callers of i2c_del_mux_adapter() to ignore the return > value and assume that it will always succeed (which it will). In a subsequent > patch the return type of i2c_del_adapter() will be made void. > > Cc: Jean Delvare > Cc: Guan Xuetao > Cc: Mauro Carvalho Chehab > Cc: Ben Hutchings > Cc: Greg Kroah-Hartman > Cc: Alan Cox > Cc: Nicolas Ferre > Cc: Aaro Koskinen > Cc: Marek Vasut (commit_signer:11/20=55%) > Cc: Shawn Guo > Cc: Benjamin Herrenschmidt > Cc: Lars Poeschel > Signed-off-by: Lars-Peter Clausen > --- > drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c | 3 +-- > drivers/i2c/busses/i2c-amd756-s4882.c | 6 +----- > drivers/i2c/busses/i2c-at91.c | 5 ++--- > drivers/i2c/busses/i2c-cbus-gpio.c | 4 +++- > drivers/i2c/busses/i2c-intel-mid.c | 3 +-- > drivers/i2c/busses/i2c-mv64xxx.c | 5 ++--- > drivers/i2c/busses/i2c-mxs.c | 5 +---- > drivers/i2c/busses/i2c-nforce2-s4985.c | 6 +----- > drivers/i2c/busses/i2c-powermac.c | 10 ++-------- > drivers/i2c/busses/i2c-puv3.c | 10 ++-------- > drivers/i2c/busses/i2c-viperboard.c | 5 ++--- > drivers/i2c/i2c-mux.c | 5 +---- > drivers/media/pci/bt8xx/bttv-input.c | 6 +++--- > drivers/media/pci/mantis/mantis_i2c.c | 4 +++- > drivers/net/ethernet/sfc/falcon.c | 6 ++---- > drivers/staging/media/go7007/go7007-driver.c | 7 ++----- > 16 files changed, 29 insertions(+), 61 deletions(-) > (...) For i2c-amd756-s4882, i2c-nforce2-s4985 and i2c-mux: Reviewed-by: Jean Delvare -- Jean Delvare -- 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/