From patchwork Sun Mar 22 00:00:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 6065821 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0652A9F399 for ; Sun, 22 Mar 2015 00:00:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 317452035C for ; Sun, 22 Mar 2015 00:00:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4BDA1202F0 for ; Sun, 22 Mar 2015 00:00:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751409AbbCVAAZ (ORCPT ); Sat, 21 Mar 2015 20:00:25 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:44047 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751314AbbCVAAY (ORCPT ); Sat, 21 Mar 2015 20:00:24 -0400 Received: from trochilidae.agner.local (195-226-23-137.pool.cyberlink.ch [195.226.23.137]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 97C775C000F; Sun, 22 Mar 2015 00:59:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=agner.ch; s=dkim; t=1426982393; bh=MO13PAqjUxVGilUQEYZS+9ol9lXGzdN+9CXyapd66ss=; h=From:To:Cc:Subject:Date:From; b=MFJkqdDecIosKKzD90DHD2E8MUeUTsdeJUI5T64Au48FogH5a2iNTWJP5ua96wyTZ L44gbcBk7oku0SkdY9wdQAre56bfXNgqMAVBdJ7kkFph3U14fqn74+Z+0NfnyTPR9m T7mzSntmHQUnWUszPpWeNme9R0WlpdOVOET/jfBU= From: Stefan Agner To: tony@atomide.com Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvmlinux@lists.linuxfoundation.org, Stefan Agner Subject: [PATCH] arm: mach-omap2: remove superfluous NULL pointer check Date: Sun, 22 Mar 2015 01:00:18 +0100 Message-Id: <1426982418-9649-1-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.3.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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; }