Re: [PATCH] Bluetooth: btbcm: Use strreplace() in btbcm_get_board_name()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 15, 2022 at 10:26 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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@xxxxxxxxxx>

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

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

Yours,
Linus Walleij



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux