Re: [PATCH] spi: Drop warning from spi_stop_queue()

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

 



On Tue, Sep 19, 2023 at 09:26:42AM +0200, Geert Uytterhoeven wrote:
> Hi Uwe,
> 
> On Sat, Sep 16, 2023 at 6:14 PM Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> > Both callers of spi_stop_queue() (i.e. spi_destroy_queue() and
> > spi_controller_suspend()) already emit an error message if
> > spi_stop_queue() fails. Another warning in this case isn't helpful, so
> > drop it.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> 
> Thanks for your patch, which is now commit 9386c958beb77aee ("spi:
> Drop warning from spi_stop_queue()") in spi/for-next.
> 
> > --- a/drivers/spi/spi.c
> > +++ b/drivers/spi/spi.c
> > @@ -2093,10 +2093,6 @@ static int spi_stop_queue(struct spi_controller *ctlr)
> >
> >         spin_unlock_irqrestore(&ctlr->queue_lock, flags);
> >
> > -       if (ret) {
> > -               dev_warn(&ctlr->dev, "could not stop message queue\n");
> > -               return ret;
> > -       }
> >         return ret;
> >  }
> 
> Why did you decide to remove the printed warning from the callee,
> instead of the multiple printed warnings from the callers?
> The alternative would have reduced kernel size a bit more.

The callers used dev_err, the removed message is a dev_warn. So I kept
the messages with the higher prio.

Also the two error messages are more specific:

	spi_destroy_queue()
	-> dev_err(&ctlr->dev, "problem destroying queue\n");
	spi_controller_suspend()
	-> dev_err(&ctlr->dev, "queue stop failed\n");

But I didn't think about size reduction, if you want to improve further,
you're welcome.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[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 Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux