From patchwork Fri Jun 13 08:05:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 31867 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7AA2E20BF9 for ; Fri, 13 Jun 2014 08:05:47 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id tr6sf12071561ieb.11 for ; Fri, 13 Jun 2014 01:05:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :from:date:message-id:subject:to:cc:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=MPU6y8earfd+LvhJUZ1zLXC2tWzvX+setSdoXiY+EWY=; b=FI0Xr3CkIJ2HpM2BXxZTsAjE1Z1Ufje3Fr4yO6wPeAVz/Npf5zE6QTHXfpicGLAtJx d70YvdcGkaicM7oyZAj0pqLqJzIdcj21Q0V8BWt5D2dQIPgBylMyqCVTNQePSvpss6Et Rm4LDUqx4ulacTj8CVjbuiMvEv1nui9ttnpESBqL/e5xZ3aTlK9cIGSoRGoQ6akFrfz3 PJS33FZ76d6S18QB0p8QZaHJKBofLJrFv799zp+ClM5y1kW0avYX+X/c4vppauEzuZxR 9eIBAIbSL9kIKweyYA+1MM8N77QFzm48EPNwz28ajMHSEGjXClgj1zEGkTGaPi8m+abw j7Tw== X-Gm-Message-State: ALoCoQmNnRR7l3WnsO4hrg/FnYKYVbugoi+hpBADDwJs3pYBbb/azb0Y+pYa784CscpfLY71JJdL X-Received: by 10.42.86.145 with SMTP id u17mr420775icl.11.1402646746917; Fri, 13 Jun 2014 01:05:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.247 with SMTP id h110ls3372086qgf.44.gmail; Fri, 13 Jun 2014 01:05:46 -0700 (PDT) X-Received: by 10.220.249.6 with SMTP id mi6mr132584vcb.33.1402646746784; Fri, 13 Jun 2014 01:05:46 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id kh9si1166258vdb.21.2014.06.13.01.05.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Jun 2014 01:05:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.169 as permitted sender) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so2955971veb.14 for ; Fri, 13 Jun 2014 01:05:46 -0700 (PDT) X-Received: by 10.52.72.39 with SMTP id a7mr714514vdv.13.1402646746659; Fri, 13 Jun 2014 01:05:46 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp467989vcb; Fri, 13 Jun 2014 01:05:46 -0700 (PDT) X-Received: by 10.68.229.36 with SMTP id sn4mr1299923pbc.51.1402646745551; Fri, 13 Jun 2014 01:05:45 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hm7si3877345pad.140.2014.06.13.01.05.44; Fri, 13 Jun 2014 01:05:44 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752982AbaFMIFe (ORCPT + 27 others); Fri, 13 Jun 2014 04:05:34 -0400 Received: from mail-oa0-f53.google.com ([209.85.219.53]:63870 "EHLO mail-oa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752018AbaFMIF3 (ORCPT ); Fri, 13 Jun 2014 04:05:29 -0400 Received: by mail-oa0-f53.google.com with SMTP id l6so2388954oag.26 for ; Fri, 13 Jun 2014 01:05:28 -0700 (PDT) X-Received: by 10.60.133.203 with SMTP id pe11mr1125444oeb.24.1402646728335; Fri, 13 Jun 2014 01:05:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.79.225 with HTTP; Fri, 13 Jun 2014 01:05:08 -0700 (PDT) In-Reply-To: <1402614493-12521-1-git-send-email-linux@roeck-us.net> References: <1402614493-12521-1-git-send-email-linux@roeck-us.net> From: Vincent Guittot Date: Fri, 13 Jun 2014 10:05:08 +0200 Message-ID: Subject: Re: [PATCH] sched: Fix compiler warnings To: Guenter Roeck Cc: linux-kernel , Peter Zijlstra , Ingo Molnar Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vincent.guittot@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi Guenter, There are also such kind of function in ARM and powerpc architecture with the additional changes below, you can add my Acked-by Vincent Guittot Vincent On 13 June 2014 01:08, Guenter Roeck wrote: > Commit 143e1e28cb (sched: Rework sched_domain topology definition) > introduced a number of functions with a return value of 'const int'. > gcc doesn't know what to do with that and, if the kernel is compiled > with W=1, complains with the following warnings whenever sched.h > is included. > > include/linux/sched.h:875:25: warning: > type qualifiers ignored on function return type > include/linux/sched.h:882:25: warning: > type qualifiers ignored on function return type > include/linux/sched.h:889:25: warning: > type qualifiers ignored on function return type > include/linux/sched.h:1002:21: warning: > type qualifiers ignored on function return type > > Drop 'const' from the function declarations to fix the problem. > > Cc: Vincent Guittot > Signed-off-by: Guenter Roeck > --- > include/linux/sched.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index ea74596..65046b3 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -872,21 +872,21 @@ enum cpu_idle_type { > #define SD_NUMA 0x4000 /* cross-node balancing */ > > #ifdef CONFIG_SCHED_SMT > -static inline const int cpu_smt_flags(void) > +static inline int cpu_smt_flags(void) > { > return SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES; > } > #endif > > #ifdef CONFIG_SCHED_MC > -static inline const int cpu_core_flags(void) > +static inline int cpu_core_flags(void) > { > return SD_SHARE_PKG_RESOURCES; > } > #endif > > #ifdef CONFIG_NUMA > -static inline const int cpu_numa_flags(void) > +static inline int cpu_numa_flags(void) > { > return SD_NUMA; > } > @@ -999,7 +999,7 @@ void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); > bool cpus_share_cache(int this_cpu, int that_cpu); > > typedef const struct cpumask *(*sched_domain_mask_f)(int cpu); > -typedef const int (*sched_domain_flags_f)(void); > +typedef int (*sched_domain_flags_f)(void); > > #define SDTL_OVERLAP 0x01 > > -- > 1.9.1 > --- 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/ diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 1576d05..7e56b2f 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -275,7 +275,7 @@ void store_cpu_topology(unsigned int cpuid) cpu_topology[cpuid].socket_id, mpidr); } -static inline const int cpu_corepower_flags(void) +static inline int cpu_corepower_flags(void) { return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN; } 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;