Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp88855pxu; Sun, 22 Nov 2020 00:35:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwejVQL8XB0c/QXR53sqPzKWp8ijOY7YR4CydXe2RyZA8TMgjwAkF4ACydyxiKM9dwrvwo4 X-Received: by 2002:a17:906:1c55:: with SMTP id l21mr7002477ejg.547.1606034108853; Sun, 22 Nov 2020 00:35:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606034108; cv=none; d=google.com; s=arc-20160816; b=0CJjEVsMMvVhyeQOChrrb8g+PsFrf9wKIxU2Bb6uBeb/rhTMgSkYoxL3FLSn0oEuVL ++E7uYAZ1LetIgO0o+1nnXD/JJYowmSpOif24Hfx8AJkb+8q4OgQwzDdIyZu//5nfNA8 ctewwifRaciyouGw/FmZrMNcJ6VNh/XhRAn6qvni4/cY6A9nEKllySwxKkhXMmVN3TK/ PKXhAW/Lcip7Tyi8yzvz1hI3whooNNC1/DHAGEWkuvnlxpGJ+Ta8zDB3VYVX3fMY+JZt arb+lL67utKBg8tMVctLgeN8eMFQjDMaZngPyVlv9L5icGYhUL/dS9zJdWNlvWKs3AZm 8jfg== 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=Z4oCvioVQqRkX5nxtN2vBxHv+m0v8bzIxUeRo3J9ouQ=; b=yEIAtQpdtDosRn1p2TNk3uguq0+H5daxrtP3chm37YKgH+pf9nBvDdawq3XsaI0i7t Q0DGsfkiz0KaYBhOUSbX7qNAiMOHpAcIl5cbWVka7+Rpj/6SNm8632vONACASaXpx7Ts Ye0sRH4RB5UCd92je5Plhx3JeQGZb1TCKTbd3s29gKmEOp1xPAfsbRBbHOM+zYLbOkNl kXP0eQb3FeRRLPS3pM4YFkwddLNoQNVl3c675ytQg4fH67EzXo4HiTA22hCSiOL3kCXJ PqveZaUIQIrlGCtkC5xQ86jZlQC/WEjBoap0jhgNwX0mE4sUPFm9LUZraUjkvnD4NZFI dAfg== 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 y17si4419083ejw.322.2020.11.22.00.34.46; Sun, 22 Nov 2020 00:35:08 -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 S1727373AbgKVI20 (ORCPT + 99 others); Sun, 22 Nov 2020 03:28:26 -0500 Received: from mailout07.rmx.de ([94.199.90.95]:34401 "EHLO mailout07.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727286AbgKVI20 (ORCPT ); Sun, 22 Nov 2020 03:28:26 -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 4Cf3MT3QH7zBwKq; Sun, 22 Nov 2020 09:28:21 +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 4Cf3MB42HBz2TS5B; Sun, 22 Nov 2020 09:28:06 +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:27:27 +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" , Kurt Kanzenbach Subject: [PATCH net-next 1/3] net: phy: dp83640: use new PTP_MSGTYPE_SYNC define Date: Sun, 22 Nov 2020 09:26:34 +0100 Message-ID: <20201122082636.12451-2-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-092812-4Cf3MB42HBz2TS5B-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace use of magic number with recently introduced define. Signed-off-by: Christian Eggers Cc: Kurt Kanzenbach --- drivers/net/phy/dp83640.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index f2caccaf4408..9757ca0d9633 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -964,15 +964,12 @@ static void decode_status_frame(struct dp83640_private *dp83640, static int is_sync(struct sk_buff *skb, int type) { struct ptp_header *hdr; - u8 msgtype; hdr = ptp_parse_header(skb, type); if (!hdr) return 0; - msgtype = ptp_get_msgtype(hdr, type); - - return (msgtype & 0xf) == 0; + return ptp_get_msgtype(hdr, type) == PTP_MSGTYPE_SYNC; } static void dp83640_free_clocks(void) -- Christian Eggers Embedded software developer