netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Pavel Machek <pavel@denx.de>,
	Tristram.Ha@microchip.com,
	Sergio Paracuellos <sergio.paracuellos@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Marek Vasut <marex@denx.de>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	vivien.didelot@savoirfairelinux.com,
	UNGLinuxDriver@microchip.com, netdev@vger.kernel.org
Subject: Re: [PATCH v1 net-next] net: dsa: microchip: add KSZ9477 I2C driver
Date: Wed, 19 Dec 2018 18:22:20 +0100	[thread overview]
Message-ID: <20181219172220.GA14258@amd> (raw)
In-Reply-To: <20181219161532.GA2224@nanopsycho>

[-- Attachment #1: Type: text/plain, Size: 1256 bytes --]

On Wed 2018-12-19 17:15:32, Jiri Pirko wrote:
> Wed, Dec 19, 2018 at 05:08:57PM CET, pavel@denx.de wrote:
> >Hi!
> >
> >> >+static int ksz_i2c_write32(struct ksz_device *dev, u32 reg, u32 value)
> >> >+{
> >> >+	value = cpu_to_be32(value);
> >> >+	return ksz_i2c_write(dev, reg, &value, 4);
> >> >+}
> >> >+
> >> >+static int ksz_i2c_get(struct ksz_device *dev, u32 reg, void *data, size_t len)
> >> >+{
> >> >+	return ksz_i2c_read(dev, reg, data, len);
> >> >+}
> >> >+
> >> >+static int ksz_i2c_set(struct ksz_device *dev, u32 reg, void *data, size_t len)
> >> >+{
> >> >+	return ksz_i2c_write(dev, reg, data, len);
> >> >+}
> >> 
> >> 
> >> This header file makes no sense. Please move the functions into .c
> >
> >No, that would make code bigger & slower.
> >
> >It makes sense to me. But I'd add "inline" keyword to make the goal
> >explicit.
> 
> 1) It makes no sense to have header files for things like this. The
>    functions are only used within the single .c file.
> 
> 2) You cannot inline them, as they are used as ops.

Ok, sorry for the noise.
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2018-12-19 17:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19  3:41 [PATCH v1 net-next] net: dsa: microchip: add KSZ9477 I2C driver Tristram.Ha
2018-12-19  4:31 ` Woojung.Huh
2018-12-19 22:59   ` Tristram.Ha
2018-12-19 23:19     ` Woojung.Huh
2018-12-19  8:09 ` Marek Vasut
2018-12-19 22:30   ` Tristram.Ha
2018-12-19 23:11     ` Marek Vasut
2018-12-19 23:31       ` Marek Vasut
2018-12-20  1:10         ` Marek Vasut
2018-12-21  0:48           ` Tristram.Ha
2018-12-21  2:03             ` Marek Vasut
2018-12-19 10:05 ` Jiri Pirko
2018-12-19 16:08   ` Pavel Machek
2018-12-19 16:15     ` Jiri Pirko
2018-12-19 17:22       ` Pavel Machek [this message]
2018-12-19 17:24         ` Marek Vasut
2018-12-19 22:50           ` Tristram.Ha
2018-12-19 23:12             ` Marek Vasut
2018-12-21  9:29             ` Dan Carpenter
2018-12-21 12:14               ` Marek Vasut
2018-12-21 12:23                 ` Dan Carpenter
2018-12-21 12:39                   ` Marek Vasut
2019-01-09 16:05             ` Pavel Machek
2019-01-09 16:15               ` Marek Vasut
2018-12-19 16:45     ` David Miller
2019-01-10  8:15 ` Sergio Paracuellos

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=20181219172220.GA14258@amd \
    --to=pavel@denx.de \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=dan.carpenter@oracle.com \
    --cc=f.fainelli@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=sergio.paracuellos@gmail.com \
    --cc=vivien.didelot@savoirfairelinux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).