Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3959046imm; Mon, 6 Aug 2018 13:50:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeyYE44xUsPAMn7jLPg3SfAvR5m865wt5o8nTXAKBK+l6QxVjrpWaxAEmIL05RGWZQ5j/5O X-Received: by 2002:a17:902:b693:: with SMTP id c19-v6mr15394612pls.114.1533588643017; Mon, 06 Aug 2018 13:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533588642; cv=none; d=google.com; s=arc-20160816; b=yyTWCpD8CN5/Tup72s7qas6OGo7WkfAY26ImNmt1HAyPohfhARq9bIoth95I1QmDW7 z+WLs9z1sehfOvqNeNmOG6qPu/PYywSO9+PTyVN1MOlDmFNoIBe/GGtwoQfef1iKY0u2 Iu/nQlu/UVfAo87wT0jg+npMvYTsbNp6cSjnUZn7lhnEV3UpD/uOFhHP6EAG56rDVK4O O06sRFA26+VyBcH1bu+RRBRCE5VY1dfcD4BKtT3XJu5qarmly7q4h4tN7cRES5f/Invi /X2U/xlRq0vB074ScbXmXlwkpoPi0V1TNGGUgEmV4Bmby6B7Itw4tkqkiCMJa2hPUptY u+TQ== 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=iceIl3iBNRVZ7OQHceMwYVzznx+ypAEG5YDUFF1m98w=; b=ct/PsoSYEuQQO7NcsVAlja001MD3aiYKVEsAMMhd1e7RzwcVSRF0TvF44n+GDd1K4G t5zlT9jHJNfjmCv+Lq9sBPmumuaTY/Lfi54wfRhVcRo/slRGzgBhD0IrdquHLF56xWVJ NdSxV8npsfs1HGIHKQuvN2oLcYz6PARl5MeVfNjb83uNVxpHgjT9W5w9B6fbqO2emE4Z 3NenG9IdDDjErelQlbe+Qywwq2jNH6nVlmKbhk8/2ldJc2uhxB6ikKResVEfqs5yLDSz w4eMyxdYRhqmoH7NbeTEM/jl0Y0n0/rRJVbAm4GyoEPx+eOtUbjuvww3Tq6lqbFPrFen 4O/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GfVwMQJz; 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 t19-v6si12316364plj.334.2018.08.06.13.50.28; Mon, 06 Aug 2018 13:50:42 -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=GfVwMQJz; 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 S2387820AbeHFWjK (ORCPT + 99 others); Mon, 6 Aug 2018 18:39:10 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33867 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732548AbeHFWjK (ORCPT ); Mon, 6 Aug 2018 18:39:10 -0400 Received: by mail-wr1-f67.google.com with SMTP id c13-v6so13579068wrt.1 for ; Mon, 06 Aug 2018 13:28:25 -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=iceIl3iBNRVZ7OQHceMwYVzznx+ypAEG5YDUFF1m98w=; b=GfVwMQJzZbqpZUQD9v7IhuUxOs4HXvnOYqZUHf/vDQuQ66zTuBdmVwJd8V2xhgIWHN QeyLL7vlEjyQWGl6XRUVX2rPUkNLAHFh/P7WgdptnV2QMqGNqVdpWTfWlpDQKFeGMGmN PE/XvlsJsC420OTjWJvKJRH1nVDsvrU5dmLrKAIiiubOU63GAPVFVJbqfOJTbUL2k+jd 2TUna6XIt+SlUhVeSlOYs3NjFlTObiOKpbqDvJbAMZDUHS5PMgloyzy91UAreqBxKXN9 0hce/y78/ui1RqYMtbs+E6KBjRWNdHMBuFfzbCK51qqybmi1n5DZLzPPKAVKpqtSg86V bkdg== 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=iceIl3iBNRVZ7OQHceMwYVzznx+ypAEG5YDUFF1m98w=; b=jCkLKM8BF+0EKLzvBG+L8xYCAffgpwFkHwadz7fYO/gdTuY9GS91crfZ4q8LbHoXDq kMAYcBoD/etz1qTNbRU3K7Qs5TkGRPRDbs9C+bHwc+c74jLLcjAzExpHNONl3OwaASI5 9S+pp4HKID8orWd7zDi3em3RVEHBxKZSC7eUXaXPhJF7T1SstYZn44IfGymAlfzCXwWZ 7PbHJe9oJ/VZr0AjTArFTUGiUMwFEEFYP7/YqwGEWN9g9geUGbYL4400rsGmLXd7OVXK /oTOZP3Dm45sk4LPZql9RTR3WWRQSblkMySMWvgT8WsLdYYRD2osl+ZtLKTFGNRSXISq RnTA== X-Gm-Message-State: AOUpUlHfq8wuji4Otn+lmrOZ2XeF9+6Tq7/uCCEVVjJL6x6kg/a0UK3v 7DB/EYYYlRgSxzYYT2yWeFOJDv0BpGPOmCHQo1mCRA== X-Received: by 2002:adf:b583:: with SMTP id c3-v6mr10973426wre.79.1533587304510; Mon, 06 Aug 2018 13:28:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:979e:0:0:0:0:0 with HTTP; Mon, 6 Aug 2018 13:28:23 -0700 (PDT) In-Reply-To: <20180804003344.18775-1-baijiaju1990@gmail.com> References: <20180804003344.18775-1-baijiaju1990@gmail.com> From: Alex Deucher Date: Mon, 6 Aug 2018 16:28:24 -0400 Message-ID: Subject: Re: [PATCH] gpu: drm: radeon: si: Replace mdelay() with msleep() in si_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:33 PM, Jia-Ju Bai wrote: > si_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/si.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c > index 1907c950d76f..c28743443970 100644 > --- a/drivers/gpu/drm/radeon/si.c > +++ b/drivers/gpu/drm/radeon/si.c > @@ -7181,7 +7181,7 @@ static void si_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