Skip to content

Commit

Permalink
block: use FIELD_SIZEOF to calculate size of a field
Browse files Browse the repository at this point in the history
use FIELD_SIZEOF instead of open coding

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Maninder Singh authored and Jens Axboe committed Jul 7, 2015
1 parent bb8bd38 commit 0762b23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3370,7 +3370,7 @@ EXPORT_SYMBOL(blk_post_runtime_resume);
int __init blk_dev_init(void)
{
BUILD_BUG_ON(__REQ_NR_BITS > 8 *
sizeof(((struct request *)0)->cmd_flags));
FIELD_SIZEOF(struct request, cmd_flags));

/* used for unplugging and affects IO latency/throughput - HIGHPRI */
kblockd_workqueue = alloc_workqueue("kblockd",
Expand Down

0 comments on commit 0762b23

Please sign in to comment.