Linux Sound subsystem development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kiseok Jo <kiseok.jo@irondevice.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, alsa-devel@alsa-project.org,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	application@irondevice.com, Kiseok Jo <kiseok.jo@irondevice.com>
Subject: Re: [PATCH v2 1/3] ASoC: sma1307: Add driver for Iron Device SMA1307
Date: Tue, 3 Sep 2024 23:57:04 +0800	[thread overview]
Message-ID: <202409032357.hPIdG9kb-lkp@intel.com> (raw)
In-Reply-To: <20240903054435.2659-2-kiseok.jo@irondevice.com>

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@intel.com/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@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/202409032357.hPIdG9kb-lkp@intel.com/

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

  parent reply	other threads:[~2024-09-03 15:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03  5:44 [PATCH v2 0/3] Add a driver for the Iron Device SMA1307 Amp Kiseok Jo
2024-09-03  5:44 ` [PATCH v2 1/3] ASoC: sma1307: Add driver for Iron Device SMA1307 Kiseok Jo
2024-09-03  6:57   ` Krzysztof Kozlowski
2024-09-03  6:58     ` Krzysztof Kozlowski
2024-09-03  7:57       ` Ki-Seok Jo
2024-09-03  8:15         ` Krzysztof Kozlowski
2024-09-03  8:33     ` Ki-Seok Jo
2024-09-03  8:51       ` Krzysztof Kozlowski
2024-09-03 15:57   ` kernel test robot [this message]
2024-09-03 18:12   ` Mark Brown
2024-09-12  8:35     ` Ki-Seok Jo
2024-09-12 11:23       ` Mark Brown
2024-09-03  5:44 ` [PATCH v2 2/3] ASoC: dt-bindings: irondevice,sma1307: Add initial DT binding Kiseok Jo
2024-09-03  6:49   ` Krzysztof Kozlowski
2024-09-03  8:39     ` Ki-Seok Jo
2024-09-03  8:55       ` Krzysztof Kozlowski
2024-09-03  9:08         ` Ki-Seok Jo
2024-09-03  9:14           ` Krzysztof Kozlowski
2024-09-03 13:39             ` Mark Brown
2024-09-11  1:16             ` FW: " Ki-Seok Jo
2024-09-11 18:26               ` Conor Dooley
2024-09-12  0:25                 ` Ki-Seok Jo
2024-09-03  5:44 ` [PATCH v2 3/3] doc: ABI: testing: sma1307: Add support for SMA1307 Kiseok Jo

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=202409032357.hPIdG9kb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=application@irondevice.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kiseok.jo@irondevice.com \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox