Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp446438pxb; Wed, 18 Nov 2020 08:28:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVp7ZJir9rxfoSzxb81fQnTDM6sTJpnRSSdppOBa2n/oNnJf/20GmSSGqNfnmaYYT8V0y9 X-Received: by 2002:a17:906:489a:: with SMTP id v26mr9548374ejq.422.1605716889044; Wed, 18 Nov 2020 08:28:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605716889; cv=none; d=google.com; s=arc-20160816; b=U4Fov3CQhc754oFducPoyv872TVPTKRYhtLwn6VZmDWlhi7IyQvdBxjAOkqQZ23Sst KOBbcdv8GD8AKNEeI6l4I/o2dqrGQBI13K5QEZQZ6Q+PNw1TdAymZ+VQiWFZE1hca7Ud jZ1w8sFZbmClA7zQ6/2m/mZ80IvDGctbCUVxi7lkmp+UNSVa3Z+yaqfRRAa0Un9EUpYt IJMMicaHroQakKb8lmMbLI42ii/5Uv2+Kk3qHnTYkBJC2P+uPSGiaQmkYc+fGW/4RjFU nqV+yXVBy8h3BKqNDMCp56h5b5dB6Tam7n2VNyDlusDDXF0ysqA9YEowZkapS36wM0Ay quBw== 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=5fQl3FYD3poT9He7JhKuMSUuzARu/eD+FFvBC6Dcrdk=; b=BBbrfTeaRgeZlEgl1HycnYHP6jT+BtXg7USqkhBAynVXfQHOSMjfy4pjOXvEReIfHV 80t1cl7eWY8uAo4KL/QgT8G8xSUaygANsVwcAuaU/T53rUJEJptrdcAEGWFyfoeTwNW1 hwMaRV4CNp8edhkOtYFInbAiHP9rqkBrwwfYsS5uPfipVPoBr9vXv0O1x625gByeU8Th 65eeaWQXiMdl/yUITsTmeayO/sN2QrMH4EtEHWiBWogRkFStZetLvnletGTYCcbfjeu2 4gCeq8cvtQjpVRuOlh3UkQqySCSO/omLPstM9XBdxzA6viEbazRf/MLK4TsrwPR5pH27 bjZA== 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 y2si4017468ejf.663.2020.11.18.08.27.46; Wed, 18 Nov 2020 08:28:09 -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 S1727815AbgKRQYg (ORCPT + 99 others); Wed, 18 Nov 2020 11:24:36 -0500 Received: from mailout09.rmx.de ([94.199.88.74]:32980 "EHLO mailout09.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727795AbgKRQYg (ORCPT ); Wed, 18 Nov 2020 11:24:36 -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 mailout09.rmx.de (Postfix) with ESMTPS id 4Cbp6l3jfKzbhbN; Wed, 18 Nov 2020 17:24:31 +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 4Cbp5m56c7z2TTM3; Wed, 18 Nov 2020 17:23:40 +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:24 +0100 From: Christian Eggers To: Richard Cochran , Andrew Lunn , Heiner Kallweit , Jakub Kicinski CC: Vladimir Oltean , Russell King , "David S . Miller" , , , Christian Eggers , "Ioana Ciornei" , Ioana Radulescu , Yangbo Lu Subject: [PATCH net-next v2 2/3] dpaa2-eth: use new PTP_MSGTYPE_* define(s) Date: Wed, 18 Nov 2020 17:22:02 +0100 Message-ID: <20201118162203.24293-3-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-172348-4Cbp5m56c7z2TTM3-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove usage of magic numbers. Signed-off-by: Christian Eggers Cc: Ioana Ciornei Cc: Ioana Radulescu Cc: Yangbo Lu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index cf9400a9886d..a0a30c721fe7 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -686,7 +686,7 @@ static void dpaa2_eth_enable_tx_tstamp(struct dpaa2_eth_priv *priv, if (skb->cb[0] == TX_TSTAMP_ONESTEP_SYNC) { if (dpaa2_eth_ptp_parse(skb, &msgtype, &twostep, &udp, &offset1, &offset2) || - msgtype != 0 || twostep) { + msgtype != PTP_MSGTYPE_SYNC || twostep) { WARN_ONCE(1, "Bad packet for one-step timestamping\n"); return; } @@ -1212,7 +1212,7 @@ static netdev_tx_t dpaa2_eth_tx(struct sk_buff *skb, struct net_device *net_dev) if (skb->cb[0] == TX_TSTAMP_ONESTEP_SYNC) { if (!dpaa2_eth_ptp_parse(skb, &msgtype, &twostep, &udp, &offset1, &offset2)) - if (msgtype == 0 && twostep == 0) { + if (msgtype == PTP_MSGTYPE_SYNC && twostep == 0) { skb_queue_tail(&priv->tx_skbs, skb); queue_work(priv->dpaa2_ptp_wq, &priv->tx_onestep_tstamp); -- 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