From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Doug Anderson <dianders@chromium.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial <linux-serial@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH 03/13] serial: don't use uninitialized value in uart_poll_init()
Date: Thu, 8 Aug 2024 12:15:51 +0300 (EEST) [thread overview]
Message-ID: <816a5459-833c-07fb-cc92-288cd9a53a76@linux.intel.com> (raw)
In-Reply-To: <c4c01c01-e926-49fb-8704-90a69662254d@kernel.org>
On Thu, 8 Aug 2024, Jiri Slaby wrote:
> On 05. 08. 24, 17:46, Doug Anderson wrote:
> > > > @@ -2717,10 +2716,10 @@ static int uart_poll_init(struct tty_driver
> > > > *driver, int line, char *options)
> > > > ret = uart_set_options(port, NULL, baud, parity, bits,
> > > > flow);
> > > > console_list_unlock();
> > > > }
> > > > -out:
> > > > +
> > > > if (ret)
> > > > uart_change_pm(state, pm_state);
> > > > - mutex_unlock(&tport->mutex);
> > > > +
> > > > return ret;
> > > > }
> > >
> > > This too needs #include.
> >
> > Why? I see in "mutex.h" (which is already included by serial_core.c):
> >
> > DEFINE_GUARD(mutex, struct mutex *, mutex_lock(_T), mutex_unlock(_T))
> >
> > ...so we're using the mutex guard and including the header file that
> > defines the mutex guard. Seems like it's all legit to me.
>
> The patches got merged. But I can post a fix on top, of course. But, what is
> the consensus here -- include or not to include? I assume mutex.h includes
> cleanup.h already due to the above guard definition.
Yeah, while guard() itself is in cleanup.h, Doug has a point that
DEFINE_GUARD() creates a guaranteed implicit include route for cleanup.h.
Thus you can disregard my comment as it seems unnecessary to include
cleanup.h.
--
i.
next prev parent reply other threads:[~2024-08-08 9:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240805102046.307511-1-jirislaby@kernel.org>
2024-08-05 10:20 ` [PATCH 03/13] serial: don't use uninitialized value in uart_poll_init() Jiri Slaby (SUSE)
2024-08-05 14:28 ` Ilpo Järvinen
2024-08-05 15:46 ` Doug Anderson
2024-08-08 7:34 ` Jiri Slaby
2024-08-08 7:44 ` Greg Kroah-Hartman
2024-08-08 9:15 ` Ilpo Järvinen [this message]
2024-08-05 15:43 ` Doug Anderson
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=816a5459-833c-07fb-cc92-288cd9a53a76@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox