[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeCfMfuMI4hJ54Bb@smile.fi.intel.com>
Date: Thu, 29 Feb 2024 17:13:53 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Herve Codina <herve.codina@...tlin.com>
Cc: Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Yury Norov <yury.norov@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, Andrew Lunn <andrew@...n.ch>,
Mark Brown <broonie@...nel.org>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v5 1/5] net: wan: Add support for QMC HDLC
On Thu, Feb 29, 2024 at 03:15:49PM +0100, Herve Codina wrote:
> The QMC HDLC driver provides support for HDLC using the QMC (QUICC
> Multichannel Controller) to transfer the HDLC data.
...
+ array_size.h
+ bug.h
> +#include <linux/cleanup.h>
> +#include <linux/dma-mapping.h>
+ device.h
+ err.h
> +#include <linux/hdlc.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
+ spinlock.h
+ types.h
With this fixed (below is up to you),
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
...
> +free_desc:
> + qmc_chan_reset(qmc_hdlc->qmc_chan, QMC_CHAN_ALL);
> + for (i = 0; i < ARRAY_SIZE(qmc_hdlc->rx_descs); i++) {
I'm wondering what prevents you from doing
while (i--) {
> + desc = &qmc_hdlc->rx_descs[i];
> + if (!desc->skb)
> + continue;
...and probably get rid of this check?
> + dma_unmap_single(qmc_hdlc->dev, desc->dma_addr, desc->dma_size,
> + DMA_FROM_DEVICE);
> + kfree_skb(desc->skb);
> + desc->skb = NULL;
> + }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists