linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: btbcm: Use strreplace() in btbcm_get_board_name()
Date: Wed, 15 Jun 2022 23:50:35 +0200	[thread overview]
Message-ID: <CACRpkdbStsAF2Jngohh7Lsg6xs0Vsc-v_SR3WC3ndbZEhx9tEg@mail.gmail.com> (raw)
In-Reply-To: <YqmXmsTX7dD+5HjN@kili>

On Wed, Jun 15, 2022 at 10:26 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:

> The original code works but it's a bit iffy.  The end of loop test
> should be something like "board_type[i] != '\0'" but instead it is
> is "i < board_type[i]".  Fortunately, those two tests are equivalent so
> long as the "board_type" is not an empty string.
>
> It's much simpler to just call strreplace() instead.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

I think I just copied this code from the BRCM wifi driver for the combo
chip, did you patch that too?

Yours,
Linus Walleij

  parent reply	other threads:[~2022-06-15 21:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15  8:26 [PATCH] Bluetooth: btbcm: Use strreplace() in btbcm_get_board_name() Dan Carpenter
2022-06-15  9:11 ` bluez.test.bot
2022-06-15 21:50 ` Linus Walleij [this message]
2022-06-16  7:54   ` [PATCH] " Dan Carpenter

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=CACRpkdbStsAF2Jngohh7Lsg6xs0Vsc-v_SR3WC3ndbZEhx9tEg@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=dan.carpenter@oracle.com \
    --cc=johan.hedberg@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.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).