From: Marcel Holtmann <marcel@holtmann.org>
To: cgel.zte@gmail.com
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>,
"open list:NETWORKING [GENERAL]" <netdev@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Minghao Chi <chi.minghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] net/bluetooth: remove unneeded err variable
Date: Wed, 19 Jan 2022 20:33:58 +0100 [thread overview]
Message-ID: <91565226-5134-45FC-A68F-0E98854227AC@holtmann.org> (raw)
In-Reply-To: <20220118075033.925388-1-chi.minghao@zte.com.cn>
Hi Minghao,
> Return value from mgmt_cmd_complete() directly instead
> of taking this in another redundant variable.
the Bluetooth subsystem uses Bluetooth: as subject prefix.
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
> ---
> net/bluetooth/mgmt.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 37087cf7dc5a..d0804648da32 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -8601,7 +8601,6 @@ static int get_adv_size_info(struct sock *sk, struct hci_dev *hdev,
> struct mgmt_cp_get_adv_size_info *cp = data;
> struct mgmt_rp_get_adv_size_info rp;
> u32 flags, supported_flags;
> - int err;
>
> bt_dev_dbg(hdev, "sock %p", sk);
>
> @@ -8628,10 +8627,8 @@ static int get_adv_size_info(struct sock *sk, struct hci_dev *hdev,
> rp.max_adv_data_len = tlv_data_max_len(hdev, flags, true);
> rp.max_scan_rsp_len = tlv_data_max_len(hdev, flags, false);
>
> - err = mgmt_cmd_complete(sk, hdev->id, MGMT_OP_GET_ADV_SIZE_INFO,
> + return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_GET_ADV_SIZE_INFO,
> MGMT_STATUS_SUCCESS, &rp, sizeof(rp));
> -
> - return err;
> }
You also have a coding style error here in your indentation.
Regards
Marcel
next prev parent reply other threads:[~2022-01-19 19:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 7:50 cgel.zte
2022-01-19 19:33 ` Marcel Holtmann [this message]
2022-02-01 20:36 ` Luiz Augusto von Dentz
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=91565226-5134-45FC-A68F-0E98854227AC@holtmann.org \
--to=marcel@holtmann.org \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=davem@davemloft.net \
--cc=johan.hedberg@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=zealci@zte.com.cn \
/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®