[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181219160857.GA13878@amd>
Date: Wed, 19 Dec 2018 17:08:57 +0100
From: Pavel Machek <pavel@...x.de>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Tristram.Ha@...rochip.com,
Sergio Paracuellos <sergio.paracuellos@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Marek Vasut <marex@...x.de>,
Dan Carpenter <dan.carpenter@...cle.com>,
vivien.didelot@...oirfairelinux.com, UNGLinuxDriver@...rochip.com,
netdev@...r.kernel.org
Subject: Re: [PATCH v1 net-next] net: dsa: microchip: add KSZ9477 I2C driver
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.
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists