mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Sang-Heon Jeon <ekffu200098@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] tools/bootconfig: Consolidate xbc_init() to error message wrapper
Date: Thu, 10 Sep 2026 23:36:06 +0900	[thread overview]
Message-ID: <20260910233606.83bbc260bf8684110b81cf31@kernel.org> (raw)
In-Reply-To: <CABFDxMFbHoDrGKr7039XL3BwHOjZC+4Qt2YQNeGbyuAitQPGDg@mail.gmail.com>

On Thu, 10 Sep 2026 14:30:02 +0900
Sang-Heon Jeon <ekffu200098@gmail.com> wrote:

> > +static int init_xbc_with_error(char *buf, int len)
> > +{
> > +       char *copy = malloc(len);
> > +       const char *msg;
> > +       int ret, pos;
> > +
> > +       if (!copy)
> > +               return -ENOMEM;
> > +
> > +       memcpy(copy, buf, len);
> 
> Can we remove this? xbc_init() already copies buf and does not change
> it, so show_xbc_error() can use buf directly.

Ah, good catch! OK, let me fix it.

Thanks,


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2026-09-10 14:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 15:53 [PATCH 0/3] bootconfig: Reject unexpected data after null character and cleanups Masami Hiramatsu (Google)
2026-09-09 15:53 ` [PATCH 1/3] bootconfig: Reject unexpected data after null character Masami Hiramatsu (Google)
2026-09-10  5:29   ` Sang-Heon Jeon
2026-09-09 15:53 ` [PATCH 2/3] tools/bootconfig: Consolidate xbc_init() to error message wrapper Masami Hiramatsu (Google)
2026-09-10  5:30   ` Sang-Heon Jeon
2026-09-10 14:36     ` Masami Hiramatsu [this message]
2026-09-09 15:54 ` [PATCH 3/3] bootconfig: Skip internal tree sanity checks in kernel Masami Hiramatsu (Google)
2026-09-10  5:30   ` Sang-Heon Jeon

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=20260910233606.83bbc260bf8684110b81cf31@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ekffu200098@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-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®