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