linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@suse.com>
Cc: Dipendra Khadka <kdipendra88@gmail.com>,
	David Rientjes <rientjes@google.com>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/oom_kill: Remove unnecessary integer promotion in format string
Date: Tue, 30 Dec 2025 12:33:36 -0800	[thread overview]
Message-ID: <20251230123336.ef33f8a55df71f3e3f782532@linux-foundation.org> (raw)
In-Reply-To: <aVI7Zsr9S1WqKxz8@tiehlicka>

On Mon, 29 Dec 2025 09:27:18 +0100 Michal Hocko <mhocko@suse.com> wrote:

> On Sun 28-12-25 15:44:55, Dipendra Khadka wrote:
> > The 'h' length modifier in '%hd' is unnecessary as short integers are
> > promoted to int in variadic functions. Use '%d' instead.
> > 
> > Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
> 
> Why should we change the currently correct code in the first place?
> What is an added value?

It reduces vmlinux by 2 bytes ;)

It's a teeny issue but I do like the present code - be very explicit
and careful about the types we're dealing with, don't rely on unobvious
C rules.



  reply	other threads:[~2025-12-30 20:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-28 15:44 Dipendra Khadka
2025-12-29  3:52 ` David Rientjes
2025-12-29  8:27 ` Michal Hocko
2025-12-30 20:33   ` Andrew Morton [this message]
2025-12-31 12:21     ` Dipendra Khadka

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=20251230123336.ef33f8a55df71f3e3f782532@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=kdipendra88@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=rientjes@google.com \
    --cc=shakeel.butt@linux.dev \
    /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