From: Dipendra Khadka <kdipendra88@gmail.com>
To: dhowells@redhat.com, marc.dionne@auristor.com
Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
kdipendra88@gmail.com
Subject: [PATCH] fs/afs: Remove unnecessary integer promotion in format strings
Date: Fri, 2 Jan 2026 11:57:40 +0000 [thread overview]
Message-ID: <20260102115749.43639-1-kdipendra88@gmail.com> (raw)
Remove 'h' length modifier from printk format strings where integer
promotion makes it redundant. When short integers are passed to
variadic functions like pr_notice(), they are automatically promoted
to int, making the 'h' modifier unnecessary.
This addresses checkpatch warnings:
WARNING: Integer promotion: Using 'h' in '%hd' is unnecessary
WARNING: Integer promotion: Using 'h' in '%hx' is unnecessary
WARNING: Integer promotion: Using 'h' in '%hu' is unnecessary
Changes:
- fs/afs/rotate.c: %hd → %d, %hx → %x
- fs/afs/vl_rotate.c: %hu → %u, %hx → %x, %hd → %d
Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
---
fs/afs/rotate.c | 4 ++--
fs/afs/vl_rotate.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c
index 6a4e7da10fc4..9c8dc6911b9b 100644
--- a/fs/afs/rotate.c
+++ b/fs/afs/rotate.c
@@ -724,7 +724,7 @@ void afs_dump_edestaddrreq(const struct afs_operation *op)
rcu_read_lock();
pr_notice("EDESTADDR occurred\n");
- pr_notice("OP: cbb=%x cbb2=%x fl=%x err=%hd\n",
+ pr_notice("OP: cbb=%x cbb2=%x fl=%x err=%d\n",
op->file[0].cb_break_before,
op->file[1].cb_break_before, op->flags, op->cumul_error.error);
pr_notice("OP: ut=%lx ix=%d ni=%u\n",
@@ -735,7 +735,7 @@ void afs_dump_edestaddrreq(const struct afs_operation *op)
if (op->server_list) {
const struct afs_server_list *sl = op->server_list;
- pr_notice("FC: SL nr=%u vnov=%hx\n",
+ pr_notice("FC: SL nr=%u vnov=%x\n",
sl->nr_servers, sl->vnovol_mask);
for (i = 0; i < sl->nr_servers; i++) {
const struct afs_server *s = sl->servers[i].server;
diff --git a/fs/afs/vl_rotate.c b/fs/afs/vl_rotate.c
index 6ad9688d8f4b..fe4d41cb9ba5 100644
--- a/fs/afs/vl_rotate.c
+++ b/fs/afs/vl_rotate.c
@@ -336,7 +336,7 @@ static void afs_vl_dump_edestaddrreq(const struct afs_vl_cursor *vc)
pr_notice("CELL: %s err=%d\n", cell->name, cell->error);
pr_notice("DNS: src=%u st=%u lc=%x\n",
cell->dns_source, cell->dns_status, cell->dns_lookup_count);
- pr_notice("VC: ut=%lx ix=%u ni=%hu fl=%hx err=%hd\n",
+ pr_notice("VC: ut=%lx ix=%u ni=%u fl=%x err=%d\n",
vc->untried_servers, vc->server_index, vc->nr_iterations,
vc->flags, vc->cumul_error.error);
pr_notice("VC: call er=%d ac=%d r=%u\n",
@@ -348,7 +348,7 @@ static void afs_vl_dump_edestaddrreq(const struct afs_vl_cursor *vc)
sl->nr_servers, sl->index);
for (i = 0; i < sl->nr_servers; i++) {
const struct afs_vlserver *s = sl->servers[i].server;
- pr_notice("VC: server %s+%hu fl=%lx E=%hd\n",
+ pr_notice("VC: server %s+%u fl=%lx E=%d\n",
s->name, s->port, s->flags, s->probe.error);
if (s->addresses) {
const struct afs_addr_list *a =
--
2.43.0
next reply other threads:[~2026-01-02 11:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 11:57 Dipendra Khadka [this message]
2026-01-02 22:40 ` David Laight
2026-01-03 9:05 ` 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=20260102115749.43639-1-kdipendra88@gmail.com \
--to=kdipendra88@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.dionne@auristor.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
all inboxes | Powered by JetHome®