All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [Patch v5 11/12] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs
Date: Sat, 29 Jun 2024 03:30:36 +0800	[thread overview]
Message-ID: <202406290331.ClWuGmiC-lkp@intel.com> (raw)
In-Reply-To: <20240627150046.258795-12-piotr.wojtaszczyk@timesys.com>

Hi Piotr,

kernel test robot noticed the following build warnings:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on robh/for-next broonie-sound/for-next linus/master v6.10-rc5 next-20240627]
[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/Piotr-Wojtaszczyk/dt-bindings-dma-pl08x-Add-dma-cells-description/20240628-152522
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20240627150046.258795-12-piotr.wojtaszczyk%40timesys.com
patch subject: [Patch v5 11/12] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240629/202406290331.ClWuGmiC-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240629/202406290331.ClWuGmiC-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/202406290331.ClWuGmiC-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/fsl/lpc3xxx-i2s.c:42:6: warning: variable 'savedbitclkrate' set but not used [-Wunused-but-set-variable]
      42 |         u32 savedbitclkrate, diff, trate, baseclk;
         |             ^
>> sound/soc/fsl/lpc3xxx-i2s.c:326:47: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
     326 |                                      "failed to init register map: %d\n", ret);
         |                                                                           ^~~
   sound/soc/fsl/lpc3xxx-i2s.c:310:9: note: initialize the variable 'ret' to silence this warning
     310 |         int ret;
         |                ^
         |                 = 0
   2 warnings generated.


vim +/savedbitclkrate +42 sound/soc/fsl/lpc3xxx-i2s.c

    27	
    28	#define LPC3XXX_I2S_RATES ( \
    29		SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \
    30		SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
    31		SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000)
    32	
    33	#define LPC3XXX_I2S_FORMATS ( \
    34		SNDRV_PCM_FMTBIT_S8 | \
    35		SNDRV_PCM_FMTBIT_S16_LE | \
    36		SNDRV_PCM_FMTBIT_S32_LE)
    37	
    38	static void __lpc3xxx_find_clkdiv(u32 *clkx, u32 *clky, int freq, int xbytes, u32 clkrate)
    39	{
    40		u32 i2srate;
    41		u32 idxx, idyy;
  > 42		u32 savedbitclkrate, diff, trate, baseclk;
    43	
    44		/* Adjust rate for sample size (bits) and 2 channels and offset for
    45		 * divider in clock output
    46		 */
    47		i2srate = (freq / 100) * 2 * (8 * xbytes);
    48		i2srate = i2srate << 1;
    49		clkrate = clkrate / 100;
    50		baseclk = clkrate;
    51		*clkx = 1;
    52		*clky = 1;
    53	
    54		/* Find the best divider */
    55		*clkx = *clky = 0;
    56		savedbitclkrate = 0;
    57		diff = ~0;
    58		for (idxx = 1; idxx < 0xFF; idxx++) {
    59			for (idyy = 1; idyy < 0xFF; idyy++) {
    60				trate = (baseclk * idxx) / idyy;
    61				if (abs(trate - i2srate) < diff) {
    62					diff = abs(trate - i2srate);
    63					savedbitclkrate = trate;
    64					*clkx = idxx;
    65					*clky = idyy;
    66				}
    67			}
    68		}
    69	}
    70	

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

  reply	other threads:[~2024-06-28 19:31 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 15:00 [Patch v5 00/12] Add audio support for LPC32XX CPUs Piotr Wojtaszczyk
2024-06-27 15:00 ` Piotr Wojtaszczyk
2024-06-27 15:00 ` [Patch v5 01/12] dt-bindings: dma: pl08x: Add dma-cells description Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-27 15:00 ` [Patch v5 02/12] dt-bindings: dma: Add lpc32xx DMA mux binding Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-28  7:47   ` Krzysztof Kozlowski
2024-06-28  7:47     ` Krzysztof Kozlowski
2024-09-10 22:20   ` Rob Herring (Arm)
2024-09-10 22:20     ` Rob Herring (Arm)
2024-06-27 15:00 ` [Patch v5 03/12] ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-27 15:00 ` [Patch v5 04/12] ARM: dts: lpc32xx: Use simple-mfd for clock control block Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-29 13:27   ` kernel test robot
2024-06-27 15:00 ` [Patch v5 05/12] ARM: dts: lpc32xx: Add missing dma properties Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-27 15:00 ` [Patch v5 06/12] ARM: dts: lpc32xx: Add missing i2s properties Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-27 15:00 ` [Patch v5 07/12] clk: lpc32xx: initialize regmap using parent syscon Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-27 15:00 ` [Patch v5 08/12] dmaengine: Add dma router for pl08x in LPC32XX SoC Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-07-01 19:47   ` Frank Li
2024-07-01 19:47     ` Frank Li
2024-07-01 19:47     ` Frank Li
2024-06-27 15:00 ` [Patch v5 09/12] ARM: lpc32xx: Remove pl08x platform data in favor for device tree Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-27 15:00 ` [Patch v5 10/12] mtd: rawnand: lpx32xx: Request DMA channels using DT entries Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-07-01 12:00   ` Miquel Raynal
2024-07-01 12:00     ` Miquel Raynal
2024-06-27 15:00 ` [Patch v5 11/12] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-28 19:30   ` kernel test robot [this message]
2024-06-29  4:19   ` kernel test robot
2024-06-27 15:00 ` [Patch v5 12/12] i2x: pnx: Fix potential deadlock warning from del_timer_sync() call in isr Piotr Wojtaszczyk
2024-06-27 15:00   ` Piotr Wojtaszczyk
2024-06-28  7:48   ` Krzysztof Kozlowski
2024-06-28  7:48     ` Krzysztof Kozlowski
2024-06-28 18:23 ` (subset) [Patch v5 00/12] Add audio support for LPC32XX CPUs Mark Brown
2024-06-28 18:23   ` Mark Brown

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=202406290331.ClWuGmiC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=piotr.wojtaszczyk@timesys.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.