From: Su Hui <suhui@nfschina.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: marcel@holtmann.org, luiz.dentz@gmail.com, nathan@kernel.org,
ndesaulniers@google.com, morbo@google.com,
justinstitt@google.com, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] Bluetooth: btintel: remove useless code in btintel_set_dsm_reset_method
Date: Mon, 20 May 2024 17:41:49 +0800 [thread overview]
Message-ID: <317ee58d-b435-0d79-cc57-ea28ae0fff3f@nfschina.com> (raw)
In-Reply-To: <28196c54-3c65-4646-84f6-76da79368f8e@molgen.mpg.de>
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;
prev parent reply other threads:[~2024-05-20 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 2:16 Su Hui
2024-05-20 2:16 ` [PATCH 2/2] Bluetooth: btintel: fix use after free problem in btintel_ppag_callback() Su Hui
2024-05-21 0:19 ` K, Kiran
2024-05-20 5:12 ` [PATCH 1/2] Bluetooth: btintel: remove useless code in btintel_set_dsm_reset_method Paul Menzel
2024-05-20 9:41 ` Su Hui [this message]
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=317ee58d-b435-0d79-cc57-ea28ae0fff3f@nfschina.com \
--to=suhui@nfschina.com \
--cc=justinstitt@google.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=pmenzel@molgen.mpg.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®