All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Baojun Xu <baojun.xu@ti.com>, tiwai@suse.de
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	robh+dt@kernel.org, andriy.shevchenko@linux.intel.com,
	lgirdwood@gmail.com, perex@perex.cz,
	pierre-louis.bossart@linux.intel.com, kevin-lu@ti.com,
	shenghao-ding@ti.com, navada@ti.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, liam.r.girdwood@intel.com,
	yung-chuan.liao@linux.intel.com, baojun.xu@ti.com,
	broonie@kernel.org, soyer@irl.hu
Subject: Re: [PATCH v2 2/3] ALSA: hda/tas2781: Main code of tas2781 driver for SPI
Date: Wed, 10 Apr 2024 01:00:36 +0800	[thread overview]
Message-ID: <202404100015.FAgrEOeO-lkp@intel.com> (raw)
In-Reply-To: <20240409024816.1180-3-baojun.xu@ti.com>

Hi Baojun,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tiwai-sound/for-next]
[also build test WARNING on tiwai-sound/for-linus rafael-pm/linux-next linus/master v6.9-rc3 next-20240409]
[cannot apply to rafael-pm/acpi-bus rafael-pm/devprop]
[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/Baojun-Xu/ALSA-hda-tas2781-Modification-for-add-tas2781-driver-for-SPI/20240409-105140
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
patch link:    https://lore.kernel.org/r/20240409024816.1180-3-baojun.xu%40ti.com
patch subject: [PATCH v2 2/3] ALSA: hda/tas2781: Main code of tas2781 driver for SPI
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20240410/202404100015.FAgrEOeO-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240410/202404100015.FAgrEOeO-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/202404100015.FAgrEOeO-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from sound/pci/hda/tas2781_hda_spi.c:9:
   In file included from include/linux/acpi.h:39:
   In file included from include/acpi/acpi_io.h:7:
   In file included from arch/arm64/include/asm/acpi.h:14:
   In file included from include/linux/memblock.h:12:
   In file included from include/linux/mm.h:2208:
   include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     508 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     509 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     515 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     516 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     527 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     528 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     536 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     537 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> sound/pci/hda/tas2781_hda_spi.c:1159:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    1159 |         if (strstr(dev_name(&spi->dev), "TIAS2781")) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/pci/hda/tas2781_hda_spi.c:1203:6: note: uninitialized use occurs here
    1203 |         if (ret)
         |             ^~~
   sound/pci/hda/tas2781_hda_spi.c:1159:2: note: remove the 'if' if its condition is always true
    1159 |         if (strstr(dev_name(&spi->dev), "TIAS2781")) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1160 |                 device_name = "TIAS2781";
    1161 |                 tas_priv->save_calibration = tas2781_save_calibration;
    1162 |                 tas_priv->apply_calibration = tas2781_apply_calib;
    1163 |         } else
         |           ~~~~
    1164 |                 goto err;
         |                 ~~~~~~~~
>> sound/pci/hda/tas2781_hda_spi.c:1153:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    1153 |         if (!tas_priv)
         |             ^~~~~~~~~
   sound/pci/hda/tas2781_hda_spi.c:1203:6: note: uninitialized use occurs here
    1203 |         if (ret)
         |             ^~~
   sound/pci/hda/tas2781_hda_spi.c:1153:2: note: remove the 'if' if its condition is always false
    1153 |         if (!tas_priv)
         |         ^~~~~~~~~~~~~~
    1154 |                 goto err;
         |                 ~~~~~~~~
   sound/pci/hda/tas2781_hda_spi.c:1144:9: note: initialize the variable 'ret' to silence this warning
    1144 |         int ret;
         |                ^
         |                 = 0
   7 warnings generated.


vim +1159 sound/pci/hda/tas2781_hda_spi.c

  1138	
  1139	static int tas2781_hda_spi_probe(struct spi_device *spi)
  1140	{
  1141		struct tasdevice_priv *tas_priv;
  1142		struct tas2781_hda *tas_hda;
  1143		const char *device_name;
  1144		int ret;
  1145	
  1146		tas_hda = devm_kzalloc(&spi->dev, sizeof(*tas_hda), GFP_KERNEL);
  1147		if (!tas_hda)
  1148			return -ENOMEM;
  1149	
  1150		tas_hda->dev = &spi->dev;
  1151	
  1152		tas_priv = devm_kzalloc(&spi->dev, sizeof(*tas_priv), GFP_KERNEL);
> 1153		if (!tas_priv)
  1154			goto err;
  1155		tas_priv->dev = &spi->dev;
  1156		tas_priv->client = (void *)spi;
  1157		tas_hda->priv = tas_priv;
  1158	
> 1159		if (strstr(dev_name(&spi->dev), "TIAS2781")) {
  1160			device_name = "TIAS2781";
  1161			tas_priv->save_calibration = tas2781_save_calibration;
  1162			tas_priv->apply_calibration = tas2781_apply_calib;
  1163		} else
  1164			goto err;
  1165	
  1166		tas_priv->irq_info.irq = spi->irq;
  1167		dev_set_drvdata(&spi->dev, tas_hda);
  1168		ret = tas2781_read_acpi(tas_hda, device_name,
  1169			spi_get_chipselect(spi, 0));
  1170		if (ret)
  1171			return dev_err_probe(tas_hda->dev, ret,
  1172				"Platform not supported\n");
  1173	
  1174		tas_priv->regmap = devm_regmap_init_spi(spi, &tasdevice_regmap);
  1175		if (IS_ERR(tas_priv->regmap)) {
  1176			ret = PTR_ERR(tas_priv->regmap);
  1177			dev_err(tas_priv->dev, "Failed to allocate regmap: %d\n",
  1178				ret);
  1179			goto err;
  1180		}
  1181		ret = tasdevice_spi_init(tas_hda->priv);
  1182		if (ret)
  1183			goto err;
  1184	
  1185		pm_runtime_set_autosuspend_delay(tas_hda->dev, 3000);
  1186		pm_runtime_use_autosuspend(tas_hda->dev);
  1187		pm_runtime_mark_last_busy(tas_hda->dev);
  1188		pm_runtime_set_active(tas_hda->dev);
  1189		pm_runtime_get_noresume(tas_hda->dev);
  1190		pm_runtime_enable(tas_hda->dev);
  1191	
  1192		pm_runtime_put_autosuspend(tas_hda->dev);
  1193	
  1194		tas2781_spi_reset(tas_priv);
  1195	
  1196		ret = component_add(tas_hda->dev, &tas2781_hda_comp_ops);
  1197		if (ret) {
  1198			dev_err(tas_hda->dev, "Register component failed: %d\n", ret);
  1199			pm_runtime_disable(tas_hda->dev);
  1200		}
  1201	
  1202	err:
  1203		if (ret)
  1204			tas2781_hda_remove(&spi->dev);
  1205		return ret;
  1206	}
  1207	

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

  parent reply	other threads:[~2024-04-09 17:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  2:48 [PATCH v2 0/3] ALSA: hda/tas2781: Add tas2781 driver for SPI Baojun Xu
2024-04-09  2:48 ` [PATCH v2 1/3] ALSA: hda/tas2781: Modification for add " Baojun Xu
2024-04-09 13:02   ` Andy Shevchenko
2024-04-16  7:45     ` [EXTERNAL] " Xu, Baojun
2024-04-16 14:02       ` Andy Shevchenko
2024-04-09  2:48 ` [PATCH v2 2/3] ALSA: hda/tas2781: Main code of " Baojun Xu
2024-04-09 13:21   ` Andy Shevchenko
2024-04-18  5:12     ` [EXTERNAL] " Xu, Baojun
2024-04-18 11:53       ` Andy Shevchenko
2024-04-09 17:00   ` kernel test robot [this message]
2024-04-09  2:48 ` [PATCH v2 3/3] ALSA: hda/tas2781: Firmware load for " Baojun Xu
2024-04-09 13:26   ` Andy Shevchenko
2024-04-09 18:26   ` 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=202404100015.FAgrEOeO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=kevin-lu@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=navada@ti.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=shenghao-ding@ti.com \
    --cc=soyer@irl.hu \
    --cc=tiwai@suse.de \
    --cc=yung-chuan.liao@linux.intel.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.