Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp252381pxb; Wed, 11 Nov 2020 02:49:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJ74t8jPpNWupGicFHbx0SLxvpkW4h4CivwkCx7eTB/GCGRX3kbaxuwKmqaa9Cjp6VFd6i X-Received: by 2002:a17:906:180b:: with SMTP id v11mr24378607eje.466.1605091741563; Wed, 11 Nov 2020 02:49:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605091741; cv=none; d=google.com; s=arc-20160816; b=vtuMWRVUu+CP34ekCGq6+znpyfm9sVMc4fYecJXV3GHSWosiEbI0YSWIGsbh6lMbKD V+Z+7Kjk26gjOjEph/TXzY1hr3nSxa8Zif0GOtgiPxfqfjcVP48UiTUF5BV1SYoqjq5K YHD1S5Hi6gve8EOrxDy6KNcyNl71KfJ6k2KKXe1L9IoocTmNwXCeErnU7gcVUla4XY0F q2tbRiPBUt2krZ5fG7Nz1WsEMWNlvvwsX4PujvwYBUDDLSGgWTG6ZE8qBUb8oBI8I1+s WtwV+QsIMWRbGoycEyJLrL9YD8LmO6xo7mFKqm8GsjJWUji7g0cu0oIynTT7PWFDeA4h v16A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=98kr8m0iVZ7Tfkd6hnMalFoN6cpyCXlccgeZhGqaEbY=; b=U+C6yBypv1RXE2C3CqSf0aq0W25bruBfUi75cxcbsfhC+UiOLsiY7ulIpMGiDEfXfG YJ1bbOW4i8qaez3h0AOCcmdyixRugpRYOgMgz09lUZqQjptQivEqBarbRKQWjIOreDbB BZVzP4hEd8emCsQl5QlD1yA37DfXLOazqsMJq5ZdSE3iXih4RsxPJsU3gbVkGycl3R26 Nhx6K4FQAw8UL+r8OV3BQaHtKPhYDIkhKTYTrtlTRRmgMQBBrujWGgHm2EI8eW+HzbA6 re8qChumBoMpdQhWIb27RNcV87E+o6l0wigNk5pxL9zNgQEQTOI+mHA7wY3Mb8mPEqxY 3w0w== 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 dh19si1174032edb.148.2020.11.11.02.48.25; Wed, 11 Nov 2020 02:49:01 -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 S1726007AbgKKKry (ORCPT + 99 others); Wed, 11 Nov 2020 05:47:54 -0500 Received: from smtp08.smtpout.orange.fr ([80.12.242.130]:55483 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbgKKKry (ORCPT ); Wed, 11 Nov 2020 05:47:54 -0500 Received: from [192.168.42.210] ([81.185.175.249]) by mwinf5d15 with ME id qyno2300U5PDj3l03ynptn; Wed, 11 Nov 2020 11:47:50 +0100 X-ME-Helo: [192.168.42.210] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 11 Nov 2020 11:47:50 +0100 X-ME-IP: 81.185.175.249 Subject: Re: [PATCH][v2] Bluetooth: hci_qca: resolve various warnings To: Nigel Christian , marcel@holtmann.org Cc: johan.hedberg@gmail.com, kernel-janitors@vger.kernel.org, linux-bluetooth@vger.kernel.org References: <20201111045538.GA90261@fedora-project> From: Christophe JAILLET Message-ID: <187b1016-06cf-9f6c-eeac-4bac8c970d58@wanadoo.fr> Date: Wed, 11 Nov 2020 11:47:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.2 MIME-Version: 1.0 In-Reply-To: <20201111045538.GA90261@fedora-project> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Le 11/11/2020 à 05:55, Nigel Christian a écrit : > 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. > > - https://lkml.org/lkml/2016/8/2/1945 > - Documentation/timers/timers-howto.rst > > Signed-off-by: Nigel Christian > --- > drivers/bluetooth/hci_qca.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index 2d3f1f179a1e..039fb117bd8f 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -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); > @@ -1302,7 +1302,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); This... > else > msleep(300); > > @@ -1350,7 +1350,7 @@ static int qca_send_power_pulse(struct hci_uart *hu, bool on) > if (on) > msleep(100); > else > - msleep(10); > + usleep_range(1000, 10000); and this change change a delay which is expected to be 10 ms, and will likely be ~20 ms, into a delay which can be down to 1 ms. Is it intended or tested? I've not looked at the datasheet, but it looks spurious. Just my 2c. CJ > > return 0; > } >