Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp52386imm; Tue, 24 Jul 2018 13:51:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfUXuPqpkBAlQD40Kgs0UclmdTPYSvh/IXDZ0+j5OwxIva6ekiqDuyDIJLAe4zA7474TI8O X-Received: by 2002:a65:64d7:: with SMTP id t23-v6mr18068108pgv.207.1532465482959; Tue, 24 Jul 2018 13:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532465482; cv=none; d=google.com; s=arc-20160816; b=SmBlwtFczoFGy4GaxNCGSs1EfP7/xnSXPzIM4X1tnO+BEhza9Mfe2yj7eBa3QikRc0 neAhLxf8lLHhmEcwfGJjo8y6vYAHbfyIQtVdo7Ph//yk7S1aQbBmz8FM6cnuuj3+R/rJ CRrXpca1eWaeyNmFSxV84YWSIaKMk0aBikLnjV8tK7vHphpMFJIYUdFEj0sObQ32rk4J t1MJPBAqVJ5fF7BPnan3avjbMx2+ZfBZnSE97xye4dIk1Cb/LxiJCb2w/CnHMg0mdX5N WUTVIyKNTC/Rvs7yk3y7DhRF0ffx+OmxHTacFB2OyN4GaDEACzvHsUbuo+2H7wrak8e9 fdsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=geto6TEds4J48/qWPw030L/yQw8RmJ9eE0n+jGzwFow=; b=eS0Y9jYMbyc+ih5+FmzgZnccJtmSMIOXj0EGgCUJKMw4EREN8gg3JOVW2gpx2dzbTo Z4TROZknuBiFK4xoTBPvtnGB42Pu349wSF7Rue7uthCRKhOyqfIslT+IAgvOAtz9ILZO ZfLLKJwiWxeza6TTZR4YQVHYAibw9KHnkMnUwp7G6EqeFecpkI5sAAWcbdMgAK2l1isi YqQKmPRT6qnBP74O0dxSp9GhA475sZtw/eEIKXRs2Z56T/io+rV7eiCL9PYbCAG24Y9e 4WiEuqeMeylFA9VT+tR9F3Wt5hHRvJ/HYjGjFlR786kVyVBAyvMRrxZjNjjfZCbUBXkT XzEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ng2TCdrg; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q66-v6si13068409pfd.153.2018.07.24.13.51.07; Tue, 24 Jul 2018 13:51:22 -0700 (PDT) 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=pass header.i=@gmail.com header.s=20161025 header.b=Ng2TCdrg; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388844AbeGXV5u (ORCPT + 99 others); Tue, 24 Jul 2018 17:57:50 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33256 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388690AbeGXV5u (ORCPT ); Tue, 24 Jul 2018 17:57:50 -0400 Received: by mail-wm0-f68.google.com with SMTP id r24-v6so6626580wmh.0 for ; Tue, 24 Jul 2018 13:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=geto6TEds4J48/qWPw030L/yQw8RmJ9eE0n+jGzwFow=; b=Ng2TCdrgfBmnbqNsewAD/Dcjk6aqj8oP+bQAzmGuFfPaHLekj/tPGsme+Afwr/Nh7m 32nzg2n9AZqx4ieLnbpWp2MUHkda9xuMSKe3oO6zTfUzbsP4SZQ2sxu6KQro9fuPnIfJ 3YWk1Xy/rf0lw/Ef0UDnTB4tH94Rlf+KsP1gIUr9f4n0yrUFFI/ewQ+M+55EVvbYKFOn EkJkT+a0ODWdybKfdh1jO3qW4rlCsptUOIuOc2B62IpWIVUZIMdo1Id22kl0uBRr+vf4 abI7xcwe84uHs+UbhKunbwljM2BLZMMn43j/HEgE8tyCj7StgHU+euQrZSEtawWh179L IdPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=geto6TEds4J48/qWPw030L/yQw8RmJ9eE0n+jGzwFow=; b=kdQah6DSMgtJLPG0oQ/B0g1yYMOAggLzTGd3OdI2JIzH6JjkmdfKoKHP0nUWI1Is+V AOmZXCw0SdbfuXRKh8VDhL1MHN42HUcNIjB12dXKJHyyLxnqmZl7eEo+WfH6clm2mS1p 84AwJmKgiX54j3PAibnXIMcCQerAIkDs5VlgAJP48NUgJ4u+HrezLWv5U+IaKuT7zqz7 uvWvdtAFl3Fq/uQfqTxxXVintFYRezBCRHCVCztRSe/rpA1KNGx/ssueFWtHvSsbIBMD 6RXrXtFnwvUUvXsgEdAERbXxPsXPUujcMAjrj9nUmSIcjrVanZduT9D2xDQQcsVtuWO9 D1JQ== X-Gm-Message-State: AOUpUlFvx/OxQba9tcoM0We0aBzJYZC1hyHPlhyM/AZm/giwNbqoSCga mJVHkmVizgCb9KD5fbpk4DDcy0Vi59u7ob97TqI= X-Received: by 2002:a1c:d750:: with SMTP id o77-v6mr2818652wmg.67.1532465373957; Tue, 24 Jul 2018 13:49:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:979e:0:0:0:0:0 with HTTP; Tue, 24 Jul 2018 13:49:33 -0700 (PDT) In-Reply-To: <20180723142956.3718-1-baijiaju1990@gmail.com> References: <20180723142956.3718-1-baijiaju1990@gmail.com> From: Alex Deucher Date: Tue, 24 Jul 2018 16:49:33 -0400 Message-ID: Subject: Re: [PATCH] gpu: drm: amdgpu: Replace mdelay with msleep in cik_pcie_gen3_enable() To: Jia-Ju Bai Cc: "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Dave Airlie , Rex Zhu , "Wentland, Harry" , "Li, Samuel" , Maling list - DRI developers , amd-gfx list , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 23, 2018 at 10:29 AM, Jia-Ju Bai wrote: > cik_pcie_gen3_enable() is only called by cik_common_hw_init(), which is > never called in atomic context. > cik_pcie_gen3_enable() calls mdelay() to busily wait, which is not > necessary. > mdelay() can be replaced with msleep(). > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai Applied. thanks! Alex > --- > drivers/gpu/drm/amd/amdgpu/cik.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c > index 0df22030e713..5b7fab2c2008 100644 > --- a/drivers/gpu/drm/amd/amdgpu/cik.c > +++ b/drivers/gpu/drm/amd/amdgpu/cik.c > @@ -1476,7 +1476,7 @@ static void cik_pcie_gen3_enable(struct amdgpu_device *adev) > tmp |= PCIE_LC_CNTL4__LC_REDO_EQ_MASK; > WREG32_PCIE(ixPCIE_LC_CNTL4, tmp); > > - mdelay(100); > + msleep(100); > > /* linkctl */ > pci_read_config_word(root, bridge_pos + PCI_EXP_LNKCTL, &tmp16); > -- > 2.17.0 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx