Hi Kiseok,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on robh/for-next linus/master v6.11-rc6 next-20240903]
[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/Kiseok-Jo/ASoC-sma1307-Add-driver-for-Iron-Device-SMA1307/20240903-134558
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20240903054435.2659-2-kiseok.jo%40irondevice.com
patch subject: [PATCH v2 1/3] ASoC: sma1307: Add driver for Iron Device SMA1307
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20240903/202409032357.hPIdG9kb-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240903/202409032357.hPIdG9kb-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409032357.hPIdG9kb-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
sound/soc/codecs/sma1307.c: In function 'sma1307_setting_loaded':
>> sound/soc/codecs/sma1307.c:1772:44: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
1772 | int *data, size, offset, num_mode, ret;
| ^~~
vim +/ret +1772 sound/soc/codecs/sma1307.c
1768
1769 static void sma1307_setting_loaded(struct sma1307_priv *sma1307, const char *file)
1770 {
1771 const struct firmware *fw;
> 1772 int *data, size, offset, num_mode, ret;
1773
1774 ret = request_firmware(&fw, file, sma1307->dev);
1775
1776 if (!fw) {
1777 dev_err(sma1307->dev, "%s: failed to read \"%s\"\n",
1778 __func__, setting_file);
1779 release_firmware(fw);
1780 sma1307->set.status = false;
1781 return;
1782 } else if ((fw->size) < SMA1307_SETTING_HEADER_SIZE) {
1783 dev_err(sma1307->dev, "%s: Invalid file\n", __func__);
1784 release_firmware(fw);
1785 sma1307->set.status = false;
1786 return;
1787 }
1788
1789 data = kzalloc(fw->size, GFP_KERNEL);
1790 size = fw->size >> 2;
1791 memcpy(data, fw->data, fw->size);
1792
1793 release_firmware(fw);
1794
1795 /* HEADER */
1796 sma1307->set.header_size = SMA1307_SETTING_HEADER_SIZE;
1797 sma1307->set.checksum = data[sma1307->set.header_size - 2];
1798 sma1307->set.num_mode = data[sma1307->set.header_size - 1];
1799 num_mode = sma1307->set.num_mode;
1800 sma1307->set.header = devm_kzalloc(sma1307->dev,
1801 sma1307->set.header_size,
1802 GFP_KERNEL);
1803 memcpy(sma1307->set.header, data,
1804 sma1307->set.header_size * sizeof(int));
1805
1806 if ((sma1307->set.checksum >> 8) != SMA1307_SETTING_CHECKSUM) {
1807 dev_err(sma1307->dev, "%s: failed by dismatch \"%s\"\n",
1808 __func__, setting_file);
1809 sma1307->set.status = false;
1810 return;
1811 }
1812
1813 /* DEFAULT */
1814 sma1307->set.def_size = SMA1307_SETTING_DEFAULT_SIZE;
1815 sma1307->set.def
1816 = devm_kzalloc(sma1307->dev,
1817 sma1307->set.def_size * sizeof(int), GFP_KERNEL);
1818 memcpy(sma1307->set.def,
1819 &data[sma1307->set.header_size],
1820 sma1307->set.def_size * sizeof(int));
1821
1822 /* MODE */
1823 offset = sma1307->set.header_size + sma1307->set.def_size;
1824 sma1307->set.mode_size = DIV_ROUND_CLOSEST(size - offset, num_mode + 1);
1825 for (int i = 0; i < num_mode; i++) {
1826 sma1307->set.mode_set[i]
1827 = devm_kzalloc(sma1307->dev,
1828 sma1307->set.mode_size * 2 * sizeof(int),
1829 GFP_KERNEL);
1830 for (int j = 0; j < sma1307->set.mode_size; j++) {
1831 sma1307->set.mode_set[i][2 * j]
1832 = data[offset + ((num_mode + 1) * j)];
1833 sma1307->set.mode_set[i][2 * j + 1]
1834 = data[offset + ((num_mode + 1) * j + i + 1)];
1835 }
1836 }
1837
1838 kfree(data);
1839 sma1307->set.status = true;
1840
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]