From patchwork Fri Jun 13 16:38:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 359573 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DE8E51400A4 for ; Sat, 14 Jun 2014 02:39:16 +1000 (EST) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id C52D31A0866 for ; Sat, 14 Jun 2014 02:39:16 +1000 (EST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pb0-x22a.google.com (mail-pb0-x22a.google.com [IPv6:2607:f8b0:400e:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id E0C9F1A03CB for ; Sat, 14 Jun 2014 02:38:44 +1000 (EST) Received: by mail-pb0-f42.google.com with SMTP id ma3so2057519pbc.29 for ; Fri, 13 Jun 2014 09:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=+OnIjDoz/JEtkQi4Tr9wkAvgBpDN0R0kuLdhpouKcS4=; b=Jd6ByBYXXEFA0UhavkqSSwIAiQs6+9kLwvq/5xNyIhKSvS6VuRYXysCGpvveXDpXo8 vXzX40zf6HTf6Krxov6ohoga/dAfBetQsuV/Fq+b5TUiSqK2Mqq78gn69c2QYF50dR3U xKcSNKKMA2fU5pTTdMH0mb/yqdQQh5yjhppLuXbp+j5DphWhBv+klJpFXARI7nwhyfvE ljtjGDhpn4prqnS5VU5+HFdSjKLEY9hkj/Q3SIWrqvDrMLWaONgfXEnW6QGxGCg4oaR3 hnsD5pDCW2j4OO2KSGb0bjaaUngYZKGdOasTOxoMegzDfkKvKqu8PmLRKk0pLIr9Kaw+ 4jZg== X-Received: by 10.68.245.100 with SMTP id xn4mr4691740pbc.152.1402677519729; Fri, 13 Jun 2014 09:38:39 -0700 (PDT) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by mx.google.com with ESMTPSA id pb7sm23758058pac.10.2014.06.13.09.38.38 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Jun 2014 09:38:38 -0700 (PDT) From: Guenter Roeck To: Benjamin Herrenschmidt Subject: [PATCH] powerpc: Fix build warning Date: Fri, 13 Jun 2014 09:38:19 -0700 Message-Id: <1402677499-28289-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 1.9.1 Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras , linux-kernel@vger.kernel.org, Guenter Roeck , Vincent Guittot X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" If compiled with W=1, the following warning is seen in powerpc builds. arch/powerpc/kernel/smp.c:750:18: warning: type qualifiers ignored on function return type static const int powerpc_smt_flags(void) ^ This is caused by a function returning 'const int', which doesn't make sense to gcc. Drop 'const' to fix the problem. Reported-by: Vincent Guittot Signed-off-by: Guenter Roeck Acked-by: David Rientjes --- arch/powerpc/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 10ffffe..49d5d4e 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -768,7 +768,7 @@ int setup_profiling_timer(unsigned int multiplier) #ifdef CONFIG_SCHED_SMT /* cpumask of CPUs with asymetric SMT dependancy */ -static const int powerpc_smt_flags(void) +static int powerpc_smt_flags(void) { int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;