From patchwork Sun Nov 22 08:26:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 11923805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E11DC5519F for ; Sun, 22 Nov 2020 08:28:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE84120721 for ; Sun, 22 Nov 2020 08:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727359AbgKVI1b (ORCPT ); Sun, 22 Nov 2020 03:27:31 -0500 Received: from mailout11.rmx.de ([94.199.88.76]:44948 "EHLO mailout11.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727286AbgKVI1b (ORCPT ); Sun, 22 Nov 2020 03:27:31 -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 mailout11.rmx.de (Postfix) with ESMTPS id 4Cf3LR5mGKz3xRN; Sun, 22 Nov 2020 09:27:27 +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 4Cf3LC1B9Nz2TRjV; Sun, 22 Nov 2020 09:27:15 +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:26:52 +0100 From: Christian Eggers To: Richard Cochran , Andrew Lunn , Heiner Kallweit , Jakub Kicinski CC: Vladimir Oltean , Russell King , "David S . Miller" , , , Christian Eggers Subject: [PATCH net-next 0/3] net: ptp: use common defines for PTP message types in further drivers Date: Sun, 22 Nov 2020 09:26:33 +0100 Message-ID: <20201122082636.12451-1-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Originating-IP: [192.168.54.14] X-RMX-ID: 20201122-092717-4Cf3LC1B9Nz2TRjV-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This series replaces further driver internal enumeration / uses of magic numbers with the newly introduced PTP_MSGTYPE_* defines. On Friday, 20 November 2020, 23:39:10 CET, Vladimir Oltean wrote: > On Fri, Nov 20, 2020 at 09:41:03AM +0100, Christian Eggers wrote: > > This series introduces commen defines for PTP event messages. Driver > > internal defines are removed and some uses of magic numbers are replaced > > by the new defines. > > [...] > > I understand that you don't want to spend a lifetime on this, but I see > that there are more drivers which you did not touch. > > is_sync() in drivers/net/phy/dp83640.c can be made to > return ptp_get_msgtype(hdr, type) == PTP_MSGTYPE_SYNC; > > this can be removed from drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h: > enum { > MLXSW_SP_PTP_MESSAGE_TYPE_SYNC, > MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ, > MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ, > MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP, > }; I think that I have found an addtional one in the Microsemi VSC85xx PHY driver.