Received: by 10.223.176.46 with SMTP id f43csp2279468wra; Thu, 25 Jan 2018 07:33:32 -0800 (PST) X-Google-Smtp-Source: AH8x226Q9F98hH4kThTAjQmrhvP7cYyOWWrsc4rEjCc5kdnfij4m5RNqmympinTkurvESRdFGQcV X-Received: by 2002:a17:902:261:: with SMTP id 88-v6mr12151489plc.384.1516894412038; Thu, 25 Jan 2018 07:33:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516894412; cv=none; d=google.com; s=arc-20160816; b=nkb2+TwipPJKhqex6EoLkD/DXkeZbRejwbdUHFf0XYr9SiQbXU5BfGn/IkbaPLwHUY jRYFXL9PkFthBvNWxwl3awyeDUYqEBP5rzNV4E/KnOBOklWGM9p7BTQYn6kGoXOLCWcV HFo3arASMVNCkBhSlJs6QhHeqXriSCDRFUco0ejNuXvSjK59JHPuOKV80xszb1vf7rTA KXCdXklbBfwgUtmi4x+00WlqNYuN6xLJM+kRz2ZDaT6hJlOJc6MhYoyltPvL/+jaAsLR a+QTLA+/Ldx2fiz5fv2ebPiIacNqkrxnMdEKCMuc18WdBW2SizKowvOuOIKvCVb4goaX f+lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=QLqsgg+DB+P/GSS5ZppamUjf58TiMbfxbEwxXFYYARs=; b=TB/l6juxKkRy80jIHEKxi1gabsSjjEv7+083aHMFZEKC9t5hAjHwSgdBzJF6enbKjy P/dD3xItUqvvoqG2FPfdKEKJTXvtomkzvzO88Ieo4Xfq3QXJ7Nx9Or76HccKMTj+LEqt G6g3JWb+dbqe56F5qzTQzUxgvPXub2qsgf4aC97bpstZySu4ncnK/tYee/Vj3Ybt8F3V +i51SFa1Ncp6H9LbOknUMW8cgtAKuwJBMzvrsik7ZeViL8slQiTTsEJFst5vGt7XptLp 3Y/baRQ8ewlhKG4pSe36HPYkKRXMRMnxEp364qKNmyB9av/fT0epKwKeT6Rps6qD1Ac0 Sz3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bpU6TFQ/; 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 e3-v6si2139233plb.354.2018.01.25.07.33.18; Thu, 25 Jan 2018 07:33:32 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bpU6TFQ/; 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 S1751496AbeAYPbC (ORCPT + 99 others); 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 Received: by mail-qt0-f170.google.com with SMTP id c2so20081437qtn.9; Thu, 25 Jan 2018 07:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QLqsgg+DB+P/GSS5ZppamUjf58TiMbfxbEwxXFYYARs=; b=bpU6TFQ/Rfkfijy3KsytJpIF/Mv3J+4YaiV/Acuqu+MLjhWX0yQC/XLbydW8YM3LJl gUEkzBgbVH9hRp+vbahi1TeWZA4sWA3Ok6+B7ZaxB3Jf9jngcNmGCR+iw5L+vaPPn4zx iuvTIoDrNHAI8Npd67sEHNWXP/C2bervOrf0I1Iv4gJlD3OXLalcZwdfifE1UkVgnOVh zw/ss4c14cHb0usquPHeqAM5KZjw15Hwgb2LsXtemqpSCd0mPTbxsJUpdqNN92jnIEtH T6+x98BPAYn4P5kmjDlbAzFlGfMJ0NK0ZTjrxyKB75FHBU6AegkyqeiWS1sXrvshJquX RoOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=QLqsgg+DB+P/GSS5ZppamUjf58TiMbfxbEwxXFYYARs=; b=Pr+O+G0SdpiQQnBau2V5YMX6NtWsv4ORa7DYfOHqcfgAT8G795Yq/2O4bs52u+JZIx dJBNi86hvbhiQs2HPpDpHi1p857rr/EyfNIILGDTtvTJozPshSWJ0dXgol6Lf1o0VFZB Y3P9uYW3ndMCD1n379hGVrYasSMqjolEw9cFGBdtNXDnVSJpFr1MGLeboJNOldAFfYfc ebAhizu0UyIlGPpoFadlPsodYe0b2YlNmPs5iT3Bgcx3UQa7aPm41qUhqmglETGjgzDp tthjwzU1iwCpv6NSLFg33nqTSRqDF81zOQTg05/UhgMYe3ywfNE/xUpZWV8ZvvdiJ3GR 9Lbg== X-Gm-Message-State: AKwxyteh5sAo2tLDc6xpa+f7XTiW+kO5WvtYV29BE5WxFEQY5Dmz9UQm nTrx0QYLnW7+SiPFyhb3m78= X-Received: by 10.237.49.9 with SMTP id 9mr17671956qtg.147.1516894257833; Thu, 25 Jan 2018 07:30:57 -0800 (PST) Received: from localhost (dhcp-ec-8-6b-ed-7a-cf.cpe.echoes.net. [72.28.5.223]) by smtp.gmail.com with ESMTPSA id g58sm3989987qtk.88.2018.01.25.07.30.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 07:30:57 -0800 (PST) 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 Precedence: bulk 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