Message ID | 20240520021625.110430-1-suhui@nfschina.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] Bluetooth: btintel: remove useless code in btintel_set_dsm_reset_method | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
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/btintel.c:1364 error: drivers/bluetooth/btintel.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
Dear Su, Thank you for your patch. Some minor comments. Am 20.05.24 um 04:16 schrieb Su Hui: > Clang static checker(scan-build) warning: Please add a space before (. Noting the version of scan build would also be nice. > drivers/bluetooth/btintel.c:2537:14: > Value stored to 'handle' during its initialization is never read. > > No need to repeatedly assign values to 'handle'. Remove this useless > code to save some space. The plural “values” is misleading to me. Maybe just remove the sentence, and say: Remove this unused assignment. For the summary, “useless code” could also be more specific: Bluetooth: btintel: Remove unused assignement in btintel_set_dsm_reset_method() Maybe also add a Fixes: tag. > Signed-off-by: Su Hui <suhui@nfschina.com> Kind regards, Paul > --- > drivers/bluetooth/btintel.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c > index 0c855c3ee1c1..f1c101dc0c28 100644 > --- a/drivers/bluetooth/btintel.c > +++ b/drivers/bluetooth/btintel.c > @@ -2542,8 +2542,6 @@ static void btintel_set_dsm_reset_method(struct hci_dev *hdev, > RESET_TYPE_VSEC > }; > > - handle = ACPI_HANDLE(GET_HCIDEV_DEV(hdev)); > - > if (!handle) { > bt_dev_dbg(hdev, "No support for bluetooth device in ACPI firmware"); > return;
On 2024/5/20 13:12, Paul Menzel wrote: > Dear Su, > > > Thank you for your patch. Some minor comments. > > > Am 20.05.24 um 04:16 schrieb Su Hui: >> Clang static checker(scan-build) warning: > > Please add a space before (. Noting the version of scan build would > also be nice. Sure, I will add this in v2 patch. By the way, the scan-build's version is llvm-17.0. > >> drivers/bluetooth/btintel.c:2537:14: >> Value stored to 'handle' during its initialization is never read. >> >> No need to repeatedly assign values to 'handle'. Remove this useless >> code to save some space. > > The plural “values” is misleading to me. Maybe just remove the > sentence, and say: > > Remove this unused assignment. > > For the summary, “useless code” could also be more specific: > > Bluetooth: btintel: Remove unused assignement in > btintel_set_dsm_reset_method() Yes, it's better for me. > > Maybe also add a Fixes: tag. It's a cleanup not a bug fixing, so I think Fixes: tag is unnecessary. Thanks for you suggestions! I will send v2 patch after the CI tests done. Su Hui > > >> --- >> drivers/bluetooth/btintel.c | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c >> index 0c855c3ee1c1..f1c101dc0c28 100644 >> --- a/drivers/bluetooth/btintel.c >> +++ b/drivers/bluetooth/btintel.c >> @@ -2542,8 +2542,6 @@ static void btintel_set_dsm_reset_method(struct >> hci_dev *hdev, >> RESET_TYPE_VSEC >> }; >> - handle = ACPI_HANDLE(GET_HCIDEV_DEV(hdev)); >> - >> if (!handle) { >> bt_dev_dbg(hdev, "No support for bluetooth device in ACPI >> firmware"); >> return;
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 0c855c3ee1c1..f1c101dc0c28 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -2542,8 +2542,6 @@ static void btintel_set_dsm_reset_method(struct hci_dev *hdev, RESET_TYPE_VSEC }; - handle = ACPI_HANDLE(GET_HCIDEV_DEV(hdev)); - if (!handle) { bt_dev_dbg(hdev, "No support for bluetooth device in ACPI firmware"); return;
Clang static checker(scan-build) warning: drivers/bluetooth/btintel.c:2537:14: Value stored to 'handle' during its initialization is never read. No need to repeatedly assign values to 'handle'. Remove this useless code to save some space. Signed-off-by: Su Hui <suhui@nfschina.com> --- drivers/bluetooth/btintel.c | 2 -- 1 file changed, 2 deletions(-)