Re: [PATCH net] dmaengine: ti: k3-udma-glue: fix k3_udma_glue_tx_get_irq() error checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Wed, Sep 13, 2023 at 02:05:31PM +0300, Dan Carpenter wrote:
> The problem is that xudma_pktdma_tflow_get_irq() returns zero on error
> and k3_ringacc_get_ring_irq_num() returns negatives.  This complicates
> the error handling.  Change it to always return negative errors.
> Both callers have other bugs as well.  The am65_cpsw_nuss_init_tx_chns()
> function doesn't preserve the error code but instead returns success.
> In prueth_init_tx_chns() there is a signedness bug since "tx_chn->irq"
> is unsigned so negative errors are not handled correctly.

Hi Dan,

I understand that the problems are related, but there are several of them.
Could they be handled in separate patches (applied in a specific order) ?
I suspect this would aid backporting, and, moreover, I think it is nice
to try to work on a one-fix-per-patch basis.

The above notwithstanding, I do agree with the correctness of your changes.

> Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
> Fixes: 5b65781d06ea ("dmaengine: ti: k3-udma-glue: Add support for K3 PKTDMA")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
> The k3_udma_glue_tx_get_irq() function is in dmaengine, but this bug
> affects networking so I think the fix should go through networking.


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux