From: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
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 20:59:40 +1300 [thread overview]
Message-ID: <ZxyhbCw39rBzAvtg@mail.google.com> (raw)
In-Reply-To: <cd892fb5436f1de0fa2ffc9c9ec229873227210f.camel@sipsolutions.net>
On Sat, Oct 26, 2024 at 09:44:53AM +0200, Johannes Berg wrote:
Hi!
> On Sat, 2024-10-26 at 16:46 +1300, Paulo Miguel Almeida wrote:
> > umid is already generated during make_umid_init __initcall so there is
> > no need to allocate UMID_LEN bytes to accommodate the max possible name
> > for the umid segment of the filepath
> >
> > This patch replaces UMID_LEN occurences in which it's redundant
>
> OK, I guess that's maybe all true, but can you say _why_ in the commit
> log?
>
> johannes
>
thanks for taking the time to review this patch. :-)
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.
I'm happy to amend the commit message to a better one but I'm not
sure if I got 100% what I'm missing.
- Paulo
next prev parent reply other threads:[~2024-10-26 7:59 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 [this message]
2024-10-26 8:03 ` Johannes Berg
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=ZxyhbCw39rBzAvtg@mail.google.com \
--to=paulo.miguel.almeida.rodenas@gmail.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=johannes@sipsolutions.net \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--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