* [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
@ 2026-01-13 9:01 Bastien Nocera
2026-01-13 9:25 ` [v2] " bluez.test.bot
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Bastien Nocera @ 2026-01-13 9:01 UTC (permalink / raw)
To: linux-bluetooth
This increases build coverage and allows to drop an #ifdef.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
Changes since v1:
- Fixed build
drivers/bluetooth/btusb.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ded09e94d296..67ee2b869852 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4462,7 +4462,6 @@ static void btusb_disconnect(struct usb_interface *intf)
kfree(data);
}
-#ifdef CONFIG_PM
static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
{
struct btusb_data *data = usb_get_intfdata(intf);
@@ -4616,7 +4615,6 @@ static int btusb_resume(struct usb_interface *intf)
return err;
}
-#endif
#ifdef CONFIG_DEV_COREDUMP
static void btusb_coredump(struct device *dev)
@@ -4633,10 +4631,8 @@ static struct usb_driver btusb_driver = {
.name = "btusb",
.probe = btusb_probe,
.disconnect = btusb_disconnect,
-#ifdef CONFIG_PM
- .suspend = btusb_suspend,
- .resume = btusb_resume,
-#endif
+ .suspend = pm_ptr(btusb_suspend),
+ .resume = pm_ptr(btusb_resume),
.id_table = btusb_table,
.supports_autosuspend = 1,
.disable_hub_initiated_lpm = 1,
--
2.52.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
2026-01-13 9:01 [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM Bastien Nocera
@ 2026-01-13 9:25 ` bluez.test.bot
2026-01-13 9:28 ` [PATCH v2] " Bastien Nocera
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2026-01-13 9:25 UTC (permalink / raw)
To: linux-bluetooth, hadess
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: drivers/bluetooth/btusb.c:4633
error: drivers/bluetooth/btusb.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
2026-01-13 9:01 [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM Bastien Nocera
2026-01-13 9:25 ` [v2] " bluez.test.bot
@ 2026-01-13 9:28 ` Bastien Nocera
2026-01-15 16:29 ` Luiz Augusto von Dentz
2026-01-13 9:35 ` Paul Menzel
2026-01-15 16:30 ` patchwork-bot+bluetooth
3 siblings, 1 reply; 6+ messages in thread
From: Bastien Nocera @ 2026-01-13 9:28 UTC (permalink / raw)
To: linux-bluetooth
On Tue, 2026-01-13 at 10:01 +0100, Bastien Nocera wrote:
> This increases build coverage and allows to drop an #ifdef.
>
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
I see v1 landed. What's the best course of action, revert v1 and apply
v2, or should I send a "Fixes" patch?
> ---
> Changes since v1:
> - Fixed build
>
> drivers/bluetooth/btusb.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index ded09e94d296..67ee2b869852 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -4462,7 +4462,6 @@ static void btusb_disconnect(struct
> usb_interface *intf)
> kfree(data);
> }
>
> -#ifdef CONFIG_PM
> static int btusb_suspend(struct usb_interface *intf, pm_message_t
> message)
> {
> struct btusb_data *data = usb_get_intfdata(intf);
> @@ -4616,7 +4615,6 @@ static int btusb_resume(struct usb_interface
> *intf)
>
> return err;
> }
> -#endif
>
> #ifdef CONFIG_DEV_COREDUMP
> static void btusb_coredump(struct device *dev)
> @@ -4633,10 +4631,8 @@ static struct usb_driver btusb_driver = {
> .name = "btusb",
> .probe = btusb_probe,
> .disconnect = btusb_disconnect,
> -#ifdef CONFIG_PM
> - .suspend = btusb_suspend,
> - .resume = btusb_resume,
> -#endif
> + .suspend = pm_ptr(btusb_suspend),
> + .resume = pm_ptr(btusb_resume),
> .id_table = btusb_table,
> .supports_autosuspend = 1,
> .disable_hub_initiated_lpm = 1,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
2026-01-13 9:01 [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM Bastien Nocera
2026-01-13 9:25 ` [v2] " bluez.test.bot
2026-01-13 9:28 ` [PATCH v2] " Bastien Nocera
@ 2026-01-13 9:35 ` Paul Menzel
2026-01-15 16:30 ` patchwork-bot+bluetooth
3 siblings, 0 replies; 6+ messages in thread
From: Paul Menzel @ 2026-01-13 9:35 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-bluetooth
Dear Bastien,
Thank you for your patch.
Am 13.01.26 um 10:01 schrieb Bastien Nocera:
> This increases build coverage and allows to drop an #ifdef.
>
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
> ---
> Changes since v1:
> - Fixed build
>
> drivers/bluetooth/btusb.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index ded09e94d296..67ee2b869852 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -4462,7 +4462,6 @@ static void btusb_disconnect(struct usb_interface *intf)
> kfree(data);
> }
>
> -#ifdef CONFIG_PM
> static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
> {
> struct btusb_data *data = usb_get_intfdata(intf);
> @@ -4616,7 +4615,6 @@ static int btusb_resume(struct usb_interface *intf)
>
> return err;
> }
> -#endif
>
> #ifdef CONFIG_DEV_COREDUMP
> static void btusb_coredump(struct device *dev)
> @@ -4633,10 +4631,8 @@ static struct usb_driver btusb_driver = {
> .name = "btusb",
> .probe = btusb_probe,
> .disconnect = btusb_disconnect,
> -#ifdef CONFIG_PM
> - .suspend = btusb_suspend,
> - .resume = btusb_resume,
> -#endif
> + .suspend = pm_ptr(btusb_suspend),
> + .resume = pm_ptr(btusb_resume),
> .id_table = btusb_table,
> .supports_autosuspend = 1,
> .disable_hub_initiated_lpm = 1,
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
2026-01-13 9:28 ` [PATCH v2] " Bastien Nocera
@ 2026-01-15 16:29 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2026-01-15 16:29 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-bluetooth
Hi Bastien,
On Tue, Jan 13, 2026 at 4:31 AM Bastien Nocera <hadess@hadess.net> wrote:
>
> On Tue, 2026-01-13 at 10:01 +0100, Bastien Nocera wrote:
> > This increases build coverage and allows to drop an #ifdef.
> >
> > Signed-off-by: Bastien Nocera <hadess@hadess.net>
>
> I see v1 landed. What's the best course of action, revert v1 and apply
> v2, or should I send a "Fixes" patch?
>
> > ---
> > Changes since v1:
> > - Fixed build
> >
> > drivers/bluetooth/btusb.c | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> > index ded09e94d296..67ee2b869852 100644
> > --- a/drivers/bluetooth/btusb.c
> > +++ b/drivers/bluetooth/btusb.c
> > @@ -4462,7 +4462,6 @@ static void btusb_disconnect(struct
> > usb_interface *intf)
> > kfree(data);
> > }
> >
> > -#ifdef CONFIG_PM
> > static int btusb_suspend(struct usb_interface *intf, pm_message_t
> > message)
> > {
> > struct btusb_data *data = usb_get_intfdata(intf);
> > @@ -4616,7 +4615,6 @@ static int btusb_resume(struct usb_interface
> > *intf)
> >
> > return err;
> > }
> > -#endif
> >
> > #ifdef CONFIG_DEV_COREDUMP
> > static void btusb_coredump(struct device *dev)
> > @@ -4633,10 +4631,8 @@ static struct usb_driver btusb_driver = {
> > .name = "btusb",
> > .probe = btusb_probe,
> > .disconnect = btusb_disconnect,
> > -#ifdef CONFIG_PM
> > - .suspend = btusb_suspend,
> > - .resume = btusb_resume,
> > -#endif
> > + .suspend = pm_ptr(btusb_suspend),
> > + .resume = pm_ptr(btusb_resume),
> > .id_table = btusb_table,
> > .supports_autosuspend = 1,
> > .disable_hub_initiated_lpm = 1,
Ive amended the v1 with these changes and pushed.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
2026-01-13 9:01 [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM Bastien Nocera
` (2 preceding siblings ...)
2026-01-13 9:35 ` Paul Menzel
@ 2026-01-15 16:30 ` patchwork-bot+bluetooth
3 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+bluetooth @ 2026-01-15 16:30 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 13 Jan 2026 10:01:12 +0100 you wrote:
> This increases build coverage and allows to drop an #ifdef.
>
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
> ---
> Changes since v1:
> - Fixed build
>
> [...]
Here is the summary with links:
- [v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
https://git.kernel.org/bluetooth/bluetooth-next/c/2d7b5a53007d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-15 16:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 9:01 [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM Bastien Nocera
2026-01-13 9:25 ` [v2] " bluez.test.bot
2026-01-13 9:28 ` [PATCH v2] " Bastien Nocera
2026-01-15 16:29 ` Luiz Augusto von Dentz
2026-01-13 9:35 ` Paul Menzel
2026-01-15 16:30 ` patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox