From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754241Ab1KOIqc (ORCPT ); Tue, 15 Nov 2011 03:46:32 -0500 Received: from na3sys009aog126.obsmtp.com ([74.125.149.155]:54492 "EHLO na3sys009aog126.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754167Ab1KOIq1 (ORCPT ); Tue, 15 Nov 2011 03:46:27 -0500 From: Felipe Balbi To: Tony Lindgren Cc: Linux ARM Kernel Mailing List , Linux Kernel Mailing List , Linux OMAP Mailing List , Andrew Morton , Felipe Balbi Subject: [PATCH/RESEND #3 7/7] arm: omap: smartreflex: micro-optimization for sanity check Date: Tue, 15 Nov 2011 10:46:05 +0200 Message-Id: <1321346765-16633-8-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.8.rc0 In-Reply-To: <1321346765-16633-1-git-send-email-balbi@ti.com> References: <1321346765-16633-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org val && (val != 1) == val > 1 Signed-off-by: Felipe Balbi --- 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 a5399df..9fee277 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -868,7 +868,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.8.rc0