0 day kernel build service
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 3984/6263] drivers/media/i2c/imx678.c:905 imx678_write_common() error: buffer overflow 'link_freqs_reg_value' 8 <= 64
Date: Wed, 15 Jul 2026 08:41:00 +0800	[thread overview]
Message-ID: <202607150800.r5xDoCDS-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Jai Luthra <jai.luthra@ideasonboard.com>
CC: Sakari Ailus <sakari.ailus@linux.intel.com>
CC: Tarang Raval <tarang.raval@siliconsignals.io>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   cc2b5f627e8ccbae1188ef2d8be3e451d7f933a5
commit: bf40cc53b1e00c312046f6dd88e9054bc91865af [3984/6263] media: i2c: imx678: Add driver for Sony IMX678
:::::: branch date: 9 hours ago
:::::: commit date: 6 days ago
config: loongarch-randconfig-r073-20260714 (https://download.01.org/0day-ci/archive/20260715/202607150800.r5xDoCDS-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 16.1.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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202607150800.r5xDoCDS-lkp@intel.com/

New smatch warnings:
drivers/media/i2c/imx678.c:905 imx678_write_common() error: buffer overflow 'link_freqs_reg_value' 8 <= 64
drivers/media/i2c/imx678.c:1152 imx678_init_controls() error: buffer overflow 'min_hmax_4lane' 8 <= 64

Old smatch warnings:
arch/loongarch/include/asm/atomic.h:51 arch_atomic_fetch_add_unless() warn: inconsistent indenting

vim +/link_freqs_reg_value +905 drivers/media/i2c/imx678.c

bf40cc53b1e00c Jai Luthra 2026-07-03  895  
bf40cc53b1e00c Jai Luthra 2026-07-03  896  static int imx678_write_common(struct imx678 *imx678)
bf40cc53b1e00c Jai Luthra 2026-07-03  897  {
bf40cc53b1e00c Jai Luthra 2026-07-03  898  	int ret = 0;
bf40cc53b1e00c Jai Luthra 2026-07-03  899  
bf40cc53b1e00c Jai Luthra 2026-07-03  900  	cci_multi_reg_write(imx678->cci, common_regs, ARRAY_SIZE(common_regs),
bf40cc53b1e00c Jai Luthra 2026-07-03  901  			    &ret);
bf40cc53b1e00c Jai Luthra 2026-07-03  902  
bf40cc53b1e00c Jai Luthra 2026-07-03  903  	cci_write(imx678->cci, IMX678_REG_INCK_SEL, imx678->inck_sel_val, &ret);
bf40cc53b1e00c Jai Luthra 2026-07-03  904  	cci_write(imx678->cci, IMX678_REG_DATARATE_SEL,
bf40cc53b1e00c Jai Luthra 2026-07-03 @905  		  link_freqs_reg_value[__ffs(imx678->link_freq_bitmap)], &ret);
bf40cc53b1e00c Jai Luthra 2026-07-03  906  	cci_write(imx678->cci, IMX678_REG_LANEMODE, imx678->lane_mode, &ret);
bf40cc53b1e00c Jai Luthra 2026-07-03  907  
bf40cc53b1e00c Jai Luthra 2026-07-03  908  	cci_write(imx678->cci, IMX678_REG_INTERFACE_SEL, IMX678_INTERFACE_2L_4L,
bf40cc53b1e00c Jai Luthra 2026-07-03  909  		  &ret);
bf40cc53b1e00c Jai Luthra 2026-07-03  910  
bf40cc53b1e00c Jai Luthra 2026-07-03  911  	return ret;
bf40cc53b1e00c Jai Luthra 2026-07-03  912  }
bf40cc53b1e00c Jai Luthra 2026-07-03  913  

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

                 reply	other threads:[~2026-07-15  0:42 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=202607150800.r5xDoCDS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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