From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Tony Lindgren" <tony@atomide.com>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Dhruva Gole" <d-gole@ti.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"John Ogness" <john.ogness@linutronix.de>,
"Johan Hovold" <johan@kernel.org>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
"kernel test robot" <oliver.sang@intel.com>
Subject: Re: [PATCH] serial: core: Fix serial_base_match() after fixing controller port name
Date: Thu, 3 Aug 2023 00:44:34 +0300 [thread overview]
Message-ID: <ZMrOQifgCZqu3YTh@smile.fi.intel.com> (raw)
In-Reply-To: <2023080224-nutrient-regress-c95e@gregkh>
On Wed, Aug 02, 2023 at 03:48:26PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Aug 02, 2023 at 02:48:43PM +0300, Tony Lindgren wrote:
> > While fixing DEVNAME to be more usable, I broke serial_base_match() as
> > the ctrl and port prefix for device seemed unnecessary.
> >
> > Let's fix the issue by checking against dev->type and drv->name.
...
> > + !strncmp(SERIAL_BASE_CTRL_NAME, drv->name, 4))
>
> maybe:
> !strncmp(SERIAL_BASE_CTRL_NAME, drv->name, strlen(SERIAL_BASE_CTRL_NAME))
>
> as "4" is a magic number :)
str_has_prefix() hides that.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-08-02 21:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 11:48 [PATCH] serial: core: Fix serial_base_match() after fixing controller port name Tony Lindgren
2023-08-02 13:48 ` Greg Kroah-Hartman
2023-08-02 21:44 ` Andy Shevchenko [this message]
2023-08-02 18:32 ` Mark Brown
2023-08-03 5:13 ` Jiri Slaby
2023-08-03 6:56 ` Tony Lindgren
2023-08-03 7:00 ` Anders Roxell
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=ZMrOQifgCZqu3YTh@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bigeasy@linutronix.de \
--cc=d-gole@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=oliver.sang@intel.com \
--cc=tony@atomide.com \
--cc=vigneshr@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).