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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230622085657.agfk5jee3azdwqur@blmsp>
Date: Thu, 22 Jun 2023 10:56:57 +0200
From: Markus Schneider-Pargmann <msp@...libre.com>
To: Simon Horman <simon.horman@...igine.com>
Cc: Marc Kleine-Budde <mkl@...gutronix.de>,
	Chandrasekar Ramakrishnan <rcsekar@...sung.com>,
	Wolfgang Grandegger <wg@...ndegger.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, Julien Panis <jpanis@...libre.com>
Subject: Re: [PATCH v4 01/12] can: m_can: Write transmit header and data in
 one transaction

Hi Simon,

On Wed, Jun 21, 2023 at 04:19:06PM +0200, Simon Horman wrote:
> On Wed, Jun 21, 2023 at 11:23:39AM +0200, Markus Schneider-Pargmann wrote:
> > Combine header and data before writing to the transmit fifo to reduce
> > the overhead for peripheral chips.
> > 
> > Signed-off-by: Markus Schneider-Pargmann <msp@...libre.com>
> > ---
> >  drivers/net/can/m_can/m_can.c | 34 +++++++++++++++++++++-------------
> >  1 file changed, 21 insertions(+), 13 deletions(-)
> > 
> > diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> > index a5003435802b..5251073987ee 100644
> > --- a/drivers/net/can/m_can/m_can.c
> > +++ b/drivers/net/can/m_can/m_can.c
> > @@ -317,6 +317,12 @@ struct id_and_dlc {
> >  	u32 dlc;
> >  };
> >  
> > +struct m_can_fifo_element {
> > +	u32 id;
> > +	u32 dlc;
> > +	u8 data[CANFD_MAX_DLEN];
> > +};
> > +
> >  static inline u32 m_can_read(struct m_can_classdev *cdev, enum m_can_reg reg)
> >  {
> >  	return cdev->ops->read_reg(cdev, reg);
> > @@ -1622,6 +1628,8 @@ static int m_can_next_echo_skb_occupied(struct net_device *dev, int putidx)
> >  static netdev_tx_t m_can_tx_handler(struct m_can_classdev *cdev)
> >  {
> >  	struct canfd_frame *cf = (struct canfd_frame *)cdev->tx_skb->data;
> > +	u8 len_padded = DIV_ROUND_UP(cf->len, 4);
> > +	struct m_can_fifo_element fifo_element;
> >  	struct net_device *dev = cdev->net;
> >  	struct sk_buff *skb = cdev->tx_skb;
> >  	struct id_and_dlc fifo_header;
> 
> Hi Markus,
> 
> GCC 12.3.0 complains that fifo_header is not (no longer) used.
> 
>  drivers/net/can/m_can/m_can.c:1635:20: warning: unused variable 'fifo_header' [-Wunused-variable]
>          struct id_and_dlc fifo_header;

Yes, I moved everything to fifo_element on purpose and then forgot to
remove fifo_header. Removing it now.

Thanks,
Markus

> 
> -- 
> pw-bot: changes-requested
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ