Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Rob Herring" <robh@kernel.org>,
	"Saravana Kannan" <saravanak@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Basharath Hussain Khaja" <basharath@couthit.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: Re: [PATCH v2] of: address: Add kunit test for __of_address_resource_bounds()
Date: Mon, 27 Jan 2025 19:15:45 +0800	[thread overview]
Message-ID: <202501271803.wd0vg8zR-lkp@intel.com> (raw)
In-Reply-To: <20250127-of-address-overflow-v2-1-61b5046044e9@linutronix.de>

Hi Thomas,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 15e2f65f2ecfeb8e39315522e2b5cfdc5651fc10]

url:    https://github.com/intel-lab-lkp/linux/commits/Thomas-Wei-schuh/of-address-Add-kunit-test-for-__of_address_resource_bounds/20250127-165902
base:   15e2f65f2ecfeb8e39315522e2b5cfdc5651fc10
patch link:    https://lore.kernel.org/r/20250127-of-address-overflow-v2-1-61b5046044e9%40linutronix.de
patch subject: [PATCH v2] of: address: Add kunit test for __of_address_resource_bounds()
config: hexagon-randconfig-001-20250127 (https://download.01.org/0day-ci/archive/20250127/202501271803.wd0vg8zR-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250127/202501271803.wd0vg8zR-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/202501271803.wd0vg8zR-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/of/of_test.c:140:42: warning: implicit conversion from 'long long' to 'resource_size_t' (aka 'unsigned int') changes value from 4294971390 to 4094 [-Wconstant-conversion]
     135 |         {
         |         ~
     136 |                 .start = 0x1000,
     137 |                 .size = 0xffffffff,
     138 |                 .ret = resource_size_32bit() ? -EOVERFLOW : 0,
     139 |                 .res_start = 0x1000,
     140 |                 .res_end = resource_size_32bit() ? 0 : 0x100000ffe,
         |                                                        ^~~~~~~~~~~
   drivers/of/of_test.c:133:42: warning: implicit conversion from 'long long' to 'resource_size_t' (aka 'unsigned int') changes value from 4294967296 to 0 [-Wconstant-conversion]
     128 |         {
         |         ~
     129 |                 .start = 0x100000000ULL,
     130 |                 .size = 1,
     131 |                 .ret = resource_size_32bit() ? -EOVERFLOW : 0,
     132 |                 .res_start = resource_size_32bit() ? 0 : 0x100000000,
     133 |                 .res_end = resource_size_32bit() ? 0 : 0x100000000,
         |                                                        ^~~~~~~~~~~
   drivers/of/of_test.c:132:44: warning: implicit conversion from 'long long' to 'resource_size_t' (aka 'unsigned int') changes value from 4294967296 to 0 [-Wconstant-conversion]
     128 |         {
         |         ~
     129 |                 .start = 0x100000000ULL,
     130 |                 .size = 1,
     131 |                 .ret = resource_size_32bit() ? -EOVERFLOW : 0,
     132 |                 .res_start = resource_size_32bit() ? 0 : 0x100000000,
         |                                                          ^~~~~~~~~~~
   3 warnings generated.


vim +140 drivers/of/of_test.c

    74	
    75	static const struct of_address_resource_bounds_case of_address_resource_bounds_cases[] = {
    76		{
    77			.start = 0,
    78			.size = 0,
    79			.ret = 0,
    80			.res_start = 0,
    81			.res_end = -1,
    82		},
    83		{
    84			.start = 0,
    85			.size = 0x1000,
    86			.ret = 0,
    87			.res_start = 0,
    88			.res_end = 0xfff,
    89		},
    90		{
    91			.start = 0x1000,
    92			.size = 0,
    93			.ret = 0,
    94			.res_start = 0x1000,
    95			.res_end = 0xfff,
    96		},
    97		{
    98			.start = 0x1000,
    99			.size = 0x1000,
   100			.ret = 0,
   101			.res_start = 0x1000,
   102			.res_end = 0x1fff,
   103		},
   104		{
   105			.start = 1,
   106			.size = RESOURCE_SIZE_MAX,
   107			.ret = 0,
   108			.res_start = 1,
   109			.res_end = RESOURCE_SIZE_MAX,
   110		},
   111		{
   112			.start = RESOURCE_SIZE_MAX,
   113			.size = 1,
   114			.ret = 0,
   115			.res_start = RESOURCE_SIZE_MAX,
   116			.res_end = RESOURCE_SIZE_MAX,
   117		},
   118		{
   119			.start = 2,
   120			.size = RESOURCE_SIZE_MAX,
   121			.ret = -EOVERFLOW,
   122		},
   123		{
   124			.start = RESOURCE_SIZE_MAX,
   125			.size = 2,
   126			.ret = -EOVERFLOW,
   127		},
   128		{
   129			.start = 0x100000000ULL,
   130			.size = 1,
   131			.ret = resource_size_32bit() ? -EOVERFLOW : 0,
   132			.res_start = resource_size_32bit() ? 0 : 0x100000000,
   133			.res_end = resource_size_32bit() ? 0 : 0x100000000,
   134		},
   135		{
   136			.start = 0x1000,
   137			.size = 0xffffffff,
   138			.ret = resource_size_32bit() ? -EOVERFLOW : 0,
   139			.res_start = 0x1000,
 > 140			.res_end = resource_size_32bit() ? 0 : 0x100000ffe,
   141		},
   142	};
   143	

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

           reply	other threads:[~2025-01-27 11:15 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20250127-of-address-overflow-v2-1-61b5046044e9@linutronix.de>]

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=202501271803.wd0vg8zR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=basharath@couthit.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    --cc=thomas.weissschuh@linutronix.de \
    /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