Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752949AbYCLBDx (ORCPT ); Tue, 11 Mar 2008 21:03:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751758AbYCLBDq (ORCPT ); Tue, 11 Mar 2008 21:03:46 -0400 Received: from fg-out-1718.google.com ([72.14.220.152]:38506 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbYCLBDq (ORCPT ); Tue, 11 Mar 2008 21:03:46 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type:content-disposition:user-agent; b=LWrhVVRlNGty+4kgSumb2joq62IlczSPVdiquhwImlnpbPDORIppA+VOARv/DtsLNGsap9n1AV5u4gci57KlSlLKKwp3JMPcZN1CpO6nP3qmFE7jkJ8LpsGeOcSD/FDxWo8CpRISojsHOmcESZkoi1n0w3UHuWpWBN+NN2DlRsY= Date: Wed, 12 Mar 2008 09:09:33 +0800 From: Dave Young To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, Marcin Slusarz , paulmck@linux.vnet.ibm.com Subject: [PATCH -mm] do not check condition twice in WARN_ON_SECS Message-ID: <20080312010933.GA2957@darkstar.te-china.tietoenator.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1031 Lines: 27 Don't check condition twice, change WARN_ON(condition) to WARN_ON(1) Thanks Marcin Slusarz for pointing out Signed-off-by: Dave Young --- include/asm-generic/bug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -upr linux/include/asm-generic/bug.h linux.new/include/asm-generic/bug.h --- linux/include/asm-generic/bug.h 2008-03-12 08:45:08.000000000 +0800 +++ linux.new/include/asm-generic/bug.h 2008-03-12 09:04:07.000000000 +0800 @@ -80,7 +80,8 @@ extern void warn_on_slowpath(const char int __ret_warn_on = !!(condition); \ if (unlikely(__ret_warn_on)) \ if (__ratelimit(secs * HZ, 1)) \ - WARN_ON(condition); \ + WARN_ON(1); \ + unlikely(__ret_warn_on); \ }) #ifdef CONFIG_SMP -- 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/