Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3958771imm; Mon, 6 Aug 2018 13:50:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfdfzusrodgBcgAuiNs+cj6VX1J7GeqoAbFH7FZhvKV5BaiHT7gtU4qToNMxaOPowbbKMFW X-Received: by 2002:a63:aa44:: with SMTP id x4-v6mr16063045pgo.120.1533588621305; Mon, 06 Aug 2018 13:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533588621; cv=none; d=google.com; s=arc-20160816; b=XNJpkcjMIFvYzG2eN7wBukTJQ9q2njAaSUwAnxb4uZRpI6tFWDFf3/TMNl/wBzKKwB gzOri4KaXqzboiV83IDDiJi/x7dbIEDUZK1FZUhAjCa1VxjBRzonXTDopv4jD5p0G7Or K+BdoTsNLaYiuKw+0KmwRopuRWAxlpgvVVP3B70beMUGN6ZfWoLkZLL7k1mwIP8tNyOj txvk+5xaYhvjdvwercZrfxTGh32M0tbtnZ5YmYk5cKqa6j95uP4NnhB1BZwMezPO6Cj5 /G1ZcPLpN9fz9HcS3AhOJi8c/AkTBOdI0hKSLYmZZ6KIH9EuDNfvn1YwuPw/DZcvVt58 k2qg== 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=m7OO6IzlGEerBTUkEkIyXsKmilNIrbAQX9DW0iRztZc=; b=BFXGXfpa1vcYmWBGt+gnUMBmwY1Hh23CVK1LqRWiEuf6amNFgCZWcR8rwUpAw8417u /Kw5w2Y2VsEYt/xnWucFZP36+EG6LDjlU0gyVToeXLxQwbMfi+emXWB8UFI0vY3mNG6F A0xoe5z+Eh8qSBztDjtQBWvqhNhyNJQNRwTWLHXTil95Hpk4qDyosMrOJ+ZJ7T/r8+uk fxfwjb+uHxoFh8liiFGHfdnBw42IouAZz8XjkBaYJjTyPkIYho6iFwZ68JJS3mFTFzFL jkiSnAzTNCXpJ3++dWfuwxt80//tMrI0nEiRCKCFXF34pWKvKPrYaD/kQs9FCN2QypAv lxYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kqKLjHCv; 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 v36-v6si14278087pga.336.2018.08.06.13.50.06; Mon, 06 Aug 2018 13:50:21 -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=kqKLjHCv; 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 S2387708AbeHFWhm (ORCPT + 99 others); Mon, 6 Aug 2018 18:37:42 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:37930 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728198AbeHFWhm (ORCPT ); Mon, 6 Aug 2018 18:37:42 -0400 Received: by mail-wm0-f65.google.com with SMTP id t25-v6so15598471wmi.3 for ; Mon, 06 Aug 2018 13:26:57 -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=m7OO6IzlGEerBTUkEkIyXsKmilNIrbAQX9DW0iRztZc=; b=kqKLjHCvDJOrc/Ifo8VT+GzCF1qITMjgqI03ZNz8rqsVhSX6Gss/5sKUaxdeBzGiSm jvYk+7BAStfjyw751H3sGbIygzqcSHrpJCnjmB0FMuNvb7bW5STDKevxkxFQdbBzvxeQ el7FfA3hHNpKMPE0OoDBRnjOvmjRVl5W0o3U16uFeoGNENpj8ESce/8GbCx4iiB34Th3 eAYDGvlbX6m85tvVLVsj7qOi+vCnitSWsv6mbWNfnDTN+xivcl7Fo3L4PXsC/VcPoCyT f3dWz+d2EKrVzwZSSmmXFbc37x9ULar1afQRom6m3ZBrEkyaaiH2aEA5UCh4kHLgy+6Y NjmQ== 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=m7OO6IzlGEerBTUkEkIyXsKmilNIrbAQX9DW0iRztZc=; b=qcmiDAABXmKCL5BQs5XpF8kqCUEQ82OS+034Yp8+F535Ii5GJbsJfDoL475SzlM8bl cry2Ljr1ji5S0RiP8y7ra2Dds9PZU+6MrlQ12wSNiCcYl4p7W4BC03R5cxg81CR+o6zl WCU4GwB/u2SFsjSXYnTuPz1DbGCmDxJQ5630bPSZMpFUntAYvPPZG1l4YJLdKAINjpw1 vh1d804FFlE3ztEmrcg93uo8k97cwXHO0S7D/ZBhbA7FUCLSzLp0E8GltCzNOczqHcTe OB1NzvKp2OXwjlN6xF1n+Zc9ct0SyV3MKfjJB4+ImrgmnkZ2wel/VPslJnRDkxOrCsfz MUwQ== X-Gm-Message-State: AOUpUlE6qHXail92G1JzdnVlYJPMuBxbIBy67AbPXFbJ2w39pFSlGWna TzeyqZsi69yBw7Wv9h2KeKPG6mJJcNGs86Ojvf0= X-Received: by 2002:a1c:6fdd:: with SMTP id c90-v6mr12360965wmi.16.1533587216649; Mon, 06 Aug 2018 13:26:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:979e:0:0:0:0:0 with HTTP; Mon, 6 Aug 2018 13:26:56 -0700 (PDT) In-Reply-To: <20180804002535.18434-1-baijiaju1990@gmail.com> References: <20180804002535.18434-1-baijiaju1990@gmail.com> From: Alex Deucher Date: Mon, 6 Aug 2018 16:26:56 -0400 Message-ID: Subject: Re: [PATCH] gpu: drm: radeon: cik: Replace mdelay() with msleep() in cik_pcie_gen3_enable() To: Jia-Ju Bai Cc: "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Dave Airlie , 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 Fri, Aug 3, 2018 at 8:25 PM, Jia-Ju Bai wrote: > cik_pcie_gen3_enable() is never called in atomic context. > It 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/radeon/cik.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c > index 7c73bc7e2f85..c1b4d4fbcf3a 100644 > --- a/drivers/gpu/drm/radeon/cik.c > +++ b/drivers/gpu/drm/radeon/cik.c > @@ -9598,7 +9598,7 @@ static void cik_pcie_gen3_enable(struct radeon_device *rdev) > tmp |= LC_REDO_EQ; > WREG32_PCIE_PORT(PCIE_LC_CNTL4, tmp); > > - mdelay(100); > + msleep(100); > > /* linkctl */ > pci_read_config_word(root, bridge_pos + PCI_EXP_LNKCTL, &tmp16); > -- > 2.17.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel