Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1956711pxb; Wed, 10 Feb 2021 23:55:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3eYRSMqtbYcySjV5v204Q16I/vXTXeS6s9tkeIo+PIWXDtMGWIUUSYeri0CgiA1kOcTfW X-Received: by 2002:a17:906:25c4:: with SMTP id n4mr7164185ejb.359.1613030140929; Wed, 10 Feb 2021 23:55:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613030140; cv=none; d=google.com; s=arc-20160816; b=TsLKik0CDmsZ/pzZYU+cv81Yx8vpHpd14Hu8eglqn16TyxoDFnJkYw7PCSo6uFVPWZ nhPn9WkWqQhFeg/8zqtVAFZ1/P/eMxhuMbQzdqKLmt67WBGDxAmFGHaI5FWBsP+eX+Q0 fFkbzuKJzxm+YXyItaSGxKaSvK14X05+idBrCpd9fRfUYwvWp7gIB6sKfL2BpPn7o3+G fVU8+2Tzv5enNkEVDAnikUUOr1fLpJdtdztxVl8wjk1zNCgj8tRx2YxiYp1V682IINrZ y6FKKwL3lmQWEI4ZFRXomf+0zkNDkCaXqev/sq9f8j9G3FdLhU5U7rmHrqfeP3iP57iT c/AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XzA2UDtjMAp2WADNFNBlcruVrbOpREvGVH4+JCnwQGg=; b=sDjnR6nT0LVmnkXbPQvs9pwrF9Mn6Fm0tkO01Ff7AnxJN7lZHhGJjnKjRGFPAzvOF/ YAO59/M7/ANhhe2QyLC0BQAB38IhYdXQ1B3FShbFodSjvOd+xrylzGUj567nHNJPZ0om ocaWMxTQZz3v+Dq3+T+yhd+rk7YirXbUklHCmtlPsQmecjkGz3ZphAa0UoVHjIHiTdtZ lD4O2Cs5ICC/MjZGskEsYKsh/HZgoiQ2GFOVirg9uRToSbbBK1gl/hxcCTCEGCRTyuBr brq3III35qvu2iMfaDQFEG9dyyZMmIqp/bOnoC0jmTpfI0UuwdqKrtSUYNaWZVwmBp1w fTVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="EtO5/sAH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb10si3084226ejc.75.2021.02.10.23.55.17; Wed, 10 Feb 2021 23:55:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="EtO5/sAH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229501AbhBKHwu (ORCPT + 99 others); Thu, 11 Feb 2021 02:52:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbhBKHvr (ORCPT ); Thu, 11 Feb 2021 02:51:47 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E797C06178A; Wed, 10 Feb 2021 23:51:49 -0800 (PST) Received: from mwalle01.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:fa59:71ff:fe9b:b851]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 7112323E79; Thu, 11 Feb 2021 08:47:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1613029677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XzA2UDtjMAp2WADNFNBlcruVrbOpREvGVH4+JCnwQGg=; b=EtO5/sAHdIf1POh03A2fAjspJxyCVsHwnGoQWbKFAEOVpG+IK7xKdFieLdbi974BHKUzdE 4hpUWGes4z7SpAqsr6VyFIub0FxmY5U5EDUaZBfHzFTkgy3O8d7NnWLR25b9I8fLHz2nzH qruG94FtXlsPxyQB1CsgM20cPiB3xU8= From: Michael Walle To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski , Michael Walle Subject: [PATCH net-next v4 1/9] net: phy: icplus: use PHY_ID_MATCH_MODEL() macro Date: Thu, 11 Feb 2021 08:47:42 +0100 Message-Id: <20210211074750.28674-2-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210211074750.28674-1-michael@walle.cc> References: <20210211074750.28674-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simpify the initializations of the structures. There is no functional change. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v3: - none Changes since v2: - none Changes since v1: - none drivers/net/phy/icplus.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index b632947cbcdf..4407b1eb1a3d 100644 --- a/drivers/net/phy/icplus.c +++ b/drivers/net/phy/icplus.c @@ -47,6 +47,10 @@ MODULE_LICENSE("GPL"); #define IP101G_DIGITAL_IO_SPEC_CTRL 0x1d #define IP101G_DIGITAL_IO_SPEC_CTRL_SEL_INTR32 BIT(2) +#define IP175C_PHY_ID 0x02430d80 +#define IP1001_PHY_ID 0x02430d90 +#define IP101A_PHY_ID 0x02430c54 + /* The 32-pin IP101GR package can re-configure the mode of the RXER/INTR_32 pin * (pin number 21). The hardware default is RXER (receive error) mode. But it * can be configured to interrupt mode manually. @@ -329,9 +333,8 @@ static irqreturn_t ip101a_g_handle_interrupt(struct phy_device *phydev) static struct phy_driver icplus_driver[] = { { - .phy_id = 0x02430d80, + PHY_ID_MATCH_MODEL(IP175C_PHY_ID), .name = "ICPlus IP175C", - .phy_id_mask = 0x0ffffff0, /* PHY_BASIC_FEATURES */ .config_init = &ip175c_config_init, .config_aneg = &ip175c_config_aneg, @@ -339,17 +342,15 @@ static struct phy_driver icplus_driver[] = { .suspend = genphy_suspend, .resume = genphy_resume, }, { - .phy_id = 0x02430d90, + PHY_ID_MATCH_MODEL(IP1001_PHY_ID), .name = "ICPlus IP1001", - .phy_id_mask = 0x0ffffff0, /* PHY_GBIT_FEATURES */ .config_init = &ip1001_config_init, .suspend = genphy_suspend, .resume = genphy_resume, }, { - .phy_id = 0x02430c54, + PHY_ID_MATCH_MODEL(IP101A_PHY_ID), .name = "ICPlus IP101A/G", - .phy_id_mask = 0x0ffffff0, /* PHY_BASIC_FEATURES */ .probe = ip101a_g_probe, .config_intr = ip101a_g_config_intr, @@ -362,9 +363,9 @@ static struct phy_driver icplus_driver[] = { module_phy_driver(icplus_driver); static struct mdio_device_id __maybe_unused icplus_tbl[] = { - { 0x02430d80, 0x0ffffff0 }, - { 0x02430d90, 0x0ffffff0 }, - { 0x02430c54, 0x0ffffff0 }, + { PHY_ID_MATCH_MODEL(IP175C_PHY_ID) }, + { PHY_ID_MATCH_MODEL(IP1001_PHY_ID) }, + { PHY_ID_MATCH_MODEL(IP101A_PHY_ID) }, { } }; -- 2.20.1