From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: "Doug Anderson" <dianders@chromium.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
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 09:44:34 +0200 [thread overview]
Message-ID: <2024080817-perm-resolved-34a0@gregkh> (raw)
In-Reply-To: <c4c01c01-e926-49fb-8704-90a69662254d@kernel.org>
On Thu, Aug 08, 2024 at 09:34:33AM +0200, 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.
Leave it as-is, it's not breaking the build anywhere, so not a problem.
thanks,
greg k-h
next prev parent reply other threads:[~2024-08-08 7:44 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 [this message]
2024-08-08 9:15 ` Ilpo Järvinen
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=2024080817-perm-resolved-34a0@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dianders@chromium.org \
--cc=ilpo.jarvinen@linux.intel.com \
--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