public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] block: use FIELD_SIZEOF to calculate size of a field
@ 2015-07-07  7:11 Maninder Singh
  2015-07-07 13:48 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Maninder Singh @ 2015-07-07  7:11 UTC (permalink / raw)
  To: axboe, linux-kernel; +Cc: pankaj.m, Maninder Singh

use FIELD_SIZEOF instead of open coding

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
---
 block/blk-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 688ae94..5a9792e 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -3298,7 +3298,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",
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-07 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-07  7:11 [PATCH 1/1] block: use FIELD_SIZEOF to calculate size of a field Maninder Singh
2015-07-07 13:48 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox