Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2048343yba; Thu, 25 Apr 2019 09:47:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnhb93ZM6LwzxdJ1EA9GzzC7Qc0N15FOlKf48vYUIRrEagg3yV596Xxm9I8jH4RD/hduLB X-Received: by 2002:a65:5289:: with SMTP id y9mr12018154pgp.52.1556210848165; Thu, 25 Apr 2019 09:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556210848; cv=none; d=google.com; s=arc-20160816; b=pMUg0Ac+aDX45WbVyZiHvMzzpuy/aCSuZeBsrLGa++Xv3E/s1MwTElzAw5fbGdHexy AGOYA3OH6Ptt3DAVB9VLfLgz6PCz+KadNDwku4K7CbHfaVBsQL3HT/2e8TjVx3dQNucm cUfW/tpTfq9V0/hvNqe+aSgh4iUZP3ldNj+qcuxFuORJt2OqF/5fQVWrBZISTFV1Zxv8 2iVTBTzudBwHz8gC2c/j67C5mfJ6w6LGsqq99fmvezxfZ5gI3vc4qE5eAr6fiwg3eRS5 u3Bwe2vlNyDWzx2CeG5jBSIotEp2KcW+xzgSIuv4xsjOtthegDE2U8ytw9MEbc4dwK2P PQ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=p/IQSSk/LXWTRzdszIj6+hfd6gppMjKJokTDca/mb6g=; b=rAL/f41raMZLQ3pt8QTtADJH3pdQVMU7JWqexk8d9bA3udDeq/zQ6kPbDaAaq/h56r g4TNo6ZqK+kvhmU2DBHvJ86cFE6JkE8k2F/8q8Juvbh7ANtOCPjcsyH53n6fBo7CO8HQ HE4fI/61F00vrVe/nU94z65/q3TZw9Of4+zg3RMqZD9J5oSsoLOwzE/aDUv9zkLVYACV nLda0Txc71OmOa/nCVIXRNoDysal98o0ST/LJ/63L12aCEhedttnjRGVZiPbx8aFWZzR a8D7Y4SE8jKxVfyft/LZm4xKPMBOz12XxjYKaVvi01jvg3ZnGoLaU8RXOKqK9oq2brga M4BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FJqIQTcn; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l185si10197672pgl.48.2019.04.25.09.47.13; Thu, 25 Apr 2019 09:47:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FJqIQTcn; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbfDYQqr (ORCPT + 99 others); Thu, 25 Apr 2019 12:46:47 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:44439 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbfDYQqr (ORCPT ); Thu, 25 Apr 2019 12:46:47 -0400 Received: by mail-pf1-f195.google.com with SMTP id y13so177206pfm.11 for ; Thu, 25 Apr 2019 09:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p/IQSSk/LXWTRzdszIj6+hfd6gppMjKJokTDca/mb6g=; b=FJqIQTcnUv/bBkHre6QVurdXsLIzsGHPiHhQsfrtMnIiTxT30TYHcQlPthaIMuMxzO YUQEP4wuoJCJCJvwTIB+739EKOXA+mo+YttjPV7ugw5XvTRHLN01UXMaDqaI1hp/w85W kjAGW6Ed4poW9L2fWG1bwFvdi01vxVKybb3lI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p/IQSSk/LXWTRzdszIj6+hfd6gppMjKJokTDca/mb6g=; b=jDgpauA420NWbX3BtXoYRCpfdzxT+Un8izmEOyt3hvx0TedzC2wNhu+85Y7r4IIWaG 5CDTv1sHKhjv79TwKwth9zcvtG/W3Nn3+mmSU9g3ae1tdQE9eVfKqsekMqiPuCPMWXdm ZZBvBtoKllOt430VlJRROz47a50e6s7mNG2SrgqFLJ1Z1cRTegAxzO/34id+G+hfx78r DU51rSOzw36vTpOlkauyKsyNnTaI3ahSQUSZMED4kqM4DyOPt8E2hgu1ILoQe1EA1Sww 9SGE0nv07siX8O7ZDM2YZmNKSFlPJ015wBXLFgG21jOuds1e9CGiGDyjZZrJzaiAWYN6 m/0w== X-Gm-Message-State: APjAAAXsl40D4E3HjrnRP0MIVmjQeFM0dIc7AIGxgHYDPp3BltvFxtLI I5IqnTuEMx5hhBlONshfz03x7g== X-Received: by 2002:a63:750c:: with SMTP id q12mr38387096pgc.133.1556210806225; Thu, 25 Apr 2019 09:46:46 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id n5sm24764349pgp.80.2019.04.25.09.46.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 09:46:45 -0700 (PDT) Date: Thu, 25 Apr 2019 09:46:44 -0700 From: Matthias Kaehlcke To: Harish Bandi Cc: Marcel Holtmann , Johan Hedberg , linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org, bgodavar@codeaurora.org, anubhavg@codeaurora.org, devicetree@vger.kernel.org, mark.rutland@arm.com, robh+dt@kernel.org Subject: Re: [PATCH v7 1/2] Bluetooth: hci_qca: Added support for WCN3998 Message-ID: <20190425164644.GG112750@google.com> References: <1556194416-30842-1-git-send-email-c-hbandi@codeaurora.org> <1556194416-30842-2-git-send-email-c-hbandi@codeaurora.org> <08C6CC93-45C7-468E-AFC3-251507FA678E@holtmann.org> <2172b21d6b936c0befca1a608ae297c1@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2172b21d6b936c0befca1a608ae297c1@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Thu, Apr 25, 2019 at 07:10:51PM +0530, Harish Bandi wrote: > Hi Marcel, > > On 2019-04-25 18:17, Marcel Holtmann wrote: > > Hi Harish, > > > > > Added new compatible for WCN3998 and corresponding voltage > > > and current values to WCN3998 compatible. > > > Changed driver code to support WCN3998 > > > > > > Signed-off-by: Harish Bandi > > > Reviewed-by: Matthias Kaehlcke > > > --- > > > Changes in V7: > > > - Initialized rom_ver to 0 to fix compiler warning > > > --- > > > drivers/bluetooth/btqca.c | 12 +++++++++--- > > > drivers/bluetooth/btqca.h | 8 +++++++- > > > drivers/bluetooth/hci_qca.c | 40 > > > ++++++++++++++++++++++++++-------------- > > > 3 files changed, 42 insertions(+), 18 deletions(-) > > > > > > diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c > > > index 6122685..495a52f 100644 > > > --- a/drivers/bluetooth/btqca.c > > > +++ b/drivers/bluetooth/btqca.c > > > @@ -336,7 +336,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t > > > baudrate, > > > { > > > struct rome_config config; > > > int err; > > > - u8 rom_ver; > > > + u8 rom_ver = 0; > > > > what is this change for? > [Harish] - kbuild test robot gave compiler warning. So initialized. > drivers/bluetooth/btqca.c:369:3: warning: 'rom_ver' may be used > uninitialized in this function [-Wmaybe-uninitialized] > > > > > > bt_dev_dbg(hdev, "QCA setup on UART"); > > > > > > @@ -344,7 +344,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t > > > baudrate, > > > > > > /* Download rampatch file */ > > > config.type = TLV_TYPE_PATCH; > > > - if (soc_type == QCA_WCN3990) { > > > + if (qca_is_wcn399x(soc_type)) { > > > /* Firmware files to download are based on ROM version. > > > * ROM version is derived from last two bytes of soc_ver. > > > */ > > > @@ -365,7 +365,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t > > > baudrate, > > > > > > /* Download NVM configuration */ > > > config.type = TLV_TYPE_NVM; > > > - if (soc_type == QCA_WCN3990) > > > + if (qca_is_wcn399x(soc_type)) > > > snprintf(config.fwname, sizeof(config.fwname), > > > "qca/crnv%02x.bin", rom_ver); > > > else > > > @@ -410,6 +410,12 @@ int qca_set_bdaddr(struct hci_dev *hdev, const > > > bdaddr_t *bdaddr) > > > } > > > EXPORT_SYMBOL_GPL(qca_set_bdaddr); > > > > > > +bool qca_is_wcn399x(enum qca_btsoc_type soc_type) > > > +{ > > > + return ((soc_type == QCA_WCN3990) || (soc_type == QCA_WCN3998)); > > > > no () needed around soc_type = check. > > [Harish] - OK, will change it. > > > > > +} > > > +EXPORT_SYMBOL_GPL(qca_is_wcn399x); > > > + > > > > Why is this exported. Make this an inline function in btqca.h. > [Harish] - This was used in btqca.c also to check the soc_type true, but this is still possible with an inline function in btqca.h.