lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 19 Dec 2018 08:45:21 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     pavel@...x.de
Cc:     jiri@...nulli.us, Tristram.Ha@...rochip.com,
        sergio.paracuellos@...il.com, andrew@...n.ch, f.fainelli@...il.com,
        marex@...x.de, 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

From: Pavel Machek <pavel@...x.de>
Date: Wed, 19 Dec 2018 17:08:57 +0100

> 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.

Let the compiler decide in *.c files please.  That is our rule.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ