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 Fri, Sep 15, 2023 at 08:33:24AM +0200, Simon Horman wrote:
> 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.
> 

Sure.  Let me write it like:

patch 1: fix first caller
patch 2: fix second caller
patch 3: re-write both callers to cleaner API

And we can push everything to net because it's nice to have one version
of the API instead of a version for net and a different version in
net-next.  Or we could apply patch 3 to only net-next.

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux