Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1060065imm; Fri, 3 Aug 2018 17:26:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd+9Tfwk1EFTSIL5Fn/4gshJt2hhXyIfy1kg5rhZf/Tjioq/07DBs39Y4DyIpyoDkasHZ3s X-Received: by 2002:a63:c902:: with SMTP id o2-v6mr5740762pgg.118.1533342408518; Fri, 03 Aug 2018 17:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533342408; cv=none; d=google.com; s=arc-20160816; b=GeOgukbG7HPLS4Jzet/LzvyPfz7aVjvVAE61nKL11/+1dGdjUX8IkMMZkiBtQdkD0b fZTUSF40FFo8zmdSHgWz4H25VEzyOufzEvuJ3CP9Xm/QvpCraB9uodVsXBg8hgegwoRP 0SuDSfcSXX1J2REBDNU2aV8qobPAv6AaTZpVEh8PxF7eopmkflDa7y1xE973MDuKmg7s 1775pnk9SGKyQ9HH2Zt4k9KoKyQFsdfF+93mY/5/XyGKDG2Uc2iemHXXAszAZ/9rxu8U gD7rU9iwkTTvauFbpnPqwlhGLb+3/74gnkVjtQu6yhX3J9S6QYyEuM5y/Z+kz2xakJic /urQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=FaIFSww3CaE2IozwieUlSDjCvRuY81Q4O0ZHg+Gpz7Q=; b=AEVT8cmfEc0d2cPbcRihj58XBmlV3Fl4R3hehYWgGsMeTV4YL0+mvqBCjoezlnZjwT NctZPGySQ4911Zi9/9K9n5PmsflbvlLpd6ZGFhUGEIW/cUPDzqQO5rAnCHWL6raYcS1T lRCLQy0vG0tVLpsAqoNhLHVQ9dzUjMzYxeNxb5dRhxbOh53/N8QRgZzNd6AgmejS+EtW tE+6HA3/NCWInDZbyCnYJjR/5XoNqe3+tvbNi5EYkKaDzmIiDqq3ilqMTKQ2w49m23Js P+Dj4mB2d4O6warsAbq1PqC1l58LWHaZy1uQs4Ep90fznCGYb5xlsqeSULgj/cu2Nqfk rqDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M8GrEWS+; 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 o1-v6si4829095pld.223.2018.08.03.17.26.33; Fri, 03 Aug 2018 17:26:48 -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=M8GrEWS+; 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 S1732138AbeHDCYS (ORCPT + 99 others); Fri, 3 Aug 2018 22:24:18 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:46933 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731986AbeHDCYS (ORCPT ); Fri, 3 Aug 2018 22:24:18 -0400 Received: by mail-pg1-f194.google.com with SMTP id f14-v6so3038632pgv.13 for ; Fri, 03 Aug 2018 17:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FaIFSww3CaE2IozwieUlSDjCvRuY81Q4O0ZHg+Gpz7Q=; b=M8GrEWS+xPBW/gpD/kHbV4lz4dkwUqRnUkW/clOJdng7cUwWnTtYkCpBsln5R+kgus tBKvFU2/u54OopS6qGVhuG3Umh9u5lgFekF0RberkgURaZCEKDhbRx5J1n3XP8k/iM0u xZnfRGs6DpA+u1RtFMoM0H6BS7uwI1lzekdijqbGInJbsuwVkFE2pqSOsnJwy5/GH71h uYBoxmCX5B5iyThbgT3X7a2/PuXaffO2kpLZH/s28yE3AHh++1TCKcrTbEFY+ScTqKBM qhR30yy77/MPFyi9E8lCuzZ3kVyaTp9bV0AUvUr2vZ29243TwwJBLN04ysyiBB7CGovN RslQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FaIFSww3CaE2IozwieUlSDjCvRuY81Q4O0ZHg+Gpz7Q=; b=mxI9WGQyrRDlNjIok4q3ijaep3vIAi2k6u7Blr/wPbxJX357YlkoiHrUdEzC25pX2u TUwIONL2nNhyPaqM6cnPpZ1i876Dbf2uw3GwlRu37eIvowv5onBj8YX7Lvn13tlogHTm cJa5/ENQKZP2ZsjaXPFjJ0QD4/3t0odnCayiNcOkjqF5h6JzhJnOXTCv54gWCYvuUd5I 7bzneAjhQv4Tne0Ns4gEVhp8OnAGq/EowAasg3dN4BidJ/d2Ajud+ZDI9H8oJjW5hPB6 2Fw6ZjNahzuuG0WVpTchdZCJa+OlAEWF3fqLfLfXZCcni0L4uKk6qMGvnPqodM4HH8Bv giiQ== X-Gm-Message-State: AOUpUlGLSmeHkBFs6eTD84kzIN2iyeNChgjOIp/GQ/JlM0U/kwPxBnC+ 4EmppcMnl7MwPRYx6ApVrZc= X-Received: by 2002:a62:df82:: with SMTP id d2-v6mr6802152pfl.189.1533342344818; Fri, 03 Aug 2018 17:25:44 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:80c0:93b4:a4e2:6d2f]) by smtp.gmail.com with ESMTPSA id p5-v6sm7902319pfn.57.2018.08.03.17.25.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 17:25:44 -0700 (PDT) From: Jia-Ju Bai To: alexander.deucher@amd.com, christian.koenig@amd.com, David1.Zhou@amd.com, airlied@linux.ie Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] gpu: drm: radeon: cik: Replace mdelay() with msleep() in cik_pcie_gen3_enable() Date: Sat, 4 Aug 2018 08:25:35 +0800 Message-Id: <20180804002535.18434-1-baijiaju1990@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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