All of 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: drivers/net/wireless/mediatek/mt76/mt7925/nan.c:106:32-33: WARNING opportunity for min()
Date: Fri, 09 Oct 2026 22:26:52 +0200	[thread overview]
Message-ID: <202610092212.rtfizEXs-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Sean Wang <sean.wang@mediatek.com>
CC: Felix Fietkau <nbd@nbd.name>
CC: Stella Liu <yu-ching.liu@mediatek.com>
CC: Jeremy Yu <chengwei.yu@mediatek.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   af32da41b0327b9c6a37856ba82b6760d6c8d10e
commit: a5487a6824068cba6fab02f3e5186940a59275ed wifi: mt76: mt7925: add NAN MCU helpers
date:   2 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 2 months ago
config: sparc-randconfig-r2105-20261009 (https://download.01.org/0day-ci/archive/20261009/202610092212.rtfizEXs-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 16.1.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
| Fixes: a5487a682406 ("wifi: mt76: mt7925: add NAN MCU helpers")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202610092212.rtfizEXs-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/net/wireless/mediatek/mt76/mt7925/nan.c:106:32-33: WARNING opportunity for min()
   drivers/net/wireless/mediatek/mt76/mt7925/nan.c:108:24-25: WARNING opportunity for min()

vim +106 drivers/net/wireless/mediatek/mt76/mt7925/nan.c

a5487a6824068c Sean Wang 2026-06-24  101  
a5487a6824068c Sean Wang 2026-06-24  102  static void mt7925_nan_set_scan_params(struct mt7925_nan_enable_req_tlv *req,
a5487a6824068c Sean Wang 2026-06-24  103  				       struct cfg80211_nan_conf *conf)
a5487a6824068c Sean Wang 2026-06-24  104  {
a5487a6824068c Sean Wang 2026-06-24  105  	req->scan_params_val.scan_period[0] =
a5487a6824068c Sean Wang 2026-06-24 @106  		cpu_to_le16(conf->scan_period < 255 ? conf->scan_period : 255);
a5487a6824068c Sean Wang 2026-06-24  107  	req->scan_params_val.dwell_time[0] =
a5487a6824068c Sean Wang 2026-06-24  108  		conf->scan_dwell_time < 255 ? conf->scan_dwell_time : 255;
a5487a6824068c Sean Wang 2026-06-24  109  }
a5487a6824068c Sean Wang 2026-06-24  110  

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

                 reply	other threads:[~2026-10-09 20:27 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=202610092212.rtfizEXs-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.