Received: by 10.223.176.5 with SMTP id f5csp399202wra; Wed, 7 Feb 2018 00:58:45 -0800 (PST) X-Google-Smtp-Source: AH8x224hr8twlYlfxV33v1TTx36o3t9VdeP2jtE5RbUbUb5OhvmJCf29BibSg0jFvCCaLFgbkv4N X-Received: by 10.98.7.73 with SMTP id b70mr5218312pfd.39.1517993925359; Wed, 07 Feb 2018 00:58:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517993925; cv=none; d=google.com; s=arc-20160816; b=eiEvqcQiQd4fjBLeMXyLtZYk9/jy/Yo2P6jzQfE+SvkaozQ1BUO4Sn6OBjmaFSGMu9 VpryU1x/2Y7zzcDE3iGrznexrdCiBsGXEcU3TCebKIEWD1tN5IVRMx84gTax1jvvTdvt adOS78cnTFbsweVkJgex23Ayspt2JWlkUfTwkUOO1BQsp3VohJLFJN7n3KKARYp1HpOY /JrK6bmk3PSu4DlQHaZzKUBKupMK2KYVmoVgIPKdSpgSQC+cJsVVcNXwO4uiSi4OcAK4 w6LWMnFxRNeFx+gb0oGuWZvCGY8FWMYqoG/ek6YvIJ3QiF9XXgATG5f559AlE0CScFfr UoiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=aCC0KJ1KaP441z9DVqe+178/hQIYf7gfH81iPGHILMI=; b=VQ2Tkjhr+EkIQ6QMNFaht3imr2a6zjl/dCBqfHJpp6CJyKHSk0Q32a7prjsHKPi2kD veK2leqnlyrQFuToxFVbAzo6C3dRQJR55kOubYzCkSzwfrTHRG6tvHGKkDNLoA1LkLg8 kADvzoaxqESqV/AzDMebQoSSRX7o95jYiUlpqgFLFsKNMnW9tWUQ5P05rZMlA0hnM/mT E+lr3jQe6wsSyrieAbhYxY/jqTbSEL2QkjK1+/q6t/l7fsAGNcJ2YQx6p1+rGPWkFZhC PP2lXRQZQfSEvu2hQ3LogTCPtjsdJH1u9iqMt3+4O0VOc4HDIZYe9mYJkZKkv9gjeB9m L5Bw== ARC-Authentication-Results: i=1; mx.google.com; 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 z11-v6si771795plo.356.2018.02.07.00.58.31; Wed, 07 Feb 2018 00:58:45 -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; 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 S1753664AbeBGI40 (ORCPT + 99 others); Wed, 7 Feb 2018 03:56:26 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:48398 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512AbeBGIzu (ORCPT ); Wed, 7 Feb 2018 03:55:50 -0500 Received: from marcel-macpro.fritz.box (p5B3D2E4B.dip0.t-ipconnect.de [91.61.46.75]) by mail.holtmann.org (Postfix) with ESMTPSA id D297FCF2C4; Wed, 7 Feb 2018 10:01:55 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [PATCH] bluetooth: hci_ath: Replace mdelay with msleep in ath_wakeup_ar3k From: Marcel Holtmann In-Reply-To: <1517048258-23798-1-git-send-email-baijiaju1990@gmail.com> Date: Wed, 7 Feb 2018 09:55:48 +0100 Cc: "Gustavo F. Padovan" , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <133171D5-E5F0-486D-869F-8066EB8ECE59@holtmann.org> References: <1517048258-23798-1-git-send-email-baijiaju1990@gmail.com> To: Jia-Ju Bai X-Mailer: Apple Mail (2.3445.5.20) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jia-Ju, > ath_wakeup_ar3k() is never called from atomic context. > > It is only called by ath_hci_uart_work() that is only called in > ath_open() via INIT_WORK(). > All of the above functions do not enter atomic context along the way. > > Despite never getting called from atomic context, ath_wakeup_ar3k() calls > mdelay() for busy wait. > That is not necessary and can be replaced with msleep to avoid busy wait. > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai > --- > drivers/bluetooth/hci_ath.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel