public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Cc: richard@nod.at, anton.ivanov@cambridgegreys.com, kees@kernel.org,
	 tiwei.btw@antgroup.com, linux-um@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] um: Malloc just enough space for fitting pid file
Date: Sat, 26 Oct 2024 10:03:37 +0200	[thread overview]
Message-ID: <433fb0eb0132a583dc5f575f0c99c4adb8ef6cab.camel@sipsolutions.net> (raw)
In-Reply-To: <ZxyhbCw39rBzAvtg@mail.google.com>

On Sat, 2024-10-26 at 20:59 +1300, Paulo Miguel Almeida wrote:
> 
> when I said that "umid is already generated during make_umid_init
> __initcall", from my humble point of view, I was explaining the 'why'
> using UMID_LEN for calculation buffer sizes was redundant. Then again,
> once we know the size of char* umid, we can use strlen(umid) instead.

That's not "why am I changing it" though, that's "why does it work".

The only reasonable explanation I could come up with is that you're
trying to save memory ... but why go to the trouble for a function
that's called exactly once?

johannes

      reply	other threads:[~2024-10-26  8:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-26  3:46 [PATCH][next] um: Malloc just enough space for fitting pid file Paulo Miguel Almeida
2024-10-26  7:44 ` Johannes Berg
2024-10-26  7:59   ` Paulo Miguel Almeida
2024-10-26  8:03     ` Johannes Berg [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=433fb0eb0132a583dc5f575f0c99c4adb8ef6cab.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=paulo.miguel.almeida.rodenas@gmail.com \
    --cc=richard@nod.at \
    --cc=tiwei.btw@antgroup.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