Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2058578rwb; Thu, 27 Jul 2023 01:04:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlF92G60+DXCItianpqRfhxcJHlGDYJDKNaZKsWYO4qU+zHP4ZsyP2lP/DVG2CcrFLxhkQdX X-Received: by 2002:a17:90a:c585:b0:268:1be1:745a with SMTP id l5-20020a17090ac58500b002681be1745amr3296239pjt.29.1690445050866; Thu, 27 Jul 2023 01:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690445050; cv=none; d=google.com; s=arc-20160816; b=mt5D2o32rOUhbrlUdkh+JKr4Yqok7f+x0QfCc08oheA/2KTdhRPHqadaXf3OJGyEgn htAfRklG57q5/txdeQeBe8bdAuRpxK2HFqDZx9eFTeyxiVBmrRFt4SB7ulNvHpiHJw46 0oEcyat1F95wH6ERn5uNsZby0dbtXxGa1jTaXFfX1IvdJq2NgmYQ+sjLVH/F/6IT+B+f nxmh97Tq6bMNhJa5AYm3yPqTEuIBCZhD/v5zwRrkFbhML3B0CuK3EY4Ybk6CQt6q8goC n7fr/Y/BgQ0oyxmi4osWM+5VHIjY1klhv3r0TdOSwOXbwR8jj7SRTnE8Uk++DTxgFMlz 768w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=egw7NTlhnEC3vMEP9ZiuefxwW3vZeCk5+Pd5+XN9Ur4=; fh=3Wm3ykgl2z5kTnXiHK8tAxasShIEGa6UWoyc6lJR73w=; b=aXmMsoP9S1SGzpfrQlxFq7EEuuiCPwhCLKQcrRbaPk6lw9xtBw7wV54ZyN0fPG8kSH /dSCHsHCSro1oU7ajqoZLqCfsvr3z3s2K/IzV9rJQpQCVdwyh2Apx9jf2gkv/p2lngTY 1Sw5Tlrtihpk3mtSBzd7mDdcwhSIi91YWyrjqub3NZehbMrjUmgNCMK1zUEyUv9puNFs nTTGA7uc9Opo/mJCDa+3blpb6FuGxvldSDsfypw2qJPup3qZ4Bv2wtULHMcow8qsqVSm YKC8BLvH9m7K4dE6eVqhblFQtGYR0W/jQl6ykm5a7bYJe3etQfljkaXkMKmlfbddFZAl XgkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MHTKxkLl; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy24-20020a17090b021800b0026384c02c03si1023675pjb.140.2023.07.27.01.03.55; Thu, 27 Jul 2023 01:04:10 -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=@kernel.org header.s=k20201202 header.b=MHTKxkLl; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231460AbjG0Hy6 (ORCPT + 99 others); Thu, 27 Jul 2023 03:54:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbjG0Hyh (ORCPT ); Thu, 27 Jul 2023 03:54:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A5BA5252; Thu, 27 Jul 2023 00:50:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB0F361D93; Thu, 27 Jul 2023 07:50:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46FECC433C8; Thu, 27 Jul 2023 07:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690444222; bh=lWGwY1QhsymOYMK/LuXKj9gYqKYIQIFk/HwFmgDO3HU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MHTKxkLl4FLueg27w9rlU6X20u/MmWpNKiN2jUxJU6n3ksprFcwkrsKnIuGUXHOhE vsNJfq58fPH85c3exh34dqOFYKur2HzW1QJF1xg7a4hquL+OL2j8bEisYNe2azUPLf tu2b9ZCwQF3Zjr+dKgKcetNENV8IOcBEVG7jgaXFDZBqWg2+M31+CWKj+st8bgorCS Q7ucBgDfZpx76xNFgM66BpAIaYiOS77rwU7TGFQXxzskiZkJrGARxOqkvrxdlmw4fQ J4oTZ8+G+ATubDqBsxyy+9OKC+jNWVzQQCongrFjAiRzbkxKDgI1LjSYVG8rwkbeuX W/h/JmcWI9MLA== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qOvlf-00007v-1i; Thu, 27 Jul 2023 09:50:40 +0200 Date: Thu, 27 Jul 2023 09:50:39 +0200 From: Johan Hovold To: Tim Jiang Cc: marcel@holtmann.org, luiz.dentz@gmail.com, johan.hedberg@gmail.com, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org, quic_bgodavar@quicinc.com, quic_hemantg@quicinc.com Subject: Re: [PATCH v13 1/2] Bluetooth: hci_qca: adjust qca btsoc type print expression Message-ID: References: <20230727044011.965205-1-quic_tjiang@quicinc.com> <20230727044011.965205-2-quic_tjiang@quicinc.com> <11643479-3411-381e-4708-7259f6a15668@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11643479-3411-381e-4708-7259f6a15668@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Thu, Jul 27, 2023 at 03:34:53PM +0800, Tim Jiang wrote: > On 7/27/23 15:27, Johan Hovold wrote: > > On Thu, Jul 27, 2023 at 12:40:10PM +0800, Tim Jiang wrote: > >> @@ -1762,10 +1763,32 @@ static int qca_setup(struct hci_uart *hu) > >> */ > >> set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks); > >> > >> - bt_dev_info(hdev, "setting up %s", > >> - qca_is_wcn399x(soc_type) ? "wcn399x" : > >> - (soc_type == QCA_WCN6750) ? "wcn6750" : > >> - (soc_type == QCA_WCN6855) ? "wcn6855" : "ROME/QCA6390"); > >> + switch (soc_type) { > >> + case QCA_AR3002: > >> + soc_name = "ar300x"; > >> + break; > >> + case QCA_ROME: > >> + soc_name = "ROME"; > >> + break; > >> + case QCA_QCA6390: > >> + soc_name = "QCA6390"; > >> + break; > >> + case QCA_WCN3990: > >> + case QCA_WCN3991: > >> + case QCA_WCN3998: > >> + soc_name = "wcn399x"; > >> + break; > >> + case QCA_WCN6750: > >> + soc_name = "wcn6750"; > >> + break; > >> + case QCA_WCN6855: > >> + soc_name = "wcn6855"; > >> + break; > > I still think the above should be sorted (alphabetically) as maintaining > > these lists otherwise soon becomes harder than it should be. And similar > > throughout the driver. > [Tim] Hi Johan: I think we no need to sort it, we only add the new btsoc > name following the older one, for example , ar300x is the oldest , ROME > is new than ar300x, actually qca2066 is newer version chip than qca6390, > so I does not think we need to sort it. Possibly, but generally this becomes hard to maintain and eventually someone will need to sort these entries anyway. Therefore it's generally a good idea to just do so from the start. But it was good that you replied so that we know that this comment was not just missed or ignored. > >> + default: > >> + soc_name = "unknown soc"; > >> + break; > >> + } > >> + bt_dev_info(hdev, "setting up %s", soc_name); Johan