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]
Message-ID: <Yw/2u746uEk85S7u@lunn.ch>
Date:   Thu, 1 Sep 2022 02:03:07 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Jiawen Wu <jiawenwu@...stnetic.com>
Cc:     netdev@...r.kernel.org, mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next v2 02/16] net: txgbe: Reset hardware

On Wed, Aug 31, 2022 at 10:54:40AM +0800, Jiawen Wu wrote:
> On Wednesday, August 31, 2022 8:39 AM, Andrew Lunn wrote:
> > n Tue, Aug 30, 2022 at 03:04:40PM +0800, Jiawen Wu wrote:
> > >  /* struct txgbe_mac_operations */
> > > +static int txgbe_stop_adapter_dummy(struct txgbe_hw *TUP0) {
> > > +	return -EPERM;
> > 
> > This is a bit of an odd error code. -EOPNOTSUPP would be more normal.
> > 
> > I do wonder what all this dummy stuff is for...
> > 
> 
> Okay, I just think that this way I don't need to determine whether the
> function pointer is NULL every time it is called.

Have you seen many other driver doing this? I don't think i have. They
just check the pointer before calling thought it. You want your driver
to look just like every other Linux Ethernet driver.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ