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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241114-optimal-literate-newt-a6ace7-mkl@pengutronix.de>
Date: Thu, 14 Nov 2024 10:50:10 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Sean Nyekjaer <sean@...nix.com>
Cc: Simon Horman <horms@...nel.org>, 
	Chandrasekar Ramakrishnan <rcsekar@...sung.com>, Vincent Mailhol <mailhol.vincent@...adoo.fr>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, linux-can@...r.kernel.org, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] can: m_can: add deinit callback

On 14.11.2024 10:36:48, Sean Nyekjaer wrote:
> On Thu, Nov 14, 2024 at 10:34:23AM +0100, Marc Kleine-Budde wrote:
> > On 12.11.2024 14:46:03, Simon Horman wrote:
> > > On Mon, Nov 11, 2024 at 11:51:23AM +0100, Sean Nyekjaer wrote:
> > > > This is added in preparation for calling standby mode in the tcan4x5x
> > > > driver or other users of m_can.
> > > > For the tcan4x5x; If Vsup is 12V, standby mode will save 7-8mA, when
> > > > the interface is down.
> > > > 
> > > > Signed-off-by: Sean Nyekjaer <sean@...nix.com>
> > > > ---
> > > >  drivers/net/can/m_can/m_can.c | 3 +++
> > > >  drivers/net/can/m_can/m_can.h | 1 +
> > > >  2 files changed, 4 insertions(+)
> > > > 
> > > > diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> > > > index a7b3bc439ae596527493a73d62b4b7a120ae4e49..a171ff860b7c6992846ae8d615640a40b623e0cb 100644
> > > > --- a/drivers/net/can/m_can/m_can.c
> > > > +++ b/drivers/net/can/m_can/m_can.c
> > > > @@ -1756,6 +1756,9 @@ static void m_can_stop(struct net_device *dev)
> > > >  
> > > >  	/* set the state as STOPPED */
> > > >  	cdev->can.state = CAN_STATE_STOPPED;
> > > > +
> > > > +	if (cdev->ops->deinit)
> > > > +		cdev->ops->deinit(cdev);
> > > 
> > > Hi Sean,
> > > 
> > > Perhaps this implementation is in keeping with other m_can code, but
> > > I am wondering if either the return value of the callback be returned to
> > > the caller, or the return type of the callback be changed to void?
> > > 
> > > Similarly for calls to callbacks in in patch 3/3.
> > 
> > please take care of errors/return values.
> > 
> 
> Will do.
> It's also missing for the init callback. Would you like this series to
> fix that?

If the patches don't conflict, please make it a separate patch.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ