Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3172878pxb; Mon, 9 Nov 2020 04:46:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwD7weXL2JDDMtX+RtkRtbuOA1ilYo86DoBVNICoHuqTH6YHGUYn4Kq6P1ib1Ceqv5kpjRE X-Received: by 2002:a17:906:85c1:: with SMTP id i1mr15193609ejy.157.1604925971263; Mon, 09 Nov 2020 04:46:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604925971; cv=none; d=google.com; s=arc-20160816; b=v2slihsjf2xGZn1FkXgsXvN7we73oZNLqYTJlZNua++IS825zBGsTsLvhllASaqj+9 jqf1RYOcGyVqw/sstHhIb9mrGXyX9FegKyFtdUMeHnZgfqBXH2g48ENvAyjSszzRUWhb +y7pG721c31OdoJbCkIf7+e3V69uf53Cye2f7Xq77D1MW5X5o4tb5AWEO7GaWvjA5ldC 8+/8vkvzIogtYeyfKzt1Z40RmkHKsnUObUkw0OCz0adWzuq7xal85pzB7XrNFECKjakz 0t3YvpSwVCxVfY9onH8/H/wrjmln3EqQXrn1KbrGQZIl6UoJdNz3PnxZUxKkPR/ZSP/M 2O2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=frxdbqTO63JdVXod/PlwYxb+PPs7fi5YwbzvUcZtrbo=; b=BCLI4Sr3Z83/mSJ1RVtVmtGcyM9Ae+SG/JeNHfewRf5EQkuXZ/0oKiJWeOQEOJ8R1I KoEf7ayFDoiLB7yvjxk6vGmX42LX4OND2gFmZmeFZAKny6yCVBO1VXMxGeuyXs//YEfo +WDZMSBmgt/RFzmu12CK28mhNNfD6ZskSCcbfxGhO+1AiFcdH+76TYWSZblFBt+YK8vi 1XchkOnaFHJ5rbMp/A5pDniPWBNMaJstrnkHieba4DMKToDuWqSaWFwUgqir4Rg+s4zN A3vL18phE4WAvSGsYu1anHXpiM+/u5WBcvj33cvlfyRLz9kxh3MP9IULr4MRl3yLot1F ctyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si8579742edw.241.2020.11.09.04.45.46; Mon, 09 Nov 2020 04:46:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728462AbgKIMph convert rfc822-to-8bit (ORCPT + 99 others); Mon, 9 Nov 2020 07:45:37 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:54909 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbgKIMph (ORCPT ); Mon, 9 Nov 2020 07:45:37 -0500 Received: from marcel-macbook.fritz.box (p4fefcf0f.dip0.t-ipconnect.de [79.239.207.15]) by mail.holtmann.org (Postfix) with ESMTPSA id AD92ACECC5; Mon, 9 Nov 2020 13:52:43 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [PATCH] Bluetooth: hci_qca: resolve various warnings From: Marcel Holtmann In-Reply-To: <20201101025215.GA4828@fedora-project> Date: Mon, 9 Nov 2020 13:45:34 +0100 Cc: Johan Hedberg , kernel-janitors@vger.kernel.org, linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20201101025215.GA4828@fedora-project> To: Nigel Christian X-Mailer: Apple Mail (2.3608.120.23.2.4) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Nigel, > Use template string as opposed to function name. Add a blank > line after declaration to improve readability. Replace symbolic > permissions with octal values. Use usleep_range for small msec > values due to the fact that msleep() less than 20ms may have > unexpected behavior/sleep longer. This patch removes all > checkpatch warnings. > > - https://lkml.org/lkml/2016/8/2/1945 > - Documentation/timers/timers-howto.rst > > Signed-off-by: Nigel Christian > --- > drivers/bluetooth/hci_qca.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index 2d3f1f179a1e..22da59d8f471 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -555,7 +555,7 @@ static int qca_open(struct hci_uart *hu) > struct qca_serdev *qcadev; > struct qca_data *qca; > > - BT_DBG("hu %p qca_open", hu); > + BT_DBG("hu %p %s", hu, __func__); please clean up your patch before submitting it. This change does not belong here. > if (!hci_uart_has_flow_control(hu)) > return -EOPNOTSUPP; > @@ -631,7 +631,7 @@ static void qca_debugfs_init(struct hci_dev *hdev) > ibs_dir = debugfs_create_dir("ibs", hdev->debugfs); > > /* read only */ > - mode = S_IRUGO; > + mode = 0444; > debugfs_create_u8("tx_ibs_state", mode, ibs_dir, &qca->tx_ibs_state); > debugfs_create_u8("rx_ibs_state", mode, ibs_dir, &qca->rx_ibs_state); > debugfs_create_u64("ibs_sent_sleeps", mode, ibs_dir, > @@ -658,7 +658,7 @@ static void qca_debugfs_init(struct hci_dev *hdev) > debugfs_create_u32("vote_off_ms", mode, ibs_dir, &qca->vote_off_ms); > > /* read/write */ > - mode = S_IRUGO | S_IWUSR; > + mode = 0644; > debugfs_create_u32("wake_retrans", mode, ibs_dir, &qca->wake_retrans); > debugfs_create_u32("tx_idle_delay", mode, ibs_dir, > &qca->tx_idle_delay); > @@ -1215,6 +1215,7 @@ static int qca_recv(struct hci_uart *hu, const void *data, int count) > qca_recv_pkts, ARRAY_SIZE(qca_recv_pkts)); > if (IS_ERR(qca->rx_skb)) { > int err = PTR_ERR(qca->rx_skb); > + This omitted empty line was intentional btw. > bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err); > qca->rx_skb = NULL; > return err; > @@ -1302,7 +1303,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate) > > /* Give the controller time to process the request */ > if (qca_is_wcn399x(qca_soc_type(hu))) > - msleep(10); > + usleep_range(1000, 10000); > else > msleep(300); > > @@ -1350,7 +1351,7 @@ static int qca_send_power_pulse(struct hci_uart *hu, bool on) > if (on) > msleep(100); > else > - msleep(10); > + usleep_range(1000, 10000); Regards Marcel