lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202411030141.DTmej8oX-lkp@intel.com>
Date: Sun, 3 Nov 2024 03:55:24 +0800
From: kernel test robot <lkp@...el.com>
To: Dzmitry Sankouski <dsankouski@...il.com>,
	Sebastian Reichel <sre@...nel.org>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Krzysztof Kozlowski <krzk@...nel.org>, Lee Jones <lee@...nel.org>,
	Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Pavel Machek <pavel@....cz>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org, linux-input@...r.kernel.org,
	linux-leds@...r.kernel.org,
	Dzmitry Sankouski <dsankouski@...il.com>
Subject: Re: [PATCH v8 3/7] mfd: Add new driver for MAX77705 PMIC

Hi Dzmitry,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 86e3904dcdc7e70e3257fc1de294a1b75f3d8d04]

url:    https://github.com/intel-lab-lkp/linux/commits/Dzmitry-Sankouski/power-supply-add-undervoltage-health-status-property/20241031-053513
base:   86e3904dcdc7e70e3257fc1de294a1b75f3d8d04
patch link:    https://lore.kernel.org/r/20241031-starqltechn_integration_upstream-v8-3-2fa666c2330e%40gmail.com
patch subject: [PATCH v8 3/7] mfd: Add new driver for MAX77705 PMIC
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241103/202411030141.DTmej8oX-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241103/202411030141.DTmej8oX-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411030141.DTmej8oX-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/mfd/max77705.c:8:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:2223:
   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/mfd/max77705.c:129:6: warning: variable 'pmic_rev' is uninitialized when used here [-Wuninitialized]
     129 |         if (pmic_rev != MAX77705_PASS3) {
         |             ^~~~~~~~
   drivers/mfd/max77705.c:108:13: note: initialize the variable 'pmic_rev' to silence this warning
     108 |         u8 pmic_rev;
         |                    ^
         |                     = '\0'
   5 warnings generated.


vim +/pmic_rev +129 drivers/mfd/max77705.c

   100	
   101	static int max77705_i2c_probe(struct i2c_client *i2c)
   102	{
   103		struct max77693_dev *max77705;
   104		struct regmap_irq_chip_data *irq_data;
   105		struct irq_domain *domain;
   106		int ret;
   107		unsigned int pmic_rev_value;
   108		u8 pmic_rev;
   109	
   110	
   111		max77705 = devm_kzalloc(&i2c->dev, sizeof(*max77705), GFP_KERNEL);
   112		if (!max77705)
   113			return -ENOMEM;
   114	
   115		max77705->i2c = i2c;
   116		max77705->dev = &i2c->dev;
   117		max77705->irq = i2c->irq;
   118		max77705->type = TYPE_MAX77705;
   119		i2c_set_clientdata(i2c, max77705);
   120	
   121		max77705->regmap = devm_regmap_init_i2c(i2c, &max77705_regmap_config);
   122	
   123		if (IS_ERR(max77705->regmap))
   124			return PTR_ERR(max77705->regmap);
   125	
   126		if (regmap_read(max77705->regmap, MAX77705_PMIC_REG_PMICREV, &pmic_rev_value) < 0)
   127			return -ENODEV;
   128	
 > 129		if (pmic_rev != MAX77705_PASS3) {
   130			dev_err(max77705->dev, "rev.0x%x is not tested",
   131				pmic_rev);
   132			return -ENODEV;
   133		}
   134	
   135		max77705->regmap_leds = devm_regmap_init_i2c(i2c, &max77705_leds_regmap_config);
   136	
   137		if (IS_ERR(max77705->regmap_leds))
   138			return PTR_ERR(max77705->regmap_leds);
   139	
   140		ret = devm_regmap_add_irq_chip(max77705->dev, max77705->regmap,
   141						max77705->irq,
   142						IRQF_ONESHOT | IRQF_SHARED, 0,
   143						&max77705_topsys_irq_chip,
   144						&irq_data);
   145	
   146		if (ret)
   147			dev_err(max77705->dev, "failed to add irq chip: %d\n", ret);
   148	
   149		/* Unmask interrupts from all blocks in interrupt source register */
   150		ret = regmap_update_bits(max77705->regmap,
   151					 MAX77705_PMIC_REG_INTSRC_MASK,
   152					 MAX77705_SRC_IRQ_ALL, (unsigned int)~MAX77705_SRC_IRQ_ALL);
   153	
   154		if (ret < 0) {
   155			dev_err(max77705->dev,
   156				"Could not unmask interrupts in INTSRC: %d\n", ret);
   157			return ret;
   158		}
   159	
   160		domain = regmap_irq_get_domain(irq_data);
   161	
   162		ret = devm_mfd_add_devices(max77705->dev, PLATFORM_DEVID_NONE,
   163					   max77705_devs, ARRAY_SIZE(max77705_devs),
   164					   NULL, 0, domain);
   165	
   166		if (ret) {
   167			dev_err(max77705->dev, "Failed to register child devices: %d\n", ret);
   168			return ret;
   169		}
   170	
   171		device_init_wakeup(max77705->dev, true);
   172	
   173		return 0;
   174	}
   175	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ