From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbbCZRio (ORCPT ); Thu, 26 Mar 2015 13:38:44 -0400 Received: from muru.com ([72.249.23.125]:40056 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752519AbbCZRii (ORCPT ); Thu, 26 Mar 2015 13:38:38 -0400 Date: Thu, 26 Mar 2015 10:34:19 -0700 From: Tony Lindgren To: Stefan Agner Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvmlinux@lists.linuxfoundation.org Subject: Re: [PATCH] arm: mach-omap2: remove superfluous NULL pointer check Message-ID: <20150326173417.GA10805@atomide.com> References: <1426982418-9649-1-git-send-email-stefan@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426982418-9649-1-git-send-email-stefan@agner.ch> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Stefan Agner [150321 17:00]: > The NULL pointer check for superset->muxnames will always evaluate > true since muxnames is an array within struct omap_mux. Remove the > superfluous check to avoid warnings when using LLVM/clang. > > Signed-off-by: Stefan Agner Applying into omap-for-v4.1/fixes-not-urgent thanks. Tony > --- > For the reference, the warning generated by LLVM/clang: > arch/arm/mach-omap2/mux.c:1056:18: warning: address of array > 'superset->muxnames' will always evaluate to 'true' [-Wpointer-bool-conversion] > if (!superset->muxnames || !superset->muxnames[0]) { > ~~~~~~~~~~~^~~~~~~~ > > arch/arm/mach-omap2/mux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c > index 78064b0..176eef6 100644 > --- a/arch/arm/mach-omap2/mux.c > +++ b/arch/arm/mach-omap2/mux.c > @@ -1053,7 +1053,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition, > struct omap_mux *entry; > > #ifdef CONFIG_OMAP_MUX > - if (!superset->muxnames || !superset->muxnames[0]) { > + if (!superset->muxnames[0]) { > superset++; > continue; > } > -- > 2.3.3 >