All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Zhang Yi <zhangyi@everest-semi.com>
Cc: oe-kbuild-all@lists.linux.dev, Mark Brown <broonie@kernel.org>
Subject: [broonie-ci:asoc-7.3 56/63] sound/soc/codecs/es8389.c:109 find_best_hpf_freq() warn: unsigned 'target_hz' is never less than zero.
Date: Thu, 02 Jul 2026 11:56:39 +0800	[thread overview]
Message-ID: <202607021153.zU3zkE2I-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/ci.git asoc-7.3
head:   fb5d1b1c5f8a920ee697545fa6dee16825085717
commit: 87592da1a490abd2adeb57a49fb200d058403cc5 [56/63] ASoC: codecs: ES8389: Add private members about HPF
config: m68k-randconfig-r072-20260702 (https://download.01.org/0day-ci/archive/20260702/202607021153.zU3zkE2I-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.3.0
smatch: v0.5.0-9185-gbcc58b9c

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/202607021153.zU3zkE2I-lkp@intel.com/

smatch warnings:
sound/soc/codecs/es8389.c:109 find_best_hpf_freq() warn: unsigned 'target_hz' is never less than zero.

vim +/target_hz +109 sound/soc/codecs/es8389.c

   101	
   102	static bool find_best_hpf_freq(u32 target_hz, u8 *hpf1, u8 *hpf2, u32 *out)
   103	{
   104		int best_row = -1, best_col = -1;
   105		u32 min_diff = U32_MAX;
   106		u32 f, diff;
   107		int i, j;
   108	
 > 109		if ((target_hz > 1020) | (target_hz < 0))
   110			return false;
   111	
   112		for (i = 0; i < 10; i++) {
   113			for (j = i; j < 10; j++) {
   114				f = hpf_table[i][j];
   115	
   116				diff = (target_hz > f) ? (target_hz - f) : (f - target_hz);
   117				if (diff < min_diff) {
   118					min_diff = diff;
   119					best_row = i;
   120					best_col = j;
   121					*out = f;
   122				}
   123			}
   124		}
   125	
   126		*hpf1 = best_col + ES8389_HPF_OFFSET;
   127		*hpf2 = best_row + ES8389_HPF_OFFSET;
   128	
   129		return true;
   130	}
   131	

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

                 reply	other threads:[~2026-07-02  3:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202607021153.zU3zkE2I-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=zhangyi@everest-semi.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.