All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [char-misc:char-misc-next 17/28] drivers/misc/ds1682.c:209:12-13: WARNING opportunity for min()
Date: Mon, 15 Apr 2024 04:03:03 +0800	[thread overview]
Message-ID: <202404150312.uABRht3i-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Sean Anderson <sean.anderson@linux.dev>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next
head:   4b9f86214c054ea2da2917f6c107b34f7076c181
commit: 115ee55351c1d3fee16515f01133144205ddb29b [17/28] misc: ds1682: Add NVMEM support
:::::: branch date: 33 hours ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-102-20240415 (https://download.01.org/0day-ci/archive/20240415/202404150312.uABRht3i-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.0

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: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202404150312.uABRht3i-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/misc/ds1682.c:209:12-13: WARNING opportunity for min()
   drivers/misc/ds1682.c:220:12-13: WARNING opportunity for min()

vim +209 drivers/misc/ds1682.c

5162b75b24963e drivers/i2c/chips/ds1682.c Grant Likely  2007-07-12  200  
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  201  static int ds1682_nvmem_read(void *priv, unsigned int offset, void *val,
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  202  			     size_t bytes)
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  203  {
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  204  	struct i2c_client *client = priv;
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  205  	int ret;
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  206  
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  207  	ret = i2c_smbus_read_i2c_block_data(client, DS1682_REG_EEPROM + offset,
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  208  					    bytes, val);
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15 @209  	return ret < 0 ? ret : 0;
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  210  }
115ee55351c1d3 drivers/misc/ds1682.c      Sean Anderson 2024-03-15  211  

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

                 reply	other threads:[~2024-04-14 20:03 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=202404150312.uABRht3i-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --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 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.