From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 066A61B81CA for ; Tue, 30 Dec 2025 20:33:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767126818; cv=none; b=tptg0tb3ib6IBpKG8ccFhFZ+m0bFt+8F0GBS1zO+/EI4bB5AvaG0r11nZARm1+W0NYQJywV6pGTTDT2b1fUbwatuEhtIIAqsF+QI+cHg6/TI5M8f2UnanSpRUd9EaxbpNsI/QfJcstibn2ulg3hAvnl08L4ogQGTlETxaqtyIdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767126818; c=relaxed/simple; bh=0u26j7AJ8QC208/ooPb6KaynFf6cllwNRkgmFyhiWNs=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=WJ+bY9ySdSKanBMulkSHrzDnncGQRF45+IoXluAtOC5X34/ZNZS85xaYjN/o/bL8HAA0T82S1FYRJfeHLF0hiZa6+TKOZa5XktUU606r8gMSdCdb3FPxEboYvnYY5nfmTTNOuql68s7SbqoDie5u52a0vG5HFV+okEDe/im5oiQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=OuqShLmo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="OuqShLmo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EB7DC4CEFB; Tue, 30 Dec 2025 20:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1767126817; bh=0u26j7AJ8QC208/ooPb6KaynFf6cllwNRkgmFyhiWNs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OuqShLmozNBMQLJfxjfj+YIvid4oax7GDHVH3u6OGu9dHM0DP9tqjFIr37I5zf7zv YZm3WkxVHtQUiHdRu0Cwsr/9vv7v2nU4IqfYNKee58vvFd3dHbiD0/vsZxkpO9FUT7 R/JfReGiWrojA2ZbG2aGvTM6M909Tpig0AtwRaQI= Date: Tue, 30 Dec 2025 12:33:36 -0800 From: Andrew Morton To: Michal Hocko Cc: Dipendra Khadka , David Rientjes , Shakeel Butt , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/oom_kill: Remove unnecessary integer promotion in format string Message-Id: <20251230123336.ef33f8a55df71f3e3f782532@linux-foundation.org> In-Reply-To: References: <20251228154456.2386-1-kdipendra88@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 29 Dec 2025 09:27:18 +0100 Michal Hocko 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 > > 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.