All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eason Yang <j2anfernee@gmail.com>,
	avifishman70@gmail.com, tmaimon77@gmail.com,
	tali.perry1@gmail.com, venture@google.com, yuenn@google.com,
	benjaminfair@google.com, jic23@kernel.org, lars@metafoo.de,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	nuno.sa@analog.com, dlechner@baylibre.com,
	javier.carrasco.cruz@gmail.com, andy@kernel.org,
	marcelo.schmitt@analog.com, olivier.moysan@foss.st.com,
	mitrutzceclan@gmail.com, matteomartelli3@gmail.com,
	alisadariana@gmail.com, joao.goncalves@toradex.com,
	marius.cristea@microchip.com, mike.looijmans@topic.nl,
	chanh@os.amperecomputing.com, KWLIU@nuvoton.com,
	yhyang2@nuvoton.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	openbmc@lists.ozlabs.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] iio: adc: add Nuvoton NCT720x ADC driver
Date: Wed, 6 Nov 2024 20:30:54 +0800	[thread overview]
Message-ID: <202411062051.TLRkJSSL-lkp@intel.com> (raw)
In-Reply-To: <20241106023916.440767-3-j2anfernee@gmail.com>

Hi Eason,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.12-rc6 next-20241106]
[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/Eason-Yang/dt-bindings-iio-adc-Add-binding-for-Nuvoton-NCT720x-ADCs/20241106-104046
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20241106023916.440767-3-j2anfernee%40gmail.com
patch subject: [PATCH v1 2/2] iio: adc: add Nuvoton NCT720x ADC driver
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20241106/202411062051.TLRkJSSL-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241106/202411062051.TLRkJSSL-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/202411062051.TLRkJSSL-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/iio/adc/nct720x.c:9:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:19:
   In file included from include/linux/elf.h:6:
   In file included from arch/s390/include/asm/elf.h:181:
   In file included from arch/s390/include/asm/mmu_context.h:11:
   In file included from arch/s390/include/asm/pgalloc.h:18:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/adc/nct720x.c:526:16: warning: cast to smaller integer type 'enum nct720x_chips' from 'const void *' [-Wvoid-pointer-to-enum-cast]
     526 |                 chip->type = (enum nct720x_chips)device_get_match_data(&client->dev);
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   5 warnings generated.


vim +526 drivers/iio/adc/nct720x.c

   511	
   512	static int nct720x_probe(struct i2c_client *client)
   513	{
   514		const struct i2c_device_id *id = i2c_client_get_device_id(client);
   515		struct nct720x_chip_info *chip;
   516		struct iio_dev *indio_dev;
   517		int ret;
   518		u32 tmp;
   519	
   520		indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));
   521		if (!indio_dev)
   522			return -ENOMEM;
   523		chip = iio_priv(indio_dev);
   524	
   525		if (client->dev.of_node)
 > 526			chip->type = (enum nct720x_chips)device_get_match_data(&client->dev);
   527		else
   528			chip->type = i2c_match_id(nct720x_id, client)->driver_data;
   529	
   530		chip->vin_max = (chip->type == nct7201) ? NCT7201_VIN_MAX : NCT7202_VIN_MAX;
   531	
   532		ret = of_property_read_u32(client->dev.of_node, "read-vin-data-size", &tmp);
   533		if (ret < 0) {
   534			pr_err("read-vin-data-size property not found\n");
   535			return ret;
   536		}
   537	
   538		if (tmp == 8) {
   539			chip->use_read_byte_vin = true;
   540		} else if (tmp == 16) {
   541			chip->use_read_byte_vin = false;
   542		} else {
   543			pr_err("invalid read-vin-data-size (%d)\n", tmp);
   544			return -EINVAL;
   545		}
   546	
   547		mutex_init(&chip->access_lock);
   548	
   549		/* this is only used for device removal purposes */
   550		i2c_set_clientdata(client, indio_dev);
   551	
   552		chip->client = client;
   553	
   554		ret = nct720x_init_chip(chip);
   555		if (ret < 0)
   556			return ret;
   557	
   558		indio_dev->name = id->name;
   559		indio_dev->channels = nct720x_channels;
   560		indio_dev->num_channels = ARRAY_SIZE(nct720x_channels);
   561		indio_dev->info = &nct720x_info;
   562		indio_dev->modes = INDIO_DIRECT_MODE;
   563	
   564		iio_device_register(indio_dev);
   565	
   566		return 0;
   567	}
   568	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Eason Yang <j2anfernee@gmail.com>,
	avifishman70@gmail.com, tmaimon77@gmail.com,
	tali.perry1@gmail.com, venture@google.com, yuenn@google.com,
	benjaminfair@google.com, jic23@kernel.org, lars@metafoo.de,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	nuno.sa@analog.com, dlechner@baylibre.com,
	javier.carrasco.cruz@gmail.com, andy@kernel.org,
	marcelo.schmitt@analog.com, olivier.moysan@foss.st.com,
	mitrutzceclan@gmail.com, matteomartelli3@gmail.com,
	alisadariana@gmail.com, joao.goncalves@toradex.com,
	marius.cristea@microchip.com, mike.looijmans@topic.nl,
	chanh@os.amperecomputing.com, KWLIU@nuvoton.com,
	yhyang2@nuvoton.com
Cc: devicetree@vger.kernel.org, linux-iio@vger.kernel.org,
	openbmc@lists.ozlabs.org, llvm@lists.linux.dev,
	linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v1 2/2] iio: adc: add Nuvoton NCT720x ADC driver
Date: Wed, 6 Nov 2024 20:30:54 +0800	[thread overview]
Message-ID: <202411062051.TLRkJSSL-lkp@intel.com> (raw)
In-Reply-To: <20241106023916.440767-3-j2anfernee@gmail.com>

Hi Eason,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.12-rc6 next-20241106]
[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/Eason-Yang/dt-bindings-iio-adc-Add-binding-for-Nuvoton-NCT720x-ADCs/20241106-104046
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20241106023916.440767-3-j2anfernee%40gmail.com
patch subject: [PATCH v1 2/2] iio: adc: add Nuvoton NCT720x ADC driver
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20241106/202411062051.TLRkJSSL-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241106/202411062051.TLRkJSSL-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/202411062051.TLRkJSSL-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/iio/adc/nct720x.c:9:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:19:
   In file included from include/linux/elf.h:6:
   In file included from arch/s390/include/asm/elf.h:181:
   In file included from arch/s390/include/asm/mmu_context.h:11:
   In file included from arch/s390/include/asm/pgalloc.h:18:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/adc/nct720x.c:526:16: warning: cast to smaller integer type 'enum nct720x_chips' from 'const void *' [-Wvoid-pointer-to-enum-cast]
     526 |                 chip->type = (enum nct720x_chips)device_get_match_data(&client->dev);
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   5 warnings generated.


vim +526 drivers/iio/adc/nct720x.c

   511	
   512	static int nct720x_probe(struct i2c_client *client)
   513	{
   514		const struct i2c_device_id *id = i2c_client_get_device_id(client);
   515		struct nct720x_chip_info *chip;
   516		struct iio_dev *indio_dev;
   517		int ret;
   518		u32 tmp;
   519	
   520		indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));
   521		if (!indio_dev)
   522			return -ENOMEM;
   523		chip = iio_priv(indio_dev);
   524	
   525		if (client->dev.of_node)
 > 526			chip->type = (enum nct720x_chips)device_get_match_data(&client->dev);
   527		else
   528			chip->type = i2c_match_id(nct720x_id, client)->driver_data;
   529	
   530		chip->vin_max = (chip->type == nct7201) ? NCT7201_VIN_MAX : NCT7202_VIN_MAX;
   531	
   532		ret = of_property_read_u32(client->dev.of_node, "read-vin-data-size", &tmp);
   533		if (ret < 0) {
   534			pr_err("read-vin-data-size property not found\n");
   535			return ret;
   536		}
   537	
   538		if (tmp == 8) {
   539			chip->use_read_byte_vin = true;
   540		} else if (tmp == 16) {
   541			chip->use_read_byte_vin = false;
   542		} else {
   543			pr_err("invalid read-vin-data-size (%d)\n", tmp);
   544			return -EINVAL;
   545		}
   546	
   547		mutex_init(&chip->access_lock);
   548	
   549		/* this is only used for device removal purposes */
   550		i2c_set_clientdata(client, indio_dev);
   551	
   552		chip->client = client;
   553	
   554		ret = nct720x_init_chip(chip);
   555		if (ret < 0)
   556			return ret;
   557	
   558		indio_dev->name = id->name;
   559		indio_dev->channels = nct720x_channels;
   560		indio_dev->num_channels = ARRAY_SIZE(nct720x_channels);
   561		indio_dev->info = &nct720x_info;
   562		indio_dev->modes = INDIO_DIRECT_MODE;
   563	
   564		iio_device_register(indio_dev);
   565	
   566		return 0;
   567	}
   568	

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

  reply	other threads:[~2024-11-06 12:32 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06  2:39 [PATCH v1 0/2] iio: adc: add Nuvoton NCT720x ADC driver Eason Yang
2024-11-06  2:39 ` Eason Yang
2024-11-06  2:39 ` [PATCH v1 1/2] dt-bindings: iio: adc: Add binding for Nuvoton NCT720x ADCs Eason Yang
2024-11-06  2:39   ` Eason Yang
2024-11-06  4:58   ` Chanh Nguyen
2024-11-06  4:58     ` Chanh Nguyen
2024-11-06  8:48     ` Yu-Hsian Yang
2024-11-06  9:22     ` Yu-Hsian Yang
2024-11-06  9:22       ` Yu-Hsian Yang
2024-11-09 13:42       ` Jonathan Cameron
2024-11-09 13:42         ` Jonathan Cameron
2024-11-09 14:29         ` Jonathan Cameron
2024-11-09 14:29           ` Jonathan Cameron
2024-11-11  7:45           ` Yu-Hsian Yang
2024-11-11  7:45             ` Yu-Hsian Yang
2024-11-23 14:47             ` Jonathan Cameron
2024-11-23 14:47               ` Jonathan Cameron
2024-11-28  2:14               ` Yu-Hsian Yang
2024-11-28  2:14                 ` Yu-Hsian Yang
2024-11-29 14:50                 ` David Lechner
2024-11-29 14:50                   ` David Lechner
2024-12-02  3:57                   ` Yu-Hsian Yang
2024-12-02  3:57                     ` Yu-Hsian Yang
2024-11-06 16:13     ` Conor Dooley
2024-11-06 16:13       ` Conor Dooley
2024-11-07  0:59       ` Yu-Hsian Yang
2024-11-07  0:59         ` Yu-Hsian Yang
2024-11-09 13:44   ` Jonathan Cameron
2024-11-09 13:44     ` Jonathan Cameron
2024-11-06  2:39 ` [PATCH v1 2/2] iio: adc: add Nuvoton NCT720x ADC driver Eason Yang
2024-11-06  2:39   ` Eason Yang
2024-11-06 12:30   ` kernel test robot [this message]
2024-11-06 12:30     ` kernel test robot
2024-11-07  0:36     ` Yu-Hsian Yang
2024-11-07  0:36       ` Yu-Hsian Yang
2024-11-06 13:41   ` Krzysztof Kozlowski
2024-11-06 13:41     ` Krzysztof Kozlowski
2024-11-07  0:41     ` Yu-Hsian Yang
2024-11-07  0:41       ` Yu-Hsian Yang
2024-11-09 13:45       ` Jonathan Cameron
2024-11-09 13:45         ` Jonathan Cameron
2024-12-04  1:49         ` Yu-Hsian Yang
2024-12-04  1:49           ` Yu-Hsian Yang
2024-11-07  6:13   ` anish kumar
2024-11-07  6:13     ` anish kumar
2024-11-07  7:17     ` Yu-Hsian Yang
2024-11-07  7:17       ` Yu-Hsian Yang
2024-11-07  8:02   ` Andy Shevchenko
2024-11-07  8:02     ` Andy Shevchenko
2024-11-09 14:37   ` Jonathan Cameron
2024-11-09 14:37     ` Jonathan Cameron
2024-12-04  2:50     ` Yu-Hsian Yang
2024-12-04  2:50       ` Yu-Hsian Yang

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=202411062051.TLRkJSSL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=KWLIU@nuvoton.com \
    --cc=alisadariana@gmail.com \
    --cc=andy@kernel.org \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=chanh@os.amperecomputing.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=j2anfernee@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=jic23@kernel.org \
    --cc=joao.goncalves@toradex.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=marcelo.schmitt@analog.com \
    --cc=marius.cristea@microchip.com \
    --cc=matteomartelli3@gmail.com \
    --cc=mike.looijmans@topic.nl \
    --cc=mitrutzceclan@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=olivier.moysan@foss.st.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=robh@kernel.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=yhyang2@nuvoton.com \
    --cc=yuenn@google.com \
    /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.