lkml.org 
[lkml]   [2023]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 3/8] net-next: mvpp2: relax return value check for IRQ get
On Fri, 26 May 2023 09:36:57 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:

> fwnode_irq_get[_byname]() were changed to not return 0 anymore.
>
> Drop check for return value 0.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
>
Seems straight forward though 'maybe' nice to return the actual
error rather than eating it. That relies on nothing up the stack
handling resulting error codes different though.


> ---
> Revision history:
> v5 =>:
> - No changes
> v4 = v5:
> Fix the subject, mb1232 => mvpp2
>
> The first patch of the series changes the fwnode_irq_get() so this depends
> on the first patch of the series and should not be applied alone.
> ---
> drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> index adc953611913..5b987af306a5 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> @@ -5833,7 +5833,7 @@ static int mvpp2_multi_queue_vectors_init(struct mvpp2_port *port,
> v->irq = of_irq_get_byname(port_node, irqname);
> else
> v->irq = fwnode_irq_get(port->fwnode, i);
> - if (v->irq <= 0) {
> + if (v->irq < 0) {
> ret = -EINVAL;

ret = v->irq; seems nicer.

> goto err;
> }
> @@ -6764,7 +6764,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
> err = -EPROBE_DEFER;
> goto err_deinit_qvecs;
> }
> - if (port->port_irq <= 0)
> + if (port->port_irq < 0)
> /* the link irq is optional */
> port->port_irq = 0;
>

\
 
 \ /
  Last update: 2023-05-28 19:04    [W:1.054 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site