All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Michal Kubecek <mkubecek@suse.cz>,
	netdev@vger.kernel.org, Marek Vasut <marex@denx.de>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-kernel@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>,
	mkl@pengutronix.de, kernel@pengutronix.de,
	David Jander <david@protonic.nl>,
	Jakub Kicinski <kuba@kernel.org>,
	Christian Herber <christian.herber@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH net-next v3 1/2] ethtool: provide UAPI for PHY Signal Quality Index (SQI)
Date: Wed, 20 May 2020 17:30:01 +0200	[thread overview]
Message-ID: <20200520153001.GG652285@lunn.ch> (raw)
In-Reply-To: <20200520150711.rj4b22g3zhzej2aw@pengutronix.de>

> > I'm not sure if it's a good idea to define two separate callbacks. It
> > means adding two pointers instead of one (for every instance of the
> > structure, not only those implementing them), doing two calls, running
> > the same checks twice, locking twice, checking the result twice.
> > 
> > Also, passing a structure pointer would mean less code changed if we
> > decide to add more related state values later.
> > 
> > What do you think?
> > 
> > If you don't agree, I have no objections so
> > 
> > Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
> 
> I have no strong opinion on it. Should I rework it?

It is an internal API, so we can change it any time we want.

I did wonder if MAX should just be a static value. It seems odd it
would change at run time. But we can re-evaulate this once we got some
more users.

     Andrew

  parent reply	other threads:[~2020-05-20 15:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20  6:29 [PATCH net-next v3 0/2] provide KAPI for SQI Oleksij Rempel
2020-05-20  6:29 ` [PATCH net-next v3 1/2] ethtool: provide UAPI for PHY Signal Quality Index (SQI) Oleksij Rempel
2020-05-20 14:29   ` Andrew Lunn
2020-05-20 14:45   ` Michal Kubecek
2020-05-20 15:07     ` Oleksij Rempel
2020-05-20 15:23       ` Michal Kubecek
2020-05-20 15:30       ` Andrew Lunn [this message]
2020-05-20 17:39         ` Oleksij Rempel
2020-05-20  6:29 ` [PATCH net-next v3 2/2] net: phy: tja11xx: add SQI support Oleksij Rempel
2020-05-20 14:29   ` Andrew Lunn
2020-05-22  0:18 ` [PATCH net-next v3 0/2] provide KAPI for SQI David Miller

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=20200520153001.GG652285@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=christian.herber@nxp.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=david@protonic.nl \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marex@denx.de \
    --cc=mkl@pengutronix.de \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /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.