mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] tty: Drop duplicate NULL check in TTY port functions
Date: Thu, 3 Feb 2022 12:40:00 +0200	[thread overview]
Message-ID: <YfuxANmSQDfIQZO4@smile.fi.intel.com> (raw)
In-Reply-To: <37e31d03-eee6-7052-fe32-1f37f1b460e1@kernel.org>

On Thu, Feb 03, 2022 at 09:36:55AM +0100, Jiri Slaby wrote:
> On 02. 02. 22, 17:57, Andy Shevchenko wrote:
> > The free_page(addr), which becomes free_pages(addr, 0) checks addr against 0.
> > No need to repeat this check in the callers, i.e.  tty_port_free_xmit_buf()
> > and tty_port_destructor().
> > 
> > Note, INIT_KFIFO() is safe without that check, because it's aware of kfifo PTR
> > versus embedded kfifo.
> 
> Not sure what you mean here ^^^? But it might be one of the morning brain
> parser errors.

Or maybe my evening weren't working...

Actually INIT_KFIFO() can be outside of that check from day 1 because it
operates on a separate member and does not rely on the FIFO itself to be
allocated.

I tried to explain that, while kfifo allocation goes together with buffer,
there is no dependency to any of those allocations.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-02-03 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 16:57 Andy Shevchenko
2022-02-03  8:36 ` Jiri Slaby
2022-02-03 10:40   ` Andy Shevchenko [this message]
2022-02-04 14:42     ` Greg Kroah-Hartman
2022-02-04 15:27       ` Andy Shevchenko

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=YfuxANmSQDfIQZO4@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®