Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751565AbbEFKbr (ORCPT ); Wed, 6 May 2015 06:31:47 -0400 Received: from foss.arm.com ([217.140.101.70]:46942 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbbEFKbp (ORCPT ); Wed, 6 May 2015 06:31:45 -0400 Message-ID: <1430908303.3314.11.camel@arm.com> Subject: Re: [PATCH 14/19] clk: versatile: Silence sparse warnings From: Pawel Moll To: Stephen Boyd Cc: Mike Turquette , "linux-kernel@vger.kernel.org" , "linux-clk@vger.kernel.org" Date: Wed, 06 May 2015 11:31:43 +0100 In-Reply-To: <1430897996-11597-15-git-send-email-sboyd@codeaurora.org> References: <1430897996-11597-1-git-send-email-sboyd@codeaurora.org> <1430897996-11597-15-git-send-email-sboyd@codeaurora.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1668 Lines: 38 On Wed, 2015-05-06 at 08:39 +0100, Stephen Boyd wrote: > drivers/clk/versatile/clk-sp810.c:159:29: error: incompatible types for operation (<=) > drivers/clk/versatile/clk-sp810.c:159:29: left side has type char const * > drivers/clk/versatile/clk-sp810.c:159:29: right side has type int > drivers/clk/versatile/clk-sp810.c:159:53: error: incompatible types for operation (<=) > drivers/clk/versatile/clk-sp810.c:159:53: left side has type char const * > drivers/clk/versatile/clk-sp810.c:159:53: right side has type int > rivers/clk/versatile/clk-sp810.c:138:13: warning: symbol 'clk_sp810_of_setup' was not declared. Should it be static? > > Cc: Pawel Moll > Signed-off-by: Stephen Boyd Acked-by: Pawel Moll > @@ -156,7 +156,7 @@ void __init clk_sp810_of_setup(struct device_node *node) > "timclk"); > parent_names[1] = of_clk_get_parent_name(node, sp810->timclk_index); > > - if (parent_names[0] <= 0 || parent_names[1] <= 0) { > + if (!parent_names[0] || !parent_names[1]) { > pr_warn("Failed to obtain parent clocks for SP810!\n"); > return; > } I stared at it (and at git blame output) and was thinking what was I smoking typing the code... Fortunately mail history suggest that I had "!parent..." in my original patch, and it was modified by Mike ;-) No harm done :-) Thanks for fixing this! Pawel -- 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/