All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Raju Rangoju <Raju.Rangoju@amd.com>
Cc: <netdev@vger.kernel.org>, <andrew+netdev@lunn.ch>,
	<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<richardcochran@gmail.com>, <Shyam-sundar.S-k@amd.com>
Subject: Re: [PATCH net-next v2] amd-xgbe: add hardware PTP timestamping support
Date: Wed, 16 Jul 2025 17:02:12 -0700	[thread overview]
Message-ID: <20250716170212.2a2cde21@kernel.org> (raw)
In-Reply-To: <20250714065811.464645-1-Raju.Rangoju@amd.com>

On Mon, 14 Jul 2025 12:28:11 +0530 Raju Rangoju wrote:
>  	/* For Timestamp config */
> -	int (*config_tstamp)(struct xgbe_prv_data *, unsigned int);
> -	void (*update_tstamp_addend)(struct xgbe_prv_data *, unsigned int);
> -	void (*set_tstamp_time)(struct xgbe_prv_data *, unsigned int sec,
> +	void (*init_ptp)(struct xgbe_prv_data *pdata);
> +	void (*config_tstamp)(struct xgbe_prv_data *pdata,
> +			      unsigned int mac_tscr);
> +	void (*update_tstamp_addend)(struct xgbe_prv_data *pdata,
> +				     unsigned int addend);
> +	void (*set_tstamp_time)(struct xgbe_prv_data *pdata, unsigned int sec,
>  				unsigned int nsec);
> +	void (*update_tstamp_time)(struct xgbe_prv_data *pdata,
> +				   unsigned int sec,
> +				   unsigned int nsec);
>  	u64 (*get_tstamp_time)(struct xgbe_prv_data *);
>  	u64 (*get_tx_tstamp)(struct xgbe_prv_data *);

Please start with removing this abstraction / callbacks instead of
starting to used them. They each seem to have only one function
assigned, and there isn't even a null check before calling.
They make the code harder to follow and review.

The removal should be a separate patch for ease of review.
-- 
pw-bot: cr

  parent reply	other threads:[~2025-07-17  0:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14  6:58 [PATCH net-next v2] amd-xgbe: add hardware PTP timestamping support Raju Rangoju
2025-07-14 14:43 ` Shyam Sundar S K
2025-07-17  0:02 ` Jakub Kicinski [this message]
2025-07-18 12:36   ` Rangoju, Raju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250716170212.2a2cde21@kernel.org \
    --to=kuba@kernel.org \
    --cc=Raju.Rangoju@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.