From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753763Ab2ACOU0 (ORCPT ); Tue, 3 Jan 2012 09:20:26 -0500 Received: from mail-ee0-f46.google.com ([74.125.83.46]:52431 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753642Ab2ACOUM (ORCPT ); Tue, 3 Jan 2012 09:20:12 -0500 From: Gilad Ben-Yossef To: linux-kernel@vger.kernel.org Cc: Gilad Ben-Yossef , Michal Nazarewicz , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Subject: [RFC PATCH 3/9] x86: avoid using on_each_cpu hard coded ret value Date: Tue, 3 Jan 2012 16:19:07 +0200 Message-Id: <1325600353-10895-4-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1325600353-10895-1-git-send-email-gilad@benyossef.com> References: <1325600353-10895-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org on_each_cpu always returns a hard coded return code of zero. Removing all tests based on this return value saves run time cycles for compares and code bloat for branches. CC: Michal Nazarewicz CC: Thomas Gleixner CC: Ingo Molnar CC: "H. Peter Anvin" CC: x86@kernel.org --- arch/x86/lib/cache-smp.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/lib/cache-smp.c b/arch/x86/lib/cache-smp.c index a3c6688..760f7e1 100644 --- a/arch/x86/lib/cache-smp.c +++ b/arch/x86/lib/cache-smp.c @@ -14,6 +14,7 @@ EXPORT_SYMBOL(wbinvd_on_cpu); int wbinvd_on_all_cpus(void) { - return on_each_cpu(__wbinvd, NULL, 1); + on_each_cpu(__wbinvd, NULL, 1); + return 0; } EXPORT_SYMBOL(wbinvd_on_all_cpus); -- 1.7.0.4