All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 2/2] Bluetooth: MGMT: Add SCI setting bit(25)
Date: Fri, 15 May 2026 20:08:11 +0200	[thread overview]
Message-ID: <202605152004.a78xmK2S-lkp@intel.com> (raw)
In-Reply-To: <20260506160651.1585012-2-luiz.dentz@gmail.com>

Hi Luiz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on bluetooth/master linus/master v7.1-rc3 next-20260508]
[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/Luiz-Augusto-von-Dentz/Bluetooth-MGMT-Add-SCI-setting-bit-25/20260515-083218
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
patch link:    https://lore.kernel.org/r/20260506160651.1585012-2-luiz.dentz%40gmail.com
patch subject: [PATCH v2 2/2] Bluetooth: MGMT: Add SCI setting bit(25)
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260515/202605152004.a78xmK2S-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260515/202605152004.a78xmK2S-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/202605152004.a78xmK2S-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/bluetooth/hci_sync.c:4942:7: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
    4942 |                 if (!min == 0 || grp->min < min)
         |                     ^    ~~
   net/bluetooth/hci_sync.c:4942:7: note: add parentheses after the '!' to evaluate the comparison first
    4942 |                 if (!min == 0 || grp->min < min)
         |                     ^
         |                      (       )
   net/bluetooth/hci_sync.c:4942:7: note: add parentheses around left hand side expression to silence this warning
    4942 |                 if (!min == 0 || grp->min < min)
         |                     ^
         |                     (   )
   net/bluetooth/hci_sync.c:4945:7: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
    4945 |                 if (!max == 0 || grp->max > max)
         |                     ^    ~~
   net/bluetooth/hci_sync.c:4945:7: note: add parentheses after the '!' to evaluate the comparison first
    4945 |                 if (!max == 0 || grp->max > max)
         |                     ^
         |                      (       )
   net/bluetooth/hci_sync.c:4945:7: note: add parentheses around left hand side expression to silence this warning
    4945 |                 if (!max == 0 || grp->max > max)
         |                     ^
         |                     (   )
   2 warnings generated.


vim +4942 net/bluetooth/hci_sync.c

  4921	
  4922	/* Set Default Connection Rate Parameters if command is supported, SCI feature
  4923	 * bit is marked as supported and at least one of the supported SCI groups
  4924	 * exists.
  4925	 */
  4926	static int hci_le_set_def_rate_sync(struct hci_dev *hdev)
  4927	{
  4928		struct hci_cp_le_set_def_rate cp;
  4929		struct sci_group *grp, *tmp;
  4930		__u16 min = 0, max = 0;
  4931	
  4932		if (!(hdev->commands[48] & BIT(6)) || !le_sci_capable(hdev) ||
  4933		    list_empty(&hdev->sci_groups))
  4934			return 0;
  4935	
  4936		memset(&cp, 0, sizeof(cp));
  4937	
  4938		/* Iterate over the SCI groups and find the widest supported connection
  4939		 * interval range to maximize compatibility with peer devices.
  4940		 */
  4941		list_for_each_entry_safe(grp, tmp, &hdev->sci_groups, list) {
> 4942			if (!min == 0 || grp->min < min)
  4943				min = grp->min;
  4944	
  4945			if (!max == 0 || grp->max > max)
  4946				max = grp->max;
  4947		}
  4948	
  4949		cp.interval_min = cpu_to_le16(min);
  4950		cp.interval_max = cpu_to_le16(max);
  4951	
  4952		/* HOG 1.2 Table 7.4. Modes with recommended parameter values suggests
  4953		 * subrate 1-4 for all modes so use that as default.
  4954		 */
  4955		cp.subrate_min = cpu_to_le16(0x0001);
  4956		cp.subrate_max = cpu_to_le16(0x0004);
  4957	
  4958		/* HIP 1.2 Table 7.5. Modes with recommended parameter values suggests
  4959		 * max latency of 0 for all modes expect low power.
  4960		 */
  4961		cp.max_latency = 0x0000;
  4962	
  4963		/* HIP 1.2 Table 7.5. Modes with recommended parameter values suggests
  4964		 * continuation number 1 for full range.
  4965		 */
  4966		cp.cont_num = cpu_to_le16(0x0001);
  4967	
  4968		/* HOG 1.2 Table 7.4. Modes with recommended parameter values states
  4969		 * that link supervision timeout should be: Greater than or equal to
  4970		 * (1 + Peripheral Latency) x Subrate max x Connection Interval max x 2.
  4971		 */
  4972		cp.supv_timeout = cpu_to_le16((1 + 0) * 0x0004 * max * 2 / 10);
  4973	
  4974		cp.min_ce_len = cpu_to_le16(min);
  4975		cp.max_ce_len = cpu_to_le16(max);
  4976	
  4977		return __hci_cmd_sync_status(hdev, HCI_OP_LE_SET_DEF_RATE,
  4978					     sizeof(cp), &cp, HCI_CMD_TIMEOUT);
  4979	}
  4980	

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

  reply	other threads:[~2026-05-15 18:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 16:06 [PATCH v2 1/2] Bluetooth: HCI: Add initial support for Short Connection Interval feature Luiz Augusto von Dentz
2026-05-06 16:06 ` [PATCH v2 2/2] Bluetooth: MGMT: Add SCI setting bit(25) Luiz Augusto von Dentz
2026-05-15 18:08   ` kernel test robot [this message]
2026-05-06 17:53 ` [v2,1/2] Bluetooth: HCI: Add initial support for Short Connection Interval feature bluez.test.bot

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=202605152004.a78xmK2S-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luiz.dentz@gmail.com \
    --cc=oe-kbuild-all@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.