Skip to content

Commit bb80ead

Browse files
damien-lemoalkawasaki
authored andcommitted
block: improve blk_op_str() comment
Replace XXX with what it actually means. Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent 6715fae commit bb80ead

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

block/blk-core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ static const char *const blk_op_name[] = {
114114
#undef REQ_OP_NAME
115115

116116
/**
117-
* blk_op_str - Return string XXX in the REQ_OP_XXX.
118-
* @op: REQ_OP_XXX.
117+
* blk_op_str - Return the string "name" for an operation REQ_OP_name.
118+
* @op: a request operation.
119119
*
120-
* Description: Centralize block layer function to convert REQ_OP_XXX into
121-
* string format. Useful in the debugging and tracing bio or request. For
122-
* invalid REQ_OP_XXX it returns string "UNKNOWN".
120+
* Convert a request operation REQ_OP_name into the string "name". Useful for
121+
* debugging and tracing BIOs and requests. For an invalid request operation
122+
* code, the string "UNKNOWN" is returned.
123123
*/
124124
inline const char *blk_op_str(enum req_op op)
125125
{

include/linux/blkdev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ extern int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags);
10261026
extern void blk_queue_exit(struct request_queue *q);
10271027
extern void blk_sync_queue(struct request_queue *q);
10281028

1029-
/* Helper to convert REQ_OP_XXX to its string format XXX */
1029+
/* Convert a request operation REQ_OP_name into the string "name" */
10301030
extern const char *blk_op_str(enum req_op op);
10311031

10321032
int blk_status_to_errno(blk_status_t status);

0 commit comments

Comments
 (0)