mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Changwoo Min <changwoo@igalia.com>,
	lukasz.luba@arm.com, rafael@kernel.org, len.brown@intel.com,
	pavel@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	christian.loehle@arm.com, tj@kernel.org, kernel-dev@igalia.com,
	linux-pm@vger.kernel.org, sched-ext@lists.linux.dev,
	linux-kernel@vger.kernel.org, Changwoo Min <changwoo@igalia.com>
Subject: Re: [PATCH v2 09/10] PM: EM: Implement em_notify_pd_created/updated().
Date: Sat, 14 Jun 2025 04:02:15 +0800	[thread overview]
Message-ID: <202506140306.tuIoz8rN-lkp@intel.com> (raw)
In-Reply-To: <20250613094428.267791-10-changwoo@igalia.com>

Hi Changwoo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.16-rc1 next-20250613]
[cannot apply to amd-pstate/linux-next amd-pstate/bleeding-edge]
[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/Changwoo-Min/PM-EM-Add-em-yaml-and-autogen-files/20250613-174859
base:   linus/master
patch link:    https://lore.kernel.org/r/20250613094428.267791-10-changwoo%40igalia.com
patch subject: [PATCH v2 09/10] PM: EM: Implement em_notify_pd_created/updated().
config: i386-randconfig-001-20250614 (https://download.01.org/0day-ci/archive/20250614/202506140306.tuIoz8rN-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250614/202506140306.tuIoz8rN-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506140306.tuIoz8rN-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/power/em_netlink.c:234:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
     234 |         if (!hdr)
         |             ^~~~
   kernel/power/em_netlink.c:249:9: note: uninitialized use occurs here
     249 |         return ret;
         |                ^~~
   kernel/power/em_netlink.c:234:2: note: remove the 'if' if its condition is always false
     234 |         if (!hdr)
         |         ^~~~~~~~~
     235 |                 goto out_free_msg;
         |                 ~~~~~~~~~~~~~~~~~
   kernel/power/em_netlink.c:221:17: note: initialize the variable 'ret' to silence this warning
     221 |         int msg_sz, ret;
         |                        ^
         |                         = 0
   1 warning generated.


vim +234 kernel/power/em_netlink.c

   215	
   216	
   217	/**************************** Event encoding *********************************/
   218	static int __em_notify_pd_table(const struct em_perf_domain *pd, int ntf_type)
   219	{
   220		struct sk_buff *msg;
   221		int msg_sz, ret;
   222		void *hdr;
   223	
   224		if (!genl_has_listeners(&em_nl_family, &init_net, EM_NLGRP_EVENT))
   225			return 0;
   226	
   227		msg_sz = __em_nl_get_pd_table_size(pd);
   228	
   229		msg = genlmsg_new(msg_sz, GFP_KERNEL);
   230		if (!msg)
   231			return -ENOMEM;
   232	
   233		hdr = genlmsg_put(msg, 0, 0, &em_nl_family, 0, ntf_type);
 > 234		if (!hdr)
   235			goto out_free_msg;
   236	
   237		ret = __em_nl_get_pd_table(msg, pd);
   238		if (ret)
   239			goto out_free_msg;
   240	
   241		genlmsg_end(msg, hdr);
   242	
   243		genlmsg_multicast(&em_nl_family, msg, 0, EM_NLGRP_EVENT, GFP_KERNEL);
   244	
   245		return 0;
   246	
   247	out_free_msg:
   248		nlmsg_free(msg);
   249		return ret;
   250	}
   251	

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

  reply	other threads:[~2025-06-13 20:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13  9:44 [PATCH v2 00/10] PM: EM: Add netlink support for the energy model Changwoo Min
2025-06-13  9:44 ` [PATCH v2 01/10] PM: EM: Add em.yaml and autogen files Changwoo Min
2025-06-13  9:44 ` [PATCH v2 02/10] PM: EM: Add a skeleton code for netlink notification Changwoo Min
2025-06-13  9:44 ` [PATCH v2 03/10] PM: EM: Assign a unique ID when creating a performance domain Changwoo Min
2025-06-13  9:44 ` [PATCH v2 04/10] PM: EM: Expose the ID of a performance domain via debugfs Changwoo Min
2025-06-13  9:44 ` [PATCH v2 05/10] PM: EM: Add an iterator and accessor for the performance domain Changwoo Min
2025-06-13  9:44 ` [PATCH v2 06/10] PM: EM: Implement em_nl_get_pds_doit() Changwoo Min
2025-06-13  9:44 ` [PATCH v2 07/10] PM: EM: Implement em_nl_get_pd_table_doit() Changwoo Min
2025-06-13  9:44 ` [PATCH v2 08/10] PM: EM: Implement em_notify_pd_deleted() Changwoo Min
2025-06-13  9:44 ` [PATCH v2 09/10] PM: EM: Implement em_notify_pd_created/updated() Changwoo Min
2025-06-13 20:02   ` kernel test robot [this message]
2025-06-13  9:44 ` [PATCH v2 10/10] PM: EM: Notify an event when the performance domain changes Changwoo Min
2025-06-27  3:37 ` [PATCH v2 00/10] PM: EM: Add netlink support for the energy model Changwoo Min
2025-06-30 10:07   ` Lukasz Luba
2025-07-02  1:02     ` Changwoo Min

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=202506140306.tuIoz8rN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=changwoo@igalia.com \
    --cc=christian.loehle@arm.com \
    --cc=kernel-dev@igalia.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lukasz.luba@arm.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pavel@kernel.org \
    --cc=rafael@kernel.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=tj@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®