All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v7 24/24] x86/resctrl: Introduce interface to modify assignment states of the groups
Date: Wed, 11 Sep 2024 23:53:13 +0800	[thread overview]
Message-ID: <202409112351.fbIMtRVP-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <68c8ef0592c653c5b99cd26d982966cd4a41cb31.1725488488.git.babu.moger@amd.com>
References: <68c8ef0592c653c5b99cd26d982966cd4a41cb31.1725488488.git.babu.moger@amd.com>
TO: Babu Moger <babu.moger@amd.com>

Hi Babu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.11-rc7 next-20240911]
[cannot apply to tip/x86/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Babu-Moger/x86-cpufeatures-Add-support-for-Assignable-Bandwidth-Monitoring-Counters-ABMC/20240905-062937
base:   linus/master
patch link:    https://lore.kernel.org/r/68c8ef0592c653c5b99cd26d982966cd4a41cb31.1725488488.git.babu.moger%40amd.com
patch subject: [PATCH v7 24/24] x86/resctrl: Introduce interface to modify assignment states of the groups
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: i386-randconfig-141-20240911 (https://download.01.org/0day-ci/archive/20240911/202409112351.fbIMtRVP-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202409112351.fbIMtRVP-lkp@intel.com/

smatch warnings:
arch/x86/kernel/cpu/resctrl/rdtgroup.c:1278 rdtgroup_mbm_assign_control_write() error: uninitialized symbol 'ret'.

vim +/ret +1278 arch/x86/kernel/cpu/resctrl/rdtgroup.c

d9001030c01eb5 Babu Moger 2024-09-04  1221  
d9001030c01eb5 Babu Moger 2024-09-04  1222  static ssize_t rdtgroup_mbm_assign_control_write(struct kernfs_open_file *of,
d9001030c01eb5 Babu Moger 2024-09-04  1223  						 char *buf, size_t nbytes, loff_t off)
d9001030c01eb5 Babu Moger 2024-09-04  1224  {
d9001030c01eb5 Babu Moger 2024-09-04  1225  	struct rdt_resource *r = of->kn->parent->priv;
d9001030c01eb5 Babu Moger 2024-09-04  1226  	char *token, *cmon_grp, *mon_grp;
d9001030c01eb5 Babu Moger 2024-09-04  1227  	enum rdt_group_type rtype;
d9001030c01eb5 Babu Moger 2024-09-04  1228  	int ret;
d9001030c01eb5 Babu Moger 2024-09-04  1229  
d9001030c01eb5 Babu Moger 2024-09-04  1230  	/* Valid input requires a trailing newline */
d9001030c01eb5 Babu Moger 2024-09-04  1231  	if (nbytes == 0 || buf[nbytes - 1] != '\n')
d9001030c01eb5 Babu Moger 2024-09-04  1232  		return -EINVAL;
d9001030c01eb5 Babu Moger 2024-09-04  1233  
d9001030c01eb5 Babu Moger 2024-09-04  1234  	buf[nbytes - 1] = '\0';
d9001030c01eb5 Babu Moger 2024-09-04  1235  
d9001030c01eb5 Babu Moger 2024-09-04  1236  	cpus_read_lock();
d9001030c01eb5 Babu Moger 2024-09-04  1237  	mutex_lock(&rdtgroup_mutex);
d9001030c01eb5 Babu Moger 2024-09-04  1238  
d9001030c01eb5 Babu Moger 2024-09-04  1239  	if (!resctrl_arch_mbm_cntr_assign_enabled(r)) {
d9001030c01eb5 Babu Moger 2024-09-04  1240  		rdt_last_cmd_puts("mbm_cntr_assign mode is not enabled\n");
d9001030c01eb5 Babu Moger 2024-09-04  1241  		mutex_unlock(&rdtgroup_mutex);
d9001030c01eb5 Babu Moger 2024-09-04  1242  		cpus_read_unlock();
d9001030c01eb5 Babu Moger 2024-09-04  1243  		return -EINVAL;
d9001030c01eb5 Babu Moger 2024-09-04  1244  	}
d9001030c01eb5 Babu Moger 2024-09-04  1245  
d9001030c01eb5 Babu Moger 2024-09-04  1246  	rdt_last_cmd_clear();
d9001030c01eb5 Babu Moger 2024-09-04  1247  
d9001030c01eb5 Babu Moger 2024-09-04  1248  	while ((token = strsep(&buf, "\n")) != NULL) {
d9001030c01eb5 Babu Moger 2024-09-04  1249  		if (strstr(token, "/")) {
d9001030c01eb5 Babu Moger 2024-09-04  1250  			/*
d9001030c01eb5 Babu Moger 2024-09-04  1251  			 * The write command follows the following format:
d9001030c01eb5 Babu Moger 2024-09-04  1252  			 * “<CTRL_MON group>/<MON group>/<domain_id><opcode><flags>”
d9001030c01eb5 Babu Moger 2024-09-04  1253  			 * Extract the CTRL_MON group.
d9001030c01eb5 Babu Moger 2024-09-04  1254  			 */
d9001030c01eb5 Babu Moger 2024-09-04  1255  			cmon_grp = strsep(&token, "/");
d9001030c01eb5 Babu Moger 2024-09-04  1256  
d9001030c01eb5 Babu Moger 2024-09-04  1257  			/*
d9001030c01eb5 Babu Moger 2024-09-04  1258  			 * Extract the MON_GROUP.
d9001030c01eb5 Babu Moger 2024-09-04  1259  			 * strsep returns empty string for contiguous delimiters.
d9001030c01eb5 Babu Moger 2024-09-04  1260  			 * Empty mon_grp here means it is a RDTCTRL_GROUP.
d9001030c01eb5 Babu Moger 2024-09-04  1261  			 */
d9001030c01eb5 Babu Moger 2024-09-04  1262  			mon_grp = strsep(&token, "/");
d9001030c01eb5 Babu Moger 2024-09-04  1263  
d9001030c01eb5 Babu Moger 2024-09-04  1264  			if (*mon_grp == '\0')
d9001030c01eb5 Babu Moger 2024-09-04  1265  				rtype = RDTCTRL_GROUP;
d9001030c01eb5 Babu Moger 2024-09-04  1266  			else
d9001030c01eb5 Babu Moger 2024-09-04  1267  				rtype = RDTMON_GROUP;
d9001030c01eb5 Babu Moger 2024-09-04  1268  
d9001030c01eb5 Babu Moger 2024-09-04  1269  			ret = rdtgroup_process_flags(r, rtype, cmon_grp, mon_grp, token);
d9001030c01eb5 Babu Moger 2024-09-04  1270  			if (ret)
d9001030c01eb5 Babu Moger 2024-09-04  1271  				break;
d9001030c01eb5 Babu Moger 2024-09-04  1272  		}
d9001030c01eb5 Babu Moger 2024-09-04  1273  	}
d9001030c01eb5 Babu Moger 2024-09-04  1274  
d9001030c01eb5 Babu Moger 2024-09-04  1275  	mutex_unlock(&rdtgroup_mutex);
d9001030c01eb5 Babu Moger 2024-09-04  1276  	cpus_read_unlock();
d9001030c01eb5 Babu Moger 2024-09-04  1277  
d9001030c01eb5 Babu Moger 2024-09-04 @1278  	return ret ?: nbytes;
d9001030c01eb5 Babu Moger 2024-09-04  1279  }
d9001030c01eb5 Babu Moger 2024-09-04  1280  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2024-09-11 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 15:53 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-04 22:21 [PATCH v7 00/24] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) Babu Moger
2024-09-04 22:21 ` [PATCH v7 24/24] x86/resctrl: Introduce interface to modify assignment states of the groups Babu Moger
2024-09-19 17:59   ` Reinette Chatre
2024-09-27 17:47     ` Moger, Babu
2024-10-02 18:19       ` Reinette Chatre
2024-10-04  1:11         ` Moger, Babu
2024-10-04  2:17           ` Reinette Chatre
2024-10-04 16:38             ` Moger, Babu
2024-10-04 16:52               ` Reinette Chatre
2024-10-04 19:36                 ` Moger, Babu
2024-10-04 21:09                   ` Reinette Chatre
2024-10-05  0:23                     ` Moger, Babu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202409112351.fbIMtRVP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.