All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jiri Pirko <jiri@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jpirko-mlxsw:wip_attestation_all_1 49/62] drivers/ctlv/tests/registration_kunit.c:1706:48: warning: variable 'init_info' is uninitialized when passed as a const pointer argument here
Date: Sun, 18 Oct 2026 09:43:30 +0200	[thread overview]
Message-ID: <202610161928.r7mxYLH1-lkp@intel.com> (raw)

tree:   https://github.com/jpirko/linux_mlxsw wip_attestation_all_1
head:   e63637d55bc3ae7cbef988e3525c79b9381dba1b
commit: 611edc69440d968bf06f3c4018b4a3b4a4660884 [49/62] selftests/ctlv: Add library tests
config: powerpc64-randconfig-r2108-20261016 (https://download.01.org/0day-ci/archive/20261016/202610161928.r7mxYLH1-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 8a679464f19c426ef76aad9f4587b703dd3e584d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261016/202610161928.r7mxYLH1-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/202610161928.r7mxYLH1-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/ctlv/tests/registration_kunit.c:1706:48: warning: variable 'init_info' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
    1706 |                 created = ctlv_create(parent, &ctlv_family, &init_info);
         |                                                              ^~~~~~~~~
   1 warning generated.


vim +/init_info +1706 drivers/ctlv/tests/registration_kunit.c

2c4421adfbc30c9 Jiri Pirko 2026-08-26  1696  
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1697  static void ctlv_reg_test_root_init_info(struct kunit *test)
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1698  {
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1699  	struct device *parent;
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1700  	struct ctlv_device *created;
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1701  	u8 init_info;
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1702  
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1703  	parent = kunit_device_register(test, "ctlv-root-info");
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1704  	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent);
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1705  	kunit_warning_suppress(test) {
2c4421adfbc30c9 Jiri Pirko 2026-08-26 @1706  		created = ctlv_create(parent, &ctlv_family, &init_info);
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1707  		KUNIT_EXPECT_SUPPRESSED_WARNING_COUNT(test, 1);
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1708  	}
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1709  	KUNIT_ASSERT_TRUE(test, IS_ERR(created));
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1710  	KUNIT_EXPECT_EQ(test, PTR_ERR(created), -EINVAL);
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1711  }
2c4421adfbc30c9 Jiri Pirko 2026-08-26  1712  

:::::: The code at line 1706 was first introduced by commit
:::::: 2c4421adfbc30c9ee180047f914b19954af67851 ctlv: Add KUnit tests

:::::: TO: Jiri Pirko <jiri@nvidia.com>
:::::: CC: Jiri Pirko <jiri@nvidia.com>

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

             reply	other threads:[~2026-10-18  7:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18  7:43 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-10-17 20:13 [jpirko-mlxsw:wip_attestation_all_1 49/62] drivers/ctlv/tests/registration_kunit.c:1706:48: warning: variable 'init_info' is uninitialized when passed as a const pointer argument here kernel test robot

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=202610161928.r7mxYLH1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jiri@nvidia.com \
    --cc=oe-kbuild-all@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.