lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202504160747.njthnAmv-lkp@intel.com>
Date: Wed, 16 Apr 2025 07:32:38 +0800
From: kernel test robot <lkp@...el.com>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>, marcel@...tmann.org,
	luiz.dentz@...il.com, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-bluetooth@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	amitkumar.karwar@....com, neeraj.sanjaykale@....com,
	sherry.sun@....com, manjeet.gupta@....com
Subject: Re: [PATCH v3 2/2] Bluetooth: btnxpuart: Implement host-wakeup
 feature

Hi Neeraj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bluetooth/master]
[also build test WARNING on bluetooth-next/master robh/for-next linus/master v6.15-rc2 next-20250415]
[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/Neeraj-Sanjay-Kale/Bluetooth-btnxpuart-Implement-host-wakeup-feature/20250415-020003
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link:    https://lore.kernel.org/r/20250414175952.403002-2-neeraj.sanjaykale%40nxp.com
patch subject: [PATCH v3 2/2] Bluetooth: btnxpuart: Implement host-wakeup feature
config: arm64-randconfig-004-20250416
compiler: aarch64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build):

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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504160747.njthnAmv-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/bluetooth/btnxpuart.c: In function 'ps_setup':
>> drivers/bluetooth/btnxpuart.c:494:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     int ret = 0;
         ^~~


vim +/ret +494 drivers/bluetooth/btnxpuart.c

   481	
   482	static irqreturn_t ps_host_wakeup_irq_handler(int irq, void *priv)
   483	{
   484		struct btnxpuart_dev *nxpdev = (struct btnxpuart_dev *)priv;
   485	
   486		bt_dev_dbg(nxpdev->hdev, "Host wakeup interrupt");
   487		return IRQ_HANDLED;
   488	}
   489	static int ps_setup(struct hci_dev *hdev)
   490	{
   491		struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
   492		struct serdev_device *serdev = nxpdev->serdev;
   493		struct ps_data *psdata = &nxpdev->psdata;
 > 494		int ret = 0;
   495	
   496		/* Out-Of-Band Device Wakeup */
   497		psdata->h2c_ps_gpio = devm_gpiod_get_optional(&serdev->dev, "device-wakeup",
   498							      GPIOD_OUT_LOW);
   499		if (IS_ERR(psdata->h2c_ps_gpio)) {
   500			bt_dev_err(hdev, "Error fetching device-wakeup-gpios: %ld",
   501				   PTR_ERR(psdata->h2c_ps_gpio));
   502			return PTR_ERR(psdata->h2c_ps_gpio);
   503		}
   504	
   505		if (device_property_read_u8(&serdev->dev, "nxp,wakein-pin", &psdata->h2c_wakeup_gpio)) {
   506			psdata->h2c_wakeup_gpio = 0xff; /* 0xff: use default pin/gpio */
   507		} else if (!psdata->h2c_ps_gpio) {
   508			bt_dev_warn(hdev, "nxp,wakein-pin property without device-wakeup-gpios");
   509			psdata->h2c_wakeup_gpio = 0xff;
   510		}
   511	
   512		/* Out-Of-Band Host Wakeup */
   513		if (of_property_read_bool(serdev->dev.of_node, "wakeup-source")) {
   514			psdata->irq_handler = of_irq_get_byname(serdev->dev.of_node, "wakeup");
   515			bt_dev_info(nxpdev->hdev, "irq_handler: %d", psdata->irq_handler);
   516			if (psdata->irq_handler > 0)
   517				psdata->wakeup_source = true;
   518		}
   519	
   520		if (device_property_read_u8(&serdev->dev, "nxp,wakeout-pin", &psdata->c2h_wakeup_gpio)) {
   521			psdata->c2h_wakeup_gpio = 0xff;
   522			if (psdata->wakeup_source) {
   523				bt_dev_warn(hdev, "host wakeup interrupt without nxp,wakeout-pin");
   524				psdata->wakeup_source = false;
   525			}
   526		} else if (!psdata->wakeup_source) {
   527			bt_dev_warn(hdev, "nxp,wakeout-pin property without host wakeup interrupt");
   528			psdata->c2h_wakeup_gpio = 0xff;
   529		}
   530	
   531		if (psdata->wakeup_source) {
   532			ret = devm_request_irq(&serdev->dev, psdata->irq_handler,
   533						ps_host_wakeup_irq_handler,
   534						IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
   535						dev_name(&serdev->dev), nxpdev);
   536			disable_irq(psdata->irq_handler);
   537			device_init_wakeup(&serdev->dev, true);
   538		}
   539	
   540		psdata->hdev = hdev;
   541		INIT_WORK(&psdata->work, ps_work_func);
   542		mutex_init(&psdata->ps_lock);
   543		timer_setup(&psdata->ps_timer, ps_timeout_func, 0);
   544	
   545		return 0;
   546	}
   547	

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

View attachment "reproduce" of type "text/plain" (742 bytes)

View attachment "config" of type "text/plain" (213257 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ