[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YGqX511MvGNiLMXi@unreal>
Date: Mon, 5 Apr 2021 07:53:59 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Richard Cochran <richardcochran@...il.com>
Cc: Shannon Nelson <snelson@...sando.io>, netdev@...r.kernel.org,
davem@...emloft.net, kuba@...nel.org, drivers@...sando.io,
Allen Hubbe <allenbh@...sando.io>
Subject: Re: [PATCH net-next 05/12] ionic: add hw timestamp support files
On Sun, Apr 04, 2021 at 04:05:26PM -0700, Richard Cochran wrote:
> On Thu, Apr 01, 2021 at 10:56:03AM -0700, Shannon Nelson wrote:
> > @@ -0,0 +1,589 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/* Copyright(c) 2017 - 2021 Pensando Systems, Inc */
> > +
> > +#include <linux/netdevice.h>
> > +#include <linux/etherdevice.h>
> > +
> > +#include "ionic.h"
> > +#include "ionic_bus.h"
> > +#include "ionic_lif.h"
> > +#include "ionic_ethtool.h"
> > +
> > +static int ionic_hwstamp_tx_mode(int config_tx_type)
> > +{
> > + switch (config_tx_type) {
> > + case HWTSTAMP_TX_OFF:
> > + return IONIC_TXSTAMP_OFF;
> > + case HWTSTAMP_TX_ON:
> > + return IONIC_TXSTAMP_ON;
> > + case HWTSTAMP_TX_ONESTEP_SYNC:
> > + return IONIC_TXSTAMP_ONESTEP_SYNC;
> > +#ifdef HAVE_HWSTAMP_TX_ONESTEP_P2P
> > + case HWTSTAMP_TX_ONESTEP_P2P:
> > + return IONIC_TXSTAMP_ONESTEP_P2P;
> > +#endif
>
> This ifdef is not needed. (I guess you have to support older kernel
> versions, but my understanding of the policy is that new code
> shouldn't carry such stuff).
The HAVE_HWSTAMP_TX_ONESTEP_P2P don't exist in the kernel and the ifdef should
be deleted.
Thanks
Powered by blists - more mailing lists