Netdev List
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Simon Horman <horms@kernel.org>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Peter Ujfalusi <peter.ujfalusi@gmail.com>,
	Vinod Koul <vkoul@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	Roger Quadros <rogerq@kernel.org>,
	MD Danish Anwar <danishanwar@ti.com>,
	Andrew Lunn <andrew@lunn.ch>,
	dmaengine@vger.kernel.org, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net] dmaengine: ti: k3-udma-glue: fix k3_udma_glue_tx_get_irq() error checking
Date: Fri, 15 Sep 2023 09:45:27 +0300	[thread overview]
Message-ID: <62125aa6-e279-474c-a0d5-c63d226c6c40@kadam.mountain> (raw)
In-Reply-To: <20230915063324.GC758782@kernel.org>

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


      reply	other threads:[~2023-09-15  6:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 11:05 [PATCH net] dmaengine: ti: k3-udma-glue: fix k3_udma_glue_tx_get_irq() error checking Dan Carpenter
2023-09-15  6:33 ` Simon Horman
2023-09-15  6:45   ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62125aa6-e279-474c-a0d5-c63d226c6c40@kadam.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=andrew@lunn.ch \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=grygorii.strashko@ti.com \
    --cc=horms@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peter.ujfalusi@gmail.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox