Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp446220pxb; Wed, 18 Nov 2020 08:27:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4Re9+3NSFtVbydXBXcuGAKxW5ztISkTrI6av/losPo0wgJRdOJVqPEgxy6NPb27X8Akf7 X-Received: by 2002:a17:906:3087:: with SMTP id 7mr23985873ejv.375.1605716872353; Wed, 18 Nov 2020 08:27:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605716872; cv=none; d=google.com; s=arc-20160816; b=Ag80wVzQoodjeJCFXbxE3vfO2fhvabvVM/ubjOogrfj7OhTI2V9Nm7PDgl6EZ29oln xAlecLCbPKOR3gL3M9ZPi2ZzjurO09T35xNvQrquPO0pkMM8Ogu9sPBZL2OohNlYy0/T LV+96Nb+wxUiCPzD3Rat7+7TLhmf91Jkw4OI9IvAo+8+9Yj2ESTelT4RNjEqFqkZPK0h OeNbv5a0r5Daa/psc+o6ZohXMqYLFwXJ7p9QA/zhCwbZSw5u9mWlEi4gxJcMtRWk6TYk F4fna0Ub+ND5wA/cBZM88vnjYqMw3v3Di2zUeB6vGt2nwkBZj3pDiiZayuT7wy9/JIO3 dNLQ== 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=nDXO18EYKA6Fh+imxrCtSq+47WCHIoQO8N0IxNcvEgo=; b=Xzr/taXoCgPfVSdVmQ/SbqvUBmU+QHI6JnNCh8Lax2yFge1z56AAB8o07boQWVJYxR luSXidYPiXws8J7HTmdJc3ik64z9v6Gtc0L1O+uH72z+fexd5HOmp+DrZDaicRAb/96x cdDtv+i6j+/+sH41e4gta4IF1mC0Oj+3IsLwGEtYm8ydADIXW72gGG9jTu8axseCvNi4 qvnTwc/SGP7D5eVEdZVRUM7ya9sZSyOGbAV3dxez6DNd1T4Cn6LMfPU+dlQ7+qDrCmNQ 95H2FZOeTAPx8gYGFpvIlJRei6Iquvz4gsNUlS0zAv9KlleNgz2BAw3zGJC4DKOj3EuK njjQ== 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 y16si829290ejp.532.2020.11.18.08.27.29; Wed, 18 Nov 2020 08:27:52 -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 S1727845AbgKRQZT (ORCPT + 99 others); Wed, 18 Nov 2020 11:25:19 -0500 Received: from mailout04.rmx.de ([94.199.90.94]:54174 "EHLO mailout04.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbgKRQZS (ORCPT ); Wed, 18 Nov 2020 11:25:18 -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 mailout04.rmx.de (Postfix) with ESMTPS id 4Cbp7Z24b8z3qqhC; Wed, 18 Nov 2020 17:25:14 +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 4Cbp6l3cPHz2TSBr; Wed, 18 Nov 2020 17:24:31 +0100 (CET) Received: from N95HX1G2.wgnetz.xx (192.168.54.25) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 18 Nov 2020 17:23:54 +0100 From: Christian Eggers To: Richard Cochran , Andrew Lunn , Heiner Kallweit , Jakub Kicinski CC: Vladimir Oltean , Russell King , "David S . Miller" , , , Christian Eggers , "Kurt Kanzenbach" Subject: [PATCH net-next v2 3/3] ptp: ptp_ines: use new PTP_MSGTYPE_* define(s) Date: Wed, 18 Nov 2020 17:22:03 +0100 Message-ID: <20201118162203.24293-4-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201118162203.24293-1-ceggers@arri.de> References: <20201118162203.24293-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.25] X-RMX-ID: 20201118-172433-4Cbp6l3cPHz2TSBr-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove driver internal defines for this. Signed-off-by: Christian Eggers Cc: Richard Cochran Cc: Kurt Kanzenbach --- drivers/ptp/ptp_ines.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ptp_ines.c index 4700ffbdfced..6c7c2843ba0b 100644 --- a/drivers/ptp/ptp_ines.c +++ b/drivers/ptp/ptp_ines.c @@ -108,11 +108,6 @@ MODULE_LICENSE("GPL"); #define MESSAGE_TYPE_P_DELAY_RESP 3 #define MESSAGE_TYPE_DELAY_REQ 4 -#define SYNC 0x0 -#define DELAY_REQ 0x1 -#define PDELAY_REQ 0x2 -#define PDELAY_RESP 0x3 - static LIST_HEAD(ines_clocks); static DEFINE_MUTEX(ines_clocks_lock); @@ -683,9 +678,9 @@ static bool is_sync_pdelay_resp(struct sk_buff *skb, int type) msgtype = ptp_get_msgtype(hdr, type); - switch ((msgtype & 0xf)) { - case SYNC: - case PDELAY_RESP: + switch (msgtype) { + case PTP_MSGTYPE_SYNC: + case PTP_MSGTYPE_PDELAY_RESP: return true; default: return false; @@ -696,13 +691,13 @@ static u8 tag_to_msgtype(u8 tag) { switch (tag) { case MESSAGE_TYPE_SYNC: - return SYNC; + return PTP_MSGTYPE_SYNC; case MESSAGE_TYPE_P_DELAY_REQ: - return PDELAY_REQ; + return PTP_MSGTYPE_PDELAY_REQ; case MESSAGE_TYPE_P_DELAY_RESP: - return PDELAY_RESP; + return PTP_MSGTYPE_PDELAY_RESP; case MESSAGE_TYPE_DELAY_REQ: - return DELAY_REQ; + return PTP_MSGTYPE_DELAY_REQ; } return 0xf; } -- Christian Eggers Embedded software developer Arnold & Richter Cine Technik GmbH & Co. Betriebs KG Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918 Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477 Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler