From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Pihet Subject: [PATCH 18/20] ARM: OMAP3+: SmartReflex: micro-optimization for sanity check Date: Wed, 1 Feb 2012 09:49:57 +0100 Message-ID: <1328086199-28486-19-git-send-email-j-pihet@ti.com> References: <1328086199-28486-1-git-send-email-j-pihet@ti.com> Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:46589 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754676Ab2BAIut (ORCPT ); Wed, 1 Feb 2012 03:50:49 -0500 Received: by mail-ww0-f44.google.com with SMTP id dt10so1012846wgb.1 for ; Wed, 01 Feb 2012 00:50:48 -0800 (PST) In-Reply-To: <1328086199-28486-1-git-send-email-j-pihet@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, balbi@ti.com, nm@ti.com Cc: Kevin Hilman , Paul Walmsley , Jean Pihet From: Felipe Balbi val && (val != 1) == val > 1 Signed-off-by: Felipe Balbi Signed-off-by: Jean Pihet --- arch/arm/mach-omap2/smartreflex.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index c2e3d6b..2fe882f 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -1065,7 +1065,7 @@ static int omap_sr_autocomp_store(void *data, u64 val) } /* Sanity check */ - if (val && (val != 1)) { + if (val > 1) { pr_warning("%s: Invalid argument %lld\n", __func__, val); return -EINVAL; } -- 1.7.5.4