Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AEFBC05027 for ; Fri, 3 Feb 2023 17:15:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233728AbjBCRPb (ORCPT ); Fri, 3 Feb 2023 12:15:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233724AbjBCRP2 (ORCPT ); Fri, 3 Feb 2023 12:15:28 -0500 Received: from smtp161.vfemail.net (smtp161.vfemail.net [146.59.185.161]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A9F0A8A00 for ; Fri, 3 Feb 2023 09:15:24 -0800 (PST) Received: (qmail 32683 invoked from network); 3 Feb 2023 17:15:23 +0000 Received: from localhost (HELO nl101-3.vfemail.net) () by smtpout.vfemail.net with ESMTPS (ECDHE-RSA-AES256-GCM-SHA384 encrypted); 3 Feb 2023 17:15:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=openmail.cc; h=message-id :date:mime-version:from:subject:to:cc:references:in-reply-to :content-type:content-transfer-encoding; s=2018; bh=ggl3wDMwxRQu E7GebVROC5jrBccyl7QBS7ttNF5Pvpw=; b=gatIzgkuBCJQroRliw1BWu3TZp9O OxjfdQrcQAHe1RnPwFsdeSJnS2Lxd/nOYCSEiRSYhJZXQ75NUBWIuLoBP5Yp8Xc8 VzIuaceWQXZ+fBdmASec8xWtIJdHt6VDh3x6cxqcFGl35JqWxFykyftEXbfkL26G T2qlrphp8381Qq0= Received: (qmail 90973 invoked from network); 3 Feb 2023 17:15:22 -0000 Received: by simscan 1.4.0 ppid: 90589, pid: 90886, t: 1.2471s scanners:none Received: from unknown (HELO bmwxMDEudmZlbWFpbC5uZXQ=) (ZXF1dUBvcGVubWFpbC5jYw==@MTkyLjE2OC4xLjE5Mg==) by nl101.vfemail.net with ESMTPA; 3 Feb 2023 17:15:21 -0000 Message-ID: Date: Sat, 4 Feb 2023 01:15:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 From: equu@openmail.cc Subject: Re: [PATCH v5 3/3] wifi: ath10k: only load compatible DT cal data Content-Language: en-US To: Rob Herring Cc: lpieralisi@kernel.org, toke@toke.dk, kvalo@kernel.org, linux-pci@vger.kernel.org, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, kernel test robot References: <20230203104822.361415-1-equu@openmail.cc> <20230203104822.361415-4-equu@openmail.cc> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > I think this can be done a bit cleaner and like other drivers. I see 2 options. > The first way is use VID/PID compatible strings and don't set the > of_node pointer if there is a mismatch. Where should I do this? In pci_set_of_node() from drivers/pci/of.c? > Upon further thought, why can't you decide all this just on PCI > VID/PID? The giant switch statement in ath10k_pci_probe() could all > just be struct of driver_data from the PCI match table. I cannot decide all this just on PCI VID/PID because PCI VID/PID cannot tell whether calibration data are stored in the device (like most expansion cards) or not (for example, in an NVRAM cell referenced by the device tree).