All of lore.kernel.org
 help / color / mirror / Atom feed
* [ia64:rdt-cat-resplit 8/14] arch/x86/kernel/cpu/intel_rdt_rdtgroup.c:33:1: error: type defaults to '
@ 2016-10-02 16:25 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2016-10-02 16:25 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 4806 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git rdt-cat-resplit
head:   b36aa08060202efe83f26fb51184abd8b4687b6a
commit: be1745ec0c2601cc11ca01a8e8c97288ac15689f [8/14] x86/intel_rdt: Add basic resctrl filesystem support
config: x86_64-randconfig-r0-10021517 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout be1745ec0c2601cc11ca01a8e8c97288ac15689f
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

>> arch/x86/kernel/cpu/intel_rdt_rdtgroup.c:33:1: warning: data definition has no type or storage class
    DEFINE_STATIC_KEY_FALSE(rdt_enable_key);
    ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/cpu/intel_rdt_rdtgroup.c:33:1: error: type defaults to 'int' in declaration of 'DEFINE_STATIC_KEY_FALSE' [-Werror=implicit-int]
>> arch/x86/kernel/cpu/intel_rdt_rdtgroup.c:33:1: warning: parameter names (without types) in function declaration
   arch/x86/kernel/cpu/intel_rdt_rdtgroup.c: In function 'rdt_mount':
>> arch/x86/kernel/cpu/intel_rdt_rdtgroup.c:84:6: error: implicit declaration of function 'static_branch_unlikely' [-Werror=implicit-function-declaration]
     if (static_branch_unlikely(&rdt_enable_key)) {
         ^~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/cpu/intel_rdt_rdtgroup.c:111:2: error: implicit declaration of function 'static_branch_enable' [-Werror=implicit-function-declaration]
     static_branch_enable(&rdt_enable_key);
     ^~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/intel_rdt_rdtgroup.c: In function 'rdt_kill_sb':
>> arch/x86/kernel/cpu/intel_rdt_rdtgroup.c:122:2: error: implicit declaration of function 'static_branch_disable' [-Werror=implicit-function-declaration]
     static_branch_disable(&rdt_enable_key);
     ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +33 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c

    27	
    28	#include <uapi/linux/magic.h>
    29	
    30	#include <asm/intel_rdt.h>
    31	
    32	DEFINE_MUTEX(rdtgroup_mutex);
  > 33	DEFINE_STATIC_KEY_FALSE(rdt_enable_key);
    34	struct kernfs_root *rdt_root;
    35	struct rdtgroup *rdtgroups_all;
    36	struct rdtgroup *rdtgroup_default;
    37	
    38	static struct rdtgroup *rdtgroup_alloc(void)
    39	{
    40		int	i;
    41	
    42		for (i = 0; i < rdt_max_closid; i++) {
    43			if (!(rdtgroups_all[i].flags & RDT_INUSE)) {
    44				rdtgroups_all[i].flags = RDT_INUSE;
    45				return &rdtgroups_all[i];
    46			}
    47		}
    48		return NULL;
    49	}
    50	
    51	static int parse_rdtgroupfs_options(char *data)
    52	{
    53		char *token, *o = data;
    54	
    55		while ((token = strsep(&o, ",")) != NULL) {
    56			if (!*token)
    57				return -EINVAL;
    58	
    59			if (!strcmp(token, "cdp")) {
    60				struct cpuinfo_x86 *c = &boot_cpu_data;
    61	
    62				if (!cpu_has(c, X86_FEATURE_CDP_L3))
    63					return -EINVAL;
    64				rdt_resources_all[RDT_RESOURCE_L3].cdp_enabled = true;
    65			}
    66		}
    67	
    68		return 0;
    69	}
    70	
    71	static struct dentry *rdt_mount(struct file_system_type *fs_type,
    72					int flags, const char *unused_dev_name,
    73					void *data)
    74	{
    75		struct dentry *dentry;
    76		int ret;
    77		bool new_sb;
    78		struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_L3];
    79	
    80		mutex_lock(&rdtgroup_mutex);
    81		/*
    82		 * resctrl file system can only be mounted once.
    83		 */
  > 84		if (static_branch_unlikely(&rdt_enable_key)) {
    85			dentry = ERR_PTR(-EBUSY);
    86			goto out;
    87		}
    88	
    89		r->cdp_enabled = false;
    90		ret = parse_rdtgroupfs_options(data);
    91		if (ret) {
    92			dentry = ERR_PTR(ret);
    93			goto out;
    94		}
    95		if (r->cdp_enabled)
    96			r->num_closid = r->max_closid / 2;
    97		else
    98			r->num_closid = r->max_closid;
    99		rdt_max_closid = 0;
   100		for_each_rdt_resource(r)
   101			rdt_max_closid = max(rdt_max_closid, r->max_closid);
   102	
   103		dentry = kernfs_mount(fs_type, flags, rdt_root,
   104				      RDTGROUP_SUPER_MAGIC, &new_sb);
   105		if (IS_ERR(dentry))
   106			goto out;
   107		if (!new_sb) {
   108			dentry = ERR_PTR(-EINVAL);
   109			goto out;
   110		}
 > 111		static_branch_enable(&rdt_enable_key);
   112	
   113	out:
   114		mutex_unlock(&rdtgroup_mutex);
   115	
   116		return dentry;
   117	}
   118	
   119	static void rdt_kill_sb(struct super_block *sb)
   120	{
   121		mutex_lock(&rdtgroup_mutex);
 > 122		static_branch_disable(&rdt_enable_key);
   123		kernfs_kill_sb(sb);
   124		mutex_unlock(&rdtgroup_mutex);
   125	}

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27176 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-02 16:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-02 16:25 [ia64:rdt-cat-resplit 8/14] arch/x86/kernel/cpu/intel_rdt_rdtgroup.c:33:1: error: type defaults to ' kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.