Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7893054ybn; Mon, 30 Sep 2019 23:11:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqypqxhHaOMnvMewvyGjFnrPzroc7bwoOlqx8UywflJr2QLYAKRDry+TLbBBCCq42x73XKhr X-Received: by 2002:a50:b685:: with SMTP id d5mr23716659ede.258.1569910303259; Mon, 30 Sep 2019 23:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569910303; cv=none; d=google.com; s=arc-20160816; b=BwaeuYgWnJFWyauHIxCFzpOhkDKZhPraPMhgR63jYLEJzQoUoM8HHeyyDGtBcjOW0M hQ/DAmW+ar6qansbbGCj4/X0a3gcKAINqYBHRq4WgYPaHVqjk7GADc2Lqn+cd2SaoHe9 zqdAQ/C3iyp+ufE7FiMrmRSjH6U4enP30lfiNbgXbvN0j+XOElNm6CjF8fHHKRd95mqz vemc5jIxljjrbOFHN6miSaDttKGYpuwVR61DAXj49TqrFNRmLqORTInXjyhoz0iOJYvZ 4cD+QbPrAmDwZ/WW3CtbJpLKZPrOZv2QM6QyM44edLCrU9jf+q6NRLkcSUxutArW1wiy aPAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=U1yP6TTZn8usW6xyY+CRmi02j1cnK/Xc1mTk7psX9Wo=; b=FV6iCZyoWpleiwdJBdmMgflQcy7GdDTrsSzm8fKlPRihIwYbU+WgJaDpuqvoBFgeBl avhwP8zsJfHdETH+W2vW74zxiL6S0gpwO1nJUwYCRuXnwjfKkfU9h9kA9hLlHWAbMUQ6 FG+rWPXzF//ln54dMkD+T1/rfI5e+yYpOmSO8vvg9+ZHTwIJP1LlJU6AaVgOWa5YvAET yyBM8AJeGNn5qhOqNnAU5NVTNxviOAdt4Mr0R6Xte3LyJGdnrNOPo7V20du95zMZ/EfU mETIP2GFw0nKF8/aNo2jlETtVyHrANwlgM8mTcTY9HDZK0LUZ8r4TXNNuyAHIlIuyxnH zaww== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rh9si8112881ejb.102.2019.09.30.23.11.18; Mon, 30 Sep 2019 23:11:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732662AbfJAGI0 (ORCPT + 99 others); Tue, 1 Oct 2019 02:08:26 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:60507 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732358AbfJAGIS (ORCPT ); Tue, 1 Oct 2019 02:08:18 -0400 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iFBKY-0005n2-S5; Tue, 01 Oct 2019 08:08:14 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1iFBKW-0006NL-P1; Tue, 01 Oct 2019 08:08:12 +0200 From: Oleksij Rempel To: Andrew Lunn , Florian Fainelli , Heiner Kallweit Cc: Oleksij Rempel , Pengutronix Kernel Team , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] net: phy: at803x: use PHY_ID_MATCH_EXACT for IDs Date: Tue, 1 Oct 2019 08:08:09 +0200 Message-Id: <20191001060811.24291-2-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191001060811.24291-1-o.rempel@pengutronix.de> References: <20191001060811.24291-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use exact match for all IDs. We have no sanity checks, so we can peek a device with no exact ID and different register layout. Suggested-by: Heiner Kallweit Signed-off-by: Oleksij Rempel --- drivers/net/phy/at803x.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index 6ad8b1c63c34..7895dbe600ac 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -364,9 +364,8 @@ static int at803x_aneg_done(struct phy_device *phydev) static struct phy_driver at803x_driver[] = { { /* ATHEROS 8035 */ - .phy_id = ATH8035_PHY_ID, + PHY_ID_MATCH_EXACT(ATH8035_PHY_ID), .name = "Atheros 8035 ethernet", - .phy_id_mask = AT803X_PHY_ID_MASK, .probe = at803x_probe, .config_init = at803x_config_init, .set_wol = at803x_set_wol, @@ -378,9 +377,8 @@ static struct phy_driver at803x_driver[] = { .config_intr = at803x_config_intr, }, { /* ATHEROS 8030 */ - .phy_id = ATH8030_PHY_ID, + PHY_ID_MATCH_EXACT(ATH8030_PHY_ID), .name = "Atheros 8030 ethernet", - .phy_id_mask = AT803X_PHY_ID_MASK, .probe = at803x_probe, .config_init = at803x_config_init, .link_change_notify = at803x_link_change_notify, @@ -393,9 +391,8 @@ static struct phy_driver at803x_driver[] = { .config_intr = at803x_config_intr, }, { /* ATHEROS 8031 */ - .phy_id = ATH8031_PHY_ID, + PHY_ID_MATCH_EXACT(ATH8031_PHY_ID), .name = "Atheros 8031 ethernet", - .phy_id_mask = AT803X_PHY_ID_MASK, .probe = at803x_probe, .config_init = at803x_config_init, .set_wol = at803x_set_wol, @@ -411,9 +408,7 @@ static struct phy_driver at803x_driver[] = { module_phy_driver(at803x_driver); static struct mdio_device_id __maybe_unused atheros_tbl[] = { - { ATH8030_PHY_ID, AT803X_PHY_ID_MASK }, - { ATH8031_PHY_ID, AT803X_PHY_ID_MASK }, - { ATH8035_PHY_ID, AT803X_PHY_ID_MASK }, + { PHY_ID_MATCH_VENDOR(ATH8030_PHY_ID) }, { } }; -- 2.23.0