Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4608403imb; Wed, 6 Mar 2019 18:22:49 -0800 (PST) X-Google-Smtp-Source: APXvYqyUqfcr4mAQTdI/+jGwx6g1JK7719bD0AkYtV8O/Az49q0HK+YGmcDbSU1fVU8vjZsh3VJN X-Received: by 2002:a63:8048:: with SMTP id j69mr9129283pgd.432.1551925369249; Wed, 06 Mar 2019 18:22:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551925369; cv=none; d=google.com; s=arc-20160816; b=vS9h5iV1X43mrZlsLZzBx4iAWdH8zQcHeqa2Pc5quOV0hB8G8bm6h2Bqsg2csa+K9i /8QQwMohtcM8XNhy4KEQYuqMAyz0iVOzqbKf8WmFlughneY95chhrmpI0R7tsC9KV+qc 5eV5qqVcBxdjHuGYq8gifw8Z7vl3mtDbHYpo+k3XqHz0PPrrUAUwZ9E6VkkpMsxLmCeq HlqZ6qs2bNc+OOjWT/xN0byZVDi3ZISbmqhrzdTEsZo+CtFbM9gkkC3WSJaLe+obRKsN T1I/CvpTwTLe6qYvaQ24fVXhpcLkTmi/EawtVrIo0Z3/u9qVbGR63vAd0QhMzc2PGIN0 ZnJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=1RSNWgRo8kJqXOQ5K4q4fc638ZFFXIK0QaNYB/CVSgs=; b=AbT8qExflxhgqSoEpz4h0D7nqMEbpsv1ToOQIDAVXreFMQDbTXyFsZ4V1NOgyKvtBo 7a0EX5/WJXT7W3PoEIsiZr2SUBzgGI1GXiOLMoqFKq5ERNWxArWIgvO0eVVRnBlG8k+P Xj0VCfNER5lco7wvGcwXWKU77jZJW0eyMMONribXtO2HsSgepgFynjs3VuXQM3h4vFw+ nzt5zn+fOrySpE55EJIA429W9YB+gCRMliMMPe5n7fgEuU8FgBOe/BFahzY0Rte+Qsg5 PSQKK/HfrcR8KNwkTLsuEtbbYkBCTCWbVKevxUdwVWFzfxy7jro8a7niPhXQGU7NZooG KAaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Mc6VhPMp; dkim=pass header.i=@codeaurora.org header.s=default header.b=kReBPNdy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k86si3104813pfj.145.2019.03.06.18.22.33; Wed, 06 Mar 2019 18:22:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@codeaurora.org header.s=default header.b=Mc6VhPMp; dkim=pass header.i=@codeaurora.org header.s=default header.b=kReBPNdy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727373AbfCGCVf (ORCPT + 99 others); Wed, 6 Mar 2019 21:21:35 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:45392 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbfCGCVf (ORCPT ); Wed, 6 Mar 2019 21:21:35 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2B7D46028D; Thu, 7 Mar 2019 02:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551925294; bh=J4Fu0YHFCf6KtFZ4WP5SYSfwHrB9s7r4l/gARSgE+LA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Mc6VhPMp2N9k1McWZQDHYMYNC8o8THGc7hDU7ltfV1DkbvAwMeflegjCmjNq0TGAi 0rX8vbT+CBDSmJYvvvTx/03ILtk8brwq4iuKYlPsSp7GcRUmPnEhqEUF0L9wU49Yyy 1KzV7yy1OOBcVKrmMoZUtVV0GR49juyWan7brpUQ= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 51C346028D; Thu, 7 Mar 2019 02:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551925293; bh=J4Fu0YHFCf6KtFZ4WP5SYSfwHrB9s7r4l/gARSgE+LA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kReBPNdyts+3MxVZtFBGuVyVywnLdFByBz4S9hUBjVpWB6CfioGOwUJHX0hoiIqi8 Gx8M5kaeBl8qg1jd2gBnReWaxxHvXuMHVufaycYEIYRKz9qSipkrxzehAa1xgR6l9Z DMx3U3Jz70JE8T1/hIRydmBqwPxOfLjT3zxknP0Q= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 07 Mar 2019 07:51:33 +0530 From: Balakrishna Godavarthi To: Matthias Kaehlcke Cc: Marcel Holtmann , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Hemantg Subject: Re: [PATCH 1/2] Bluetooth: hci_qca: Rename STATE_ to QCA_ In-Reply-To: <20190307004041.38059-2-mka@chromium.org> References: <20190307004041.38059-1-mka@chromium.org> <20190307004041.38059-2-mka@chromium.org> Message-ID: <9500f5a6edd2ecb9b376e3ba1a5ac4bd@codeaurora.org> X-Sender: bgodavar@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-03-07 06:10, Matthias Kaehlcke wrote: > Rename STATE_IN_BAND_SLEEP_ENABLED to QCA_IN_BAND_SLEEP_ENABLED. > The constant represents a flag (multiple flags can be set at once), > not a unique state of the controller or driver. Also use the BIT() > macro to specify the position of the flag instead of an integer > literal. > > Signed-off-by: Matthias Kaehlcke > --- > drivers/bluetooth/hci_qca.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index 237aea34b69f1..ab8e59419dbc4 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -54,8 +54,7 @@ > #define HCI_IBS_WAKE_ACK 0xFC > #define HCI_MAX_IBS_SIZE 10 > > -/* Controller states */ > -#define STATE_IN_BAND_SLEEP_ENABLED 1 > +#define QCA_IN_BAND_SLEEP_ENABLED BIT(0) > > #define IBS_WAKE_RETRANS_TIMEOUT_MS 100 > #define IBS_TX_IDLE_TIMEOUT_MS 2000 > @@ -775,7 +774,7 @@ static int qca_enqueue(struct hci_uart *hu, struct > sk_buff *skb) > /* Don't go to sleep in middle of patch download or > * Out-Of-Band(GPIOs control) sleep is selected. > */ > - if (!test_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags)) { > + if (!test_bit(QCA_IN_BAND_SLEEP_ENABLED, &qca->flags)) { > skb_queue_tail(&qca->txq, skb); > spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); > return 0; > @@ -1192,7 +1191,7 @@ static int qca_setup(struct hci_uart *hu) > return ret; > > /* Patch downloading has to be done without IBS mode */ > - clear_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags); > + clear_bit(QCA_IN_BAND_SLEEP_ENABLED, &qca->flags); > > if (qcadev->btsoc_type == QCA_WCN3990) { > bt_dev_info(hdev, "setting up wcn3990"); > @@ -1236,7 +1235,7 @@ static int qca_setup(struct hci_uart *hu) > /* Setup patch / NVM configurations */ > ret = qca_uart_setup(hdev, qca_baudrate, qcadev->btsoc_type, > soc_ver); > if (!ret) { > - set_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags); > + set_bit(QCA_IN_BAND_SLEEP_ENABLED, &qca->flags); > qca_debugfs_init(hdev); > } else if (ret == -ENOENT) { > /* No patch/nvm-config found, run with original fw/config */ > @@ -1294,7 +1293,7 @@ static void qca_power_shutdown(struct hci_uart > *hu) > * data in skb's. > */ > spin_lock_irqsave(&qca->hci_ibs_lock, flags); > - clear_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags); > + clear_bit(QCA_IN_BAND_SLEEP_ENABLED, &qca->flags); > qca_flush(hu); > spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); Reviewed-by: Balakrishna Godavarthi -- Regards Balakrishna.