From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751524AbeAYPbC (ORCPT ); Thu, 25 Jan 2018 10:31:02 -0500 Received: from mail-qt0-f170.google.com ([209.85.216.170]:42878 "EHLO mail-qt0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751368AbeAYPa6 (ORCPT ); Thu, 25 Jan 2018 10:30:58 -0500 X-Google-Smtp-Source: AH8x225EFoKM0vaTmIm3V7YcA7HSpqawXRMRmW3LPcafnbHfTmCa/DmI1cg9uTZvYIO45kOjN1DVUQ== Date: Thu, 25 Jan 2018 07:30:55 -0800 From: Tejun Heo To: Jia-Ju Bai Cc: b.zolnierkie@samsung.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ata: pata_pdc2027x: Replace mdelay with msleep Message-ID: <20180125153055.GE17457@devbig577.frc2.facebook.com> References: <1516877105-13081-1-git-send-email-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516877105-13081-1-git-send-email-baijiaju1990@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 25, 2018 at 06:45:05PM +0800, Jia-Ju Bai wrote: > After checking all possible call chains to pdc_adjust_pll and > pdc_detect_pll_input_clock, > my tool finds that these functions are never called in atomic context, > namely never in an interrupt handler or holding a spinlock. > And their caller functions pdc2027x_init_one and pdc2027x_reinit_one > calls pci_enable_device which can sleep, and no spinlock is held when > calling pdc_adjust_pll and pdc_detect_pll_input_clock, > so it proves that pdc_adjust_pll and pdc_detect_pll_input_clock > can call functions which can sleep. > Thus mdelay can be replaced with msleep to avoid busy wait. > > Signed-off-by: Jia-Ju Bai Applied to libata/for-4.16. Thanks. -- tejun