All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mark Brown <broonie@kernel.org>,
	kernel@pengutronix.de, linux-spi@vger.kernel.org
Subject: Re: [PATCH] spi: Drop warning from spi_stop_queue()
Date: Tue, 19 Sep 2023 10:18:13 +0200	[thread overview]
Message-ID: <20230919081813.acguclkhll7mzap7@pengutronix.de> (raw)
In-Reply-To: <CAMuHMdVi2TeWv0NXtxx=7NnGfJfWHoHCKty7Se0K-QusVi1xAQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]

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@pengutronix.de> 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@pengutronix.de>
> 
> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2023-09-19  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-16 16:12 [PATCH] spi: Drop warning from spi_stop_queue() Uwe Kleine-König
2023-09-18 15:45 ` Mark Brown
2023-09-19  7:26 ` Geert Uytterhoeven
2023-09-19  8:18   ` Uwe Kleine-König [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=20230919081813.acguclkhll7mzap7@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-spi@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.