From: Matthias Kaehlcke <mka@chromium.org>
To: Balakrishna Godavarthi <bgodavar@codeaurora.org>
Cc: marcel@holtmann.org, johan.hedberg@gmail.com,
linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org,
hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org,
rjliao@codeaurora.org
Subject: Re: [PATCH v1] Bluetooth: hci_qca: Enable the ldisc for ROME for x86 platforms.
Date: Thu, 7 Mar 2019 12:42:24 -0800 [thread overview]
Message-ID: <20190307204224.GD138592@google.com> (raw)
In-Reply-To: <20190307101722.25871-1-bgodavar@codeaurora.org>
Hi Balakrishna,
On Thu, Mar 07, 2019 at 03:47:22PM +0530, Balakrishna Godavarthi wrote:
> When using btattach to setup Rome over ldisc we observed a crash
> in qca_setup as it will try to access the serdev which is not
> available in the ldisc proto. This patch will fix the crash by
> support both the ldisc and serdev way in the qca hci_uart driver.
>
> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
Oh, I wasn't aware of the instantiation through ldisc and was actually
considering to *remove* some of the seemingly unnecessary serdev
checks.
> ---
> drivers/bluetooth/hci_qca.c | 47 ++++++++++++++++++++++---------------
> 1 file changed, 28 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 237aea34b69f..0a5c98d46864 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -963,7 +963,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)
> {
> struct hci_uart *hu = hci_get_drvdata(hdev);
> struct qca_data *qca = hu->priv;
> - struct qca_serdev *qcadev;
> + struct qca_serdev *qcadev = NULL;
In many cases the only field that is accessed is qcadev->btsoc_type. I
think something like 'qca_get_soc_type(struct hci_dev *hdev / struct
hci_uart *hu)' would make things more readable.
IMO the whole 'qcadev' vs 'qca(_data)' is confusing anyway, in this
sense even better if we can make most of the 'qcadev' references
disappear.
Thanks
Matthias
next prev parent reply other threads:[~2019-03-07 20:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 10:17 [PATCH v1] Bluetooth: hci_qca: Enable the ldisc for ROME for x86 platforms Balakrishna Godavarthi
2019-03-07 20:42 ` Matthias Kaehlcke [this message]
2019-03-08 5:13 ` Balakrishna Godavarthi
2019-03-08 18:52 ` Matthias Kaehlcke
2019-03-12 9:01 ` rjliao
2019-03-12 15:52 ` Matthias Kaehlcke
2019-03-13 9:43 ` rjliao
2019-03-13 23:56 ` Matthias Kaehlcke
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=20190307204224.GD138592@google.com \
--to=mka@chromium.org \
--cc=bgodavar@codeaurora.org \
--cc=hemantg@codeaurora.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=rjliao@codeaurora.org \
/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;
as well as URLs for NNTP newsgroup(s).