Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp88743pxu; Sun, 22 Nov 2020 00:34:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXS8qrCnTzy7frYRGMBmOkOwyDk880FrSkMPhtDIw3XXwQN8Mb9yAnDWuLnRlS55EH7TlB X-Received: by 2002:a05:6402:1844:: with SMTP id v4mr41334084edy.346.1606034086013; Sun, 22 Nov 2020 00:34:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606034086; cv=none; d=google.com; s=arc-20160816; b=mPgeIrQ14hrHwLoXBkSSe8p2C7TT7qJgrzAlk6Hdrc56VgebzU1XxiC4VRzx1h+TKH GvNFWLSvzsikA3ZEKHywQVQ/rL+fNJzOjpr/klf4S49VR7++tcsocysM0l8EEe8oNFId cNxDDHz/c8HhLINKDHhBRwoZWBDHvDwE3D9hJxLIv9f97l/P/2AhazuM/LZTLwl+tUob HGKy8RGiEUnbVHydipVWKEMLQBOhK/H/4Uey9hXfCNOImdS1dbKBilQIklCbG3kwlPHo jqfrHYHvS5thFLddBuTQ5hZbuMq6mn5wI1/eqar7u8E4pJShgj5fe5eXifYaDvIjnywh Vg4Q== 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; bh=hIbPegROFRZaXkmD/tFhMEpefL2i72WSM0PimfQt04A=; b=K/ya17Ngh0xLwUiwSYWoI3H/f9ezBrxDaVSpuFJFHh0la3SGBwPercPapARxCPyEoa h9am3gLW04dmaIBpR1VOFYyOSFgm3+c5jflUGe4m0Eg7Pt1HnzL3suLpztLm8XKnzwyn ge6VBGRILhDEtQYIyA5MuW3R6Sfh50wbsy3UN+zshYeyNkOOJzTkUoo09QKlu2DeQDOd rRh+RdKHQ2dKgLt7XY04bEdgWdd5TPsVbnL0KCBEv09/9nXFFaUKhpFUL+G0rSzCHPzF qyy7tOCyxqsNDQfHRhHptkZQl3lRElfzOAmqhaBNMYYGg96NRzQs+W5SnMDJKqR14p6S QnlQ== ARC-Authentication-Results: i=1; mx.google.com; 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 u16si1387016edd.519.2020.11.22.00.34.23; Sun, 22 Nov 2020 00:34:45 -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; 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 S1727434AbgKVIaP (ORCPT + 99 others); Sun, 22 Nov 2020 03:30:15 -0500 Received: from mailout07.rmx.de ([94.199.90.95]:35195 "EHLO mailout07.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727286AbgKVIaO (ORCPT ); Sun, 22 Nov 2020 03:30:14 -0500 Received: from kdin02.retarus.com (kdin02.dmz1.retloc [172.19.17.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout07.rmx.de (Postfix) with ESMTPS id 4Cf3PZ3JD3zBwKk; Sun, 22 Nov 2020 09:30:10 +0100 (CET) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin02.retarus.com (Postfix) with ESMTPS id 4Cf3PR5dlNz2TRjV; Sun, 22 Nov 2020 09:30:03 +0100 (CET) Received: from N95HX1G2.wgnetz.xx (192.168.54.14) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.487.0; Sun, 22 Nov 2020 09:28:32 +0100 From: Christian Eggers To: Richard Cochran , Andrew Lunn , Heiner Kallweit , Jakub Kicinski CC: Vladimir Oltean , Russell King , "David S . Miller" , , , Christian Eggers , "Christian Eggers" , Quentin Schulz , "Antoine Tenart" , Antoine Tenart Subject: [PATCH net-next 3/3] net: phy: mscc: use new PTP_MSGTYPE_* defines Date: Sun, 22 Nov 2020 09:26:36 +0100 Message-ID: <20201122082636.12451-4-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201122082636.12451-1-ceggers@arri.de> References: <20201122082636.12451-1-ceggers@arri.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.54.14] X-RMX-ID: 20201122-093003-4Cf3PR5dlNz2TRjV-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use recently introduced PTP_MSGTYPE_SYNC and PTP_MSGTYPE_DELAY_REQ defines instead of a driver internal enumeration. Signed-off-by: Christian Eggers Cc: Quentin Schulz Cc: Antoine Tenart Cc: Antoine Tenart --- drivers/net/phy/mscc/mscc_ptp.c | 14 +++++++------- drivers/net/phy/mscc/mscc_ptp.h | 5 ----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c index d8a61456d1ce..924ed5b034a4 100644 --- a/drivers/net/phy/mscc/mscc_ptp.c +++ b/drivers/net/phy/mscc/mscc_ptp.c @@ -506,9 +506,9 @@ static int vsc85xx_ptp_cmp_init(struct phy_device *phydev, enum ts_blk blk) { struct vsc8531_private *vsc8531 = phydev->priv; bool base = phydev->mdio.addr == vsc8531->ts_base_addr; - enum vsc85xx_ptp_msg_type msgs[] = { - PTP_MSG_TYPE_SYNC, - PTP_MSG_TYPE_DELAY_REQ + u8 msgs[] = { + PTP_MSGTYPE_SYNC, + PTP_MSGTYPE_DELAY_REQ }; u32 val; u8 i; @@ -847,9 +847,9 @@ static int vsc85xx_ts_ptp_action_flow(struct phy_device *phydev, enum ts_blk blk static int vsc85xx_ptp_conf(struct phy_device *phydev, enum ts_blk blk, bool one_step, bool enable) { - enum vsc85xx_ptp_msg_type msgs[] = { - PTP_MSG_TYPE_SYNC, - PTP_MSG_TYPE_DELAY_REQ + u8 msgs[] = { + PTP_MSGTYPE_SYNC, + PTP_MSGTYPE_DELAY_REQ }; u32 val; u8 i; @@ -858,7 +858,7 @@ static int vsc85xx_ptp_conf(struct phy_device *phydev, enum ts_blk blk, if (blk == INGRESS) vsc85xx_ts_ptp_action_flow(phydev, blk, msgs[i], PTP_WRITE_NS); - else if (msgs[i] == PTP_MSG_TYPE_SYNC && one_step) + else if (msgs[i] == PTP_MSGTYPE_SYNC && one_step) /* no need to know Sync t when sending in one_step */ vsc85xx_ts_ptp_action_flow(phydev, blk, msgs[i], PTP_WRITE_1588); diff --git a/drivers/net/phy/mscc/mscc_ptp.h b/drivers/net/phy/mscc/mscc_ptp.h index 3ea163af0f4f..da3465360e90 100644 --- a/drivers/net/phy/mscc/mscc_ptp.h +++ b/drivers/net/phy/mscc/mscc_ptp.h @@ -436,11 +436,6 @@ enum ptp_cmd { PTP_SAVE_IN_TS_FIFO = 11, /* invalid when writing in reg */ }; -enum vsc85xx_ptp_msg_type { - PTP_MSG_TYPE_SYNC, - PTP_MSG_TYPE_DELAY_REQ, -}; - struct vsc85xx_ptphdr { u8 tsmt; /* transportSpecific | messageType */ u8 ver; /* reserved0 | versionPTP */ -- Christian Eggers Embedded software developer