All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis Efremov (Oracle)" <efremov@linux.com>
To: linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Denis Efremov (Oracle)" <efremov@linux.com>
Subject: [PATCH] floppy: fix the message printed by floppy_set_flags()
Date: Sat, 10 Oct 2026 15:15:25 +0400	[thread overview]
Message-ID: <20261010111525.1337458-1-efremov@linux.com> (raw)

floppy_set_flags() sets the flag in param2 when param is non-zero and
clears it otherwise, but its message picks "Setting" or "Clearing" from
param2 and prints param as the flag. So floppy=thinkpad prints "Setting
flag 0x1", and floppy=0,thinkpad prints "Setting flag 0x0" while it
clears FD_INVERTED_DCL.

Swap the two arguments, so that these print "Setting flag 0x80" and
"Clearing flag 0x80".

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Denis Efremov (Oracle) <efremov@linux.com>
---
 drivers/block/floppy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index f04397b8e381..b6f73a11bff4 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4321,7 +4321,7 @@ static void __init floppy_set_flags(int *ints, int param, int param2)
 		else
 			default_drive_params[i].params.flags &= ~param2;
 	}
-	DPRINT("%s flag 0x%x\n", param2 ? "Setting" : "Clearing", param);
+	DPRINT("%s flag 0x%x\n", param ? "Setting" : "Clearing", param2);
 }
 
 static void __init daring(int *ints, int param, int param2)

base-commit: 3857c2fe5449541e24afc5efdb0f81a8a8f9a3a0
-- 
2.56.0


                 reply	other threads:[~2026-10-10 11:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261010111525.1337458-1-efremov@linux.com \
    --to=efremov@linux.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.