* [PATCH] bcachefs: Use str_write_read() helper in ec_block_endio()
@ 2024-10-20 11:20 Thorsten Blum
2024-10-20 22:59 ` Kent Overstreet
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-10-20 11:20 UTC (permalink / raw)
To: Kent Overstreet; +Cc: Thorsten Blum, linux-bcachefs, linux-kernel
Remove hard-coded strings by using the helper function str_write_read().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
fs/bcachefs/ec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index e410cfe37b1a..26b1664adb4d 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -26,6 +26,7 @@
#include "util.h"
#include <linux/sort.h>
+#include <linux/string_choices.h>
#ifdef __KERNEL__
@@ -732,7 +733,7 @@ static void ec_block_endio(struct bio *bio)
? BCH_MEMBER_ERROR_write
: BCH_MEMBER_ERROR_read,
"erasure coding %s error: %s",
- bio_data_dir(bio) ? "write" : "read",
+ str_write_read(bio_data_dir(bio)),
bch2_blk_status_to_str(bio->bi_status)))
clear_bit(ec_bio->idx, ec_bio->buf->valid);
--
2.47.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bcachefs: Use str_write_read() helper in ec_block_endio()
2024-10-20 11:20 [PATCH] bcachefs: Use str_write_read() helper in ec_block_endio() Thorsten Blum
@ 2024-10-20 22:59 ` Kent Overstreet
0 siblings, 0 replies; 2+ messages in thread
From: Kent Overstreet @ 2024-10-20 22:59 UTC (permalink / raw)
To: Thorsten Blum; +Cc: linux-bcachefs, linux-kernel
On Sun, Oct 20, 2024 at 01:20:46PM +0200, Thorsten Blum wrote:
> Remove hard-coded strings by using the helper function str_write_read().
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-20 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20 11:20 [PATCH] bcachefs: Use str_write_read() helper in ec_block_endio() Thorsten Blum
2024-10-20 22:59 ` Kent Overstreet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).