From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbeDINRM (ORCPT ); Mon, 9 Apr 2018 09:17:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:43221 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982AbeDINRL (ORCPT ); Mon, 9 Apr 2018 09:17:11 -0400 Date: Mon, 09 Apr 2018 15:17:09 +0200 Message-ID: From: Takashi Iwai To: "Jia-Ju Bai" Cc: , , , , Subject: Re: [PATCH 1/2] sound: ad1889: Replace mdelay with usleep_range in snd_ad1889_init In-Reply-To: <1523279000-23973-1-git-send-email-baijiaju1990@gmail.com> References: <1523279000-23973-1-git-send-email-baijiaju1990@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 09 Apr 2018 15:03:20 +0200, Jia-Ju Bai wrote: > > snd_ad1889_init() is never called in atomic context. > > The call chain ending up at snd_ad1889_init() is: > [1] snd_ad1889_init() <- snd_ad1889_create() <- snd_ad1889_probe() > > snd_ad1889_probe() is only set as ".probe" in struct pci_driver. > This function is not called in atomic context. > > Despite never getting called from atomic context, snd_ad1889_init() > calls mdelay for busy wait. > This is not necessary and can be replaced with usleep_range to > avoid busy waiting. > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai Since it's no urgent fix, I'll postpone to 4.18. thanks, Takashi