Received: by 10.223.176.46 with SMTP id f43csp2278439wra; Thu, 25 Jan 2018 07:32:42 -0800 (PST) X-Google-Smtp-Source: AH8x2267mr/x9QyHtNTD6JDRV+leqcdWI9/wPQoYoOlTco3l5JVU3SspGBLymk5krEDYXmevCXPc X-Received: by 10.98.79.12 with SMTP id d12mr16604520pfb.186.1516894362280; Thu, 25 Jan 2018 07:32:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516894362; cv=none; d=google.com; s=arc-20160816; b=Md9JMH+dNoFqhgE3QwS/cx7NyWJ0WOnxJSPYL8+Yq3Bg7YHx1m+swMHwuLFCcSxoDi O044QFCd/J1t//vccKdxsBO9vqtOfkX3aDuJNj903e8derUTGkDNzhrGNshnY+2MfR/B ro/UUYHyrIJfMHO4pWXhdtxXplsz2LGzO/YR+2rKwdi9Wv99Dwj5r1pvya5fNOMR/mxL LNL6rh3y6PfcOMkE0XIORgGfOggh/WHm1vFBQdYvAJOzkf2vsBaI5+Kaqu2P7WXjCW1F Ukg2Kq5AVhlK5ULyJIEyknjTuZIhmYZCY2gricAjQgAXsMZbIDpCZMcbZS3Au8IXNj4k wUmw== 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=eCjrYX1vk4izq2EY7Os6klfcx1TBuThcFKuBEnQ5oR4=; b=sn+UlThot+6r6iq/kaJAwKOCY826tMsNobiSba0mhqJ1075VDLdxLFGmG440ZwZ0hd iDQTu4mbp8rtQFtoX/pYECLtfB5IeP/j1iROycZcaJ7V2ZXgA70FSh2IJu3obTOrw0pm pbp+Zsk3QlGdfHLOjN4JbqLDQjC/5f3ViQdCVpegovP9ZoIpEEfC78afqRPCBo766Y3u um8uKm9GnDbQS1tWZVLnSvBNlVUiTy/eVIhlq4HbNZG6tYQg3TqfCRLqIZ7g+HmARe+w 4oEC4rjSJ7s/C3qYu/ACTBSFUKiL5ZhmgPzqgwxmsXOT0RGGj3Uxo6Kqxc5ELb0toPnL gzpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=iVuLIrFD; 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 f90-v6si2110437plb.684.2018.01.25.07.32.28; Thu, 25 Jan 2018 07:32:42 -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=iVuLIrFD; 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 S1751531AbeAYPbW (ORCPT + 99 others); Thu, 25 Jan 2018 10:31:22 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:36915 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751112AbeAYPbT (ORCPT ); Thu, 25 Jan 2018 10:31:19 -0500 Received: by mail-qt0-f193.google.com with SMTP id d54so20147730qtd.4; Thu, 25 Jan 2018 07:31:18 -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=eCjrYX1vk4izq2EY7Os6klfcx1TBuThcFKuBEnQ5oR4=; b=iVuLIrFDTc/zmiA44Zvo/mezN/fMJ3JP+meYuiEHjwDVt8gZCQiyykw6RWw+0/Ewht YgSEBkMsElv6VOjqNEzlnAgNg6aYYmNGSn6ucljm+Cug4z2sSaxNeAvI3C+N8yVhedVe xwhLk5QfPOCd/y23iROwM2Vf0kwmTsGT2V96u9XekFyND5NwCzPcAdY+NbTJy9YF3cqf DAwcN6aOOJtMhupnzfHuJL9349Bt/LSJkBRjnp6Jnv1DL0wzO+F5YAnbB+lnacSWbJRX ri53DEk+foNxHLdglLywa4XtujBZio/YLLROy5G7Zu3oXsB9nvmZrqoSY6RAIZdObMQ3 WmzQ== 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=eCjrYX1vk4izq2EY7Os6klfcx1TBuThcFKuBEnQ5oR4=; b=rxefXiOtoSgCOWyTw65TdD6YfOk3HhUNqPTsiiAfytG7GcYpu8iKT3suLABTLmQLCz oOtAHjsHqKGP4aTxtoufCITmSOWNJnNG/gkAdJwOqRHDrAt8u2rccyCiRjCxAjVQilm3 8AjA/ClQRIwW2GI/CXLC/VCLm4lPxTMdok4dy7vJmqz1LgooAGiogkL6bD0gMjqzIrlo FjB5XTeQ8uQv7ug6ib2DhX4MBsB/FRF1AkoyPW8Kq9gDgqvQXS6hgkrRxVPlwuzBkuiB Fp4bbFyFx5hmZSAbWgq/xpniblbSf/2rg0bhnNuIsm5YEfHPzB05f0E4Usv54nUbGqZ1 t05w== X-Gm-Message-State: AKwxytclWT8zXVh7Dw7Ncvi595EY9ssGYchiGoS65NS48sZJz0c0F/kJ WxIgVnEsQIwFKqmunrGv4sg= X-Received: by 10.200.39.71 with SMTP id h7mr17313445qth.198.1516894278288; Thu, 25 Jan 2018 07:31:18 -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 a35sm4138970qtb.29.2018.01.25.07.31.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 07:31:17 -0800 (PST) Date: Thu, 25 Jan 2018 07:31:15 -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_it821x: Replace mdelay with usleep_range in it821x_firmware_command Message-ID: <20180125153115.GF17457@devbig577.frc2.facebook.com> References: <1516876379-12834-1-git-send-email-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516876379-12834-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:32:59PM +0800, Jia-Ju Bai wrote: > After checking all possible call chains to it821x_firmware_command here, > my tool finds that it821x_firmware_command > is never called in atomic context, > namely never in an interrupt handler or holding a spinlock. > And it821x_firmware_command calls kmalloc(GFP_KERNEL), > so it proves again that it821x_firmware_command > can call functions which can sleep. > Thus mdelay can be replaced with usleep_range to avoid busy wait. > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai Applied to libata/for-4.16. Thanks. -- tejun