Message ID | 20240511123510.22303-1-hdegoede@redhat.com |
---|---|
State | Accepted |
Commit | 669e8c8b5663713009ea8c9c0c08bbd21e207267 |
Headers | show |
Series | Bluetooth: Use led_set_brightness() in LED trigger activate() callback | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=852528 ---Test result--- Test Summary: CheckPatch PASS 0.60 seconds GitLint PASS 0.28 seconds SubjectPrefix PASS 0.10 seconds BuildKernel PASS 29.32 seconds CheckAllWarning PASS 32.06 seconds CheckSparse PASS 37.35 seconds CheckSmatch FAIL 36.09 seconds BuildKernel32 PASS 28.59 seconds TestRunnerSetup PASS 515.06 seconds TestRunner_l2cap-tester PASS 20.40 seconds TestRunner_iso-tester PASS 29.05 seconds TestRunner_bnep-tester PASS 4.69 seconds TestRunner_mgmt-tester PASS 108.69 seconds TestRunner_rfcomm-tester PASS 7.23 seconds TestRunner_sco-tester PASS 14.98 seconds TestRunner_ioctl-tester PASS 9.64 seconds TestRunner_mesh-tester FAIL 5.96 seconds TestRunner_smp-tester PASS 6.76 seconds TestRunner_userchan-tester PASS 4.88 seconds IncrementalBuild PASS 27.34 seconds Details ############################## Test: CheckSmatch - FAIL Desc: Run smatch tool with source Output: Segmentation fault (core dumped) make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139 make[4]: *** Deleting file 'net/bluetooth/hci_core.o' make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:485: net] Error 2 make[2]: *** Waiting for unfinished jobs.... Segmentation fault (core dumped) make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139 make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o' make[4]: *** Waiting for unfinished jobs.... Segmentation fault (core dumped) make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bpa10x.o] Error 139 make[4]: *** Deleting file 'drivers/bluetooth/bpa10x.o' make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:485: drivers] Error 2 make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2 make: *** [Makefile:240: __sub-make] Error 2 ############################## Test: TestRunner_mesh-tester - FAIL Desc: Run mesh-tester with test-runner Output: Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0 Failed Test Cases Mesh - Send cancel - 2 Failed 0.097 seconds --- Regards, Linux Bluetooth
diff --git a/net/bluetooth/leds.c b/net/bluetooth/leds.c index f46847632ffa..6e349704efe4 100644 --- a/net/bluetooth/leds.c +++ b/net/bluetooth/leds.c @@ -48,7 +48,7 @@ static int power_activate(struct led_classdev *led_cdev) htrig = to_hci_basic_led_trigger(led_cdev->trigger); powered = test_bit(HCI_UP, &htrig->hdev->flags); - led_trigger_event(led_cdev->trigger, powered ? LED_FULL : LED_OFF); + led_set_brightness(led_cdev, powered ? LED_FULL : LED_OFF); return 0; }
A LED trigger's activate() callback gets called when the LED trigger gets activated for a specific LED, so that the trigger code can ensure the LED state matches the current state of the trigger condition (LED_FULL when HCI_UP is set in this case). led_trigger_event() is intended for trigger condition state changes and iterates over _all_ LEDs which are controlled by this trigger changing the brightness of each of them. In the activate() case only the brightness of the LED which is being activated needs to change and that LED is passed as an argument to activate(), switch to led_set_brightness() to only change the brightness of the LED being activated. Note this is compile tested only. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- net/bluetooth/leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)