Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp201252pxb; Wed, 18 Nov 2020 21:33:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOq/aIiYzcgTxCTJJC8uyPfS+Y+OPKMBoqqX6m3oGxZl96CY1vKPAQetSXPhBqHjVj8Su9 X-Received: by 2002:a50:fe14:: with SMTP id f20mr27681237edt.61.1605763987538; Wed, 18 Nov 2020 21:33:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605763987; cv=none; d=google.com; s=arc-20160816; b=Uuu3DEBuX3PBaJeR0u4k0f3UgMiMO7LDDmz5Tdwj8RGwoV7tott9YnhC/5BFEbaYDV 0fHK1hDajL2Xvwym91jt+boD7Ap2R3y8/3fjLsE7CX7gW3ipu9ls6ZGwJKBqOx4LEBRj AoszPOrRiOAP950+w97lGa5Y02Qt/XqzJjL9H6KzDMRW1c6FRErTQW6esKMLbcPQHLgy kOqRzZAGiwkx0sarXz+drpQjq9vBlbE3rFiys6ci4uDrdKSgrh3A/Dx8K3hrFgKEEhzb nAYRP0rZ54ZRDKr8fs0P6v7ohoA6O2Pqg+gr4IlnSFvaAesw8iYr3+9K1NilNnk0rA+4 Ycrw== 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:organization:message-id:date:subject:cc:to :from; bh=CfBtsulZc/ZymHi8+v6zOLyO6L5jwSLo/mldtGuI12o=; b=Cq+qSX4hs3gGANjUF+MCoaMlIjZ0n5nu/Kw5zm3sF5TbFghlkl/Pq0NxE/zO3IqlVt jrkBMT8c+hWvRb7UZ4N6u7DHibnLidJOV6m+fNc0EUgTgrTgN4e9WM+GJWeqjcFOIJrY iYGghTdtlVuujKPCz8VWS2yVSV4AhV02oPnyF4sWeVlUYclpFAuWnUIBlt/5M6/WMJZA a8hn4T8mB+flwWvaVPhn+WscF/pTF+JWTR6seCjhcfUdN0z5imOgEYE0GJ+CpkWVz5h9 YgkVmsEg2j7z2JBJX1hkTXMAAsQAjTOqrtjBfa5OKzhK0/0hOdyIcsI5YBDkIT1p8lHf LWvQ== 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 dt4si20093537ejc.439.2020.11.18.21.32.44; Wed, 18 Nov 2020 21:33:07 -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 S1726117AbgKSF3N (ORCPT + 99 others); Thu, 19 Nov 2020 00:29:13 -0500 Received: from mailout11.rmx.de ([94.199.88.76]:59468 "EHLO mailout11.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725648AbgKSF3N (ORCPT ); Thu, 19 Nov 2020 00:29:13 -0500 Received: from kdin01.retarus.com (kdin01.dmz1.retloc [172.19.17.48]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout11.rmx.de (Postfix) with ESMTPS id 4Cc7X511J9z41q6; Thu, 19 Nov 2020 06:29:09 +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 kdin01.retarus.com (Postfix) with ESMTPS id 4Cc7Wr39GZz2xGP; Thu, 19 Nov 2020 06:28:56 +0100 (CET) Received: from n95hx1g2.localnet (192.168.54.21) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 19 Nov 2020 06:28:19 +0100 From: Christian Eggers To: Jacob Keller CC: Richard Cochran , Andrew Lunn , Heiner Kallweit , Jakub Kicinski , Vladimir Oltean , Russell King , "David S . Miller" , , , Kurt Kanzenbach Subject: Re: [PATCH net-next v2 3/3] ptp: ptp_ines: use new PTP_MSGTYPE_* define(s) Date: Thu, 19 Nov 2020 06:28:00 +0100 Message-ID: <5337022.CNZMXmNBYT@n95hx1g2> Organization: Arnold & Richter Cine Technik GmbH & Co. Betriebs KG In-Reply-To: <5809d8e0-4848-004c-1551-691cd8bfbd67@intel.com> References: <20201118162203.24293-1-ceggers@arri.de> <20201118162203.24293-4-ceggers@arri.de> <5809d8e0-4848-004c-1551-691cd8bfbd67@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-IP: [192.168.54.21] X-RMX-ID: 20201119-062858-4Cc7Wr39GZz2xGP-0@kdin01 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, 18 November 2020, 22:03:56 CET, Jacob Keller wrote: > On 11/18/2020 8:22 AM, Christian Eggers wrote: > > 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: > This has a functional change of no longer discarding the higher bits of > msgtype. While this may be correct, I think it should at least be called > out as to why in the commit message. The "& 0xf" is already done within ptp_get_msgtype(). I will add this to the commit description for the next series. regards Christian