Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp88218pxu; Sun, 22 Nov 2020 00:33:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLLRohoG6K1tf0/zr0adyA5/nUs9XVSY31Fq6CQx56jXAQbZ53U91zX47BzUixg6FmzDYM X-Received: by 2002:a50:a1c6:: with SMTP id 64mr17275528edk.156.1606034003645; Sun, 22 Nov 2020 00:33:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606034003; cv=none; d=google.com; s=arc-20160816; b=Ry73v/2BTaGuQzz0oANJ3H0MC2Slh0Nb1a8GcH/7qf4GBF0vyc2UdLTP0oi/f0JIpD i+6E6kEY8udzrdZfKBbTL2yVQsDCW9zRYNg5tbftnxpc/820CW0ktS5eILEZxFvD+xd3 MSAAWN8n8nRo9yoF/eLxQvDe9fYBa7aLqhlUhC4xr0X5xtMzD2Kz6c8u+jm96UwgwytN 6R3kqouHk/gGm6eTo2QrfBG+S0ESsaZkecJFueTP9ev7mg8CaPz/epHW7TU42DZwgrCf 49fLx0LZvA06+E4oJQbWiUNaKhhhmtXmtdyiWmhK3rPnfztqtyBeEVgF1TFSfQriVzDW VCKQ== 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 :message-id:date:subject:cc:to:from; bh=/laYUzsYyuR6fE03f07MhJhhRPXeveuXLTBI8RT2rPw=; b=bvC/YYWzWQChN/8zm0EZEVmG+mC9e0sioYvrMst0MB45TrPVmapk9tr0fCoDIp8qyf PlDfMAiDZ0uEXlf14VSUo5WSkTkdMbQ0kztdPKA+V7rU0T5upfO8kxYV0QBOJ32ZHGHJ DaJO0WXRXGaRd4JscMTQjWIRT1qn0xXjSdciVFUs1oHB5RrOWZA//2cu06WrfEcKaQCN 05Ndok1JivA1GRRHXN4V5V8uAeVPSmBqUBToo86cyfIWvCu6pWsLa82WamaVSgCTkzpK sNoG3VQrkbpKHTuR7yRXpqx/0iBisIJbk1lk+zn5VG9L6mN0j2S6Ifpj/u3jlWlOnh9q NPFg== 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 z17si4714430eja.372.2020.11.22.00.32.26; Sun, 22 Nov 2020 00:33:23 -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 S1727329AbgKVI1b (ORCPT + 99 others); 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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: linux-kernel@vger.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.