Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp890947iog; Wed, 15 Jun 2022 14:57:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sApIaDFwRVhCIoaxsqy9UfSrka8S/iF1LuDLpC5FRicmZe9H1sWl+isHuhZihKA+2xXsqS X-Received: by 2002:a05:6a00:114c:b0:518:c064:d47 with SMTP id b12-20020a056a00114c00b00518c0640d47mr1432343pfm.27.1655330242695; Wed, 15 Jun 2022 14:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655330242; cv=none; d=google.com; s=arc-20160816; b=I2LulsLdyRfeOlOwiPJSzZfbqj/T9c4qak4kID83/aZsn3dL7h/oTDzrwyv3ELJyvK K1R5BcvLBIGrJPBZB4W3FFdQqi0Z/0pRnDI5+7N+9vug2RsPtpWURBLN8HsooLRNz5dR OsIXOtC+D3y2om3RrlwaokAP0mHDpQm70rgMtlBNq/hBE2rZxoQyN2uoPTlf+2ckYwX4 D8rTXc+u7NjnG2JF+ougk8Kb8qX6778Q2uOSXazgZsBWMEfI1JDi6/3jP1cGXP41rute WO2qxZc0ucRaZe+0/UXl6W+LXBxzZzDxj5FjnF9GqXEA96SBqDu7UM9yh8OIxuE1hrZA pd4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4Ni2+Z4+FaOrYaNl57ZOrcI8cGb5LUVcfY4BS8e4nlo=; b=vnHv47E9mpWdAeb8LmpEPfvYPDrblQIsfZyH5z2QoAV2nlYXtwSVi0piKHm1++jVqv VXS/VqLHqTc2sKMgX/pGhvdHeWnAgUOG5BNa8gwEvOqb84CZzVhuamnDaKm6gwb1K2lK TN2YLSPz3QGlHJ7NBe/0FFRtlZN6+74k0fsslf5QSY4+5eIELfDznvHUkY++Y2Hska+y Pri+Sm4ng0npVp7O9TEc2vYUH9UEIicfAZRQECiovc4yBEr5kgAOvyKctkMUwaLVK64x TO2ibpFFYV6fyQF9r3RpR5NYKRjCfKpQTLCflg5+EMHqNrSvEjKanfYaknW63vYgWZ+Q /7DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mp0HpJP8; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c4-20020a170902724400b00168c610b3dbsi44190pll.589.2022.06.15.14.56.53; Wed, 15 Jun 2022 14:57:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mp0HpJP8; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241014AbiFOVut (ORCPT + 99 others); Wed, 15 Jun 2022 17:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239060AbiFOVut (ORCPT ); Wed, 15 Jun 2022 17:50:49 -0400 Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE2CA35ABE for ; Wed, 15 Jun 2022 14:50:47 -0700 (PDT) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-30c2f288f13so74541537b3.7 for ; Wed, 15 Jun 2022 14:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4Ni2+Z4+FaOrYaNl57ZOrcI8cGb5LUVcfY4BS8e4nlo=; b=mp0HpJP8UE2fb0XRQO3zKlah6eEzCXVh044OB/QP6MB05Fpq09DUqH6TUogHVp9cKy IbM7+vCQemOiCaPMWWc+wUB2foSdxCLhimA33Lamy537FVIvAVfRS8SDyb/5wtaHu+Jo RJLY2j/dsY+oU4Okqv0FyiECbKeWNDopstSLEUNGZ6q6s4CzmpB5v9yyIWsO++IV2spb CuPnF2wamKmHT4qBiuh5bUSQWDJzJvwwxwR3tvZ+VKXlqRmZGZLbax27a1j6nNoq6wNN VyL4UHSP8kV2vqyo/QcaBGj22IxNK6ZbTC7a/QxCA8JT6sxuytktLjrX55166xTMsVc4 FW+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Ni2+Z4+FaOrYaNl57ZOrcI8cGb5LUVcfY4BS8e4nlo=; b=UwJzBC7xNtGLqdlRfUv4JZ0bsn01O9aMn1/40Oyuk+VjPc0E9zVQDb3/Pw+TRxENd0 SYQV+BGxMAvDjF/9eU3Vw13I1HNiymlXo3xL9cjwz2uSnK0HrnZQNole6S8UwBjJXKj1 mVzZfZZrMX2kAavfwIlxSb9nQHRZoZFpGidYYtdufCudfBbMMxSxUko9pwe70bgejJXS 7rX3M4RfN8Fd2PaRsSfyBLe3VafgPnDH+2NZOgOZ71zhFFCmv8tqZLeVX+zRTBDC04BE tgoiUdyPFg9HkP8fBm5lwmo/5n47oQJu6H6Ut0TYz5bjQBj49etm5dCvkwSK98MXekQg j02w== X-Gm-Message-State: AJIora+VK6Xt6fzNtFd9vLESumiaMQXIAqCvKRBNmWrKWAMYgKY7WgBu kI/bkuHUGzXH5yEvdBk9A5o7wSxkUKsdl7YA0OQIig== X-Received: by 2002:a81:830f:0:b0:313:3918:5cf with SMTP id t15-20020a81830f000000b00313391805cfmr2079347ywf.126.1655329847132; Wed, 15 Jun 2022 14:50:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Walleij Date: Wed, 15 Jun 2022 23:50:35 +0200 Message-ID: Subject: Re: [PATCH] Bluetooth: btbcm: Use strreplace() in btbcm_get_board_name() To: Dan Carpenter Cc: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Wed, Jun 15, 2022 at 10:26 AM Dan Carpenter 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 Reviewed-by: Linus Walleij I think I just copied this code from the BRCM wifi driver for the combo chip, did you patch that too? Yours, Linus Walleij