Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp545784imm; Fri, 27 Jul 2018 01:35:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcMhM7PyUAJ+X9vhTMR2ByMVuDIVpu9VciptUzFzJTsZi94px3Xgsoe051vaQVrjZjDAj/m X-Received: by 2002:a63:67c3:: with SMTP id b186-v6mr5191260pgc.5.1532680544673; Fri, 27 Jul 2018 01:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532680544; cv=none; d=google.com; s=arc-20160816; b=WhKVkdDsVmzd7pwbm7W/Xr3/3plsjTGkHBP+oNVD37bCD0LqUF2I5lbPzoT0FKa+qa CjNbwCchESRb8KNlv6U9EH7+N1oPBpSfS4kOJbG+cu0eMvP9FDa8Wv8zTc+4A6x8V7cN 763q4HsGvJ2raDzBe0Rv2M5f8+8OltsInmFzyI1uVFGLqGwugUntJLO22l7pNN3PXjw2 UCMYvct1vIideElhLXn9sDfGHVgHGgaI2/ewdtJUgG0/UdXp/yKKZQFGNdYULhibtwUP qoyKgyD/FXo6G8IsmysnxCCBUGlB0r04fQT99aT3HRxe/4ZpGGkXQbJlGzzER2Za23gA b4wQ== 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=J889rd12xL5YGoOiZ8WcPmiP0cFPlFEW4HbfhYoZDyo=; b=py9BK1SkLyv168xXwVoNATruuXuHyM+T85cqaV97X/CHfmnQXWDY2Cka1wtfA/uhH3 qcg8MPw5/DBhVC7H/fwBhS6fsfiEwCTt4REuRiNQMhWqprqCdUFDxlN2OomqCe52ZTWr +v0jcmNlzhaMeS+Gae1ryKSsuOGsY3P98Y/BHTvgvIU5g9xGc891L6QAatJSEaVfhb4d yDjTflnIVLa31GSXPwwcxRoCmDqM4c0h6TqldEKL+ihbjJkEHRkGb7BUhUqyqo6/IL87 +g9L8a8lx3/1c0G8g+nSooFjvS+Of0DU479SBnChnJfQRNmzcOcB9zQ/noS8QEe/rCve sjTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jTBGG9ib; 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 q35-v6si3281857pgb.219.2018.07.27.01.35.30; Fri, 27 Jul 2018 01:35:44 -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=jTBGG9ib; 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 S1730244AbeG0JzX (ORCPT + 99 others); Fri, 27 Jul 2018 05:55:23 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:35918 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729420AbeG0JzW (ORCPT ); Fri, 27 Jul 2018 05:55:22 -0400 Received: by mail-pl0-f67.google.com with SMTP id e11-v6so2024040plb.3; Fri, 27 Jul 2018 01:34:34 -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=J889rd12xL5YGoOiZ8WcPmiP0cFPlFEW4HbfhYoZDyo=; b=jTBGG9ibPqZoV5HGZN9JnXsXopjUrW2GDRR5eUbphz4gS0ili7i9paBhwTK00/pvAx idOSUJ7KYzvEB/qYEtcfLFJPqxhdyfd/Cbf9sTUB9i9japWXzPvsyGfGYfguhI61ew6s uJhNq84Asmm9tX1zbVqSs7N9N8ivUoiMDVAvBO4jfXhyi07mHh+/XT2jKDnX6OtbRnbj EttaVaOqCzOyveeNff6PHmS++3JmvLBjJTw1ipEO7Aw04pD4mQnUjNed6GqbmpkRnPjM JM/MdlT1m7FqpQ4UNjNhvINIX3SBeBLipqk146/qecSJ4E7FCeWv1ukj4rv5oFxUyuT/ 3jvg== 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=J889rd12xL5YGoOiZ8WcPmiP0cFPlFEW4HbfhYoZDyo=; b=MKyVIIinNCTRoLhyYoqNtsJOhxGCxB1uDe+aBpp1obekKpS4s2w4+jxSIhnWKMvYr4 83JPHY2egxPEKixxGSE+cd36HipVSl+0oWO8qrVkzhovB5ekgcvKaYNuA+uXhrhmUslH XlzCk0n+NuK0qSntOVO8XW5ts/5eCX9XAwyjDlPBYq97k0+5PzafyWLMWK4WI+31fvFg VXoL6i4N/yD0426Srn7Vtydi9/Lqswm9QBbVPbbPvHJzu/Bd9MdlCEEX369rNCiIvzFs AVmaXYdOM7Hx2dk1EfNqhj3lhxMJZIagGgsF1DFbs8dhAydqqvcdqv1JzjI4QaaDxM/Z fmng== X-Gm-Message-State: AOUpUlHsWfETXGzR4YCL2hSeImvU3WJGulN7Qo4RkyIDFT54DmVdtKZg KOtsppvY80AkWAOBLGbRcWk= X-Received: by 2002:a17:902:7481:: with SMTP id h1-v6mr5276370pll.183.1532680473960; Fri, 27 Jul 2018 01:34:33 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:8ca7:1cde:b1e6:2647]) by smtp.gmail.com with ESMTPSA id j5-v6sm5024034pff.139.2018.07.27.01.34.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 01:34:33 -0700 (PDT) From: Jia-Ju Bai To: andrew@lunn.ch, f.fainelli@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] net: phy: marvell: Replace mdelay() with msleep() in m88e1116r_config_init() Date: Fri, 27 Jul 2018 16:34:25 +0800 Message-Id: <20180727083425.14481-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 m88e1116r_config_init() 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/net/phy/marvell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 25e2a099b71c..ed04346df235 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -646,7 +646,7 @@ static int m88e1116r_config_init(struct phy_device *phydev) if (err < 0) return err; - mdelay(500); + msleep(500); err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); if (err < 0) -- 2.17.0