Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755695AbbGGHMK (ORCPT ); Tue, 7 Jul 2015 03:12:10 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:36679 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbbGGHLf (ORCPT ); Tue, 7 Jul 2015 03:11:35 -0400 X-AuditID: cbfee691-f79ca6d00000456a-87-559b7ba5a9ad From: Maninder Singh To: axboe@kernel.dk, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] block: use FIELD_SIZEOF to calculate size of a field Date: Tue, 07 Jul 2015 12:41:07 +0530 Message-id: <1436253067-22962-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKLMWRmVeSWpSXmKPExsWyRsSkSndp9exQg3V3rSxW3+1ns7i8aw6b xeH5bSwW995sZXJg8bh8ttSjb8sqRo/Pm+QCmKO4bFJSczLLUov07RK4MnY9O8pSsJa1Ytb0 W4wNjDtZuhg5OSQETCTaeu+yQ9hiEhfurWfrYuTgEBJYyigxwRqmZMOp1cwgtpDAIkaJj9ds uhi5gOyfjBLPXv4C62UT0JNYtWsP2EwRAUOJxqWTweYwCzhJTP+qBxIWFvCUePN4LRuIzSKg KtH+6TlYOa+Au8SP4w0sIOUSAgoScyaBjZcQuM4m8e52HyNEvYDEt8mHoGpkJTYdYIY4TVLi 4IobLBMYBRcwMqxiFE0tSC4oTkovMtUrTswtLs1L10vOz93ECAy90/+eTdzBeP+A9SFGAQ5G JR7eGxKzQ4VYE8uKK3MPMZoCbZjILCWanA8M8LySeENjMyMLUxNTYyNzSzMlcV4d6Z/BQgLp iSWp2ampBalF8UWlOanFhxiZODilGhinWZ3dLfeW55J4xeU9/PyVaumvNqbUBZrq/Poe8CiW 5fnCDqVbkpoKpr43tvErbOVP2nurftKUjl+9/lc2ZsTHP0s75TvrhJNTfUSU1lfFJZ+PpNzd 56276VClz+e3kzP6z87qvPIwhfX8ft/fRUa3Oha92/vzVr9x/lppS64bN9svsq7atMZHiaU4 I9FQi7moOBEAY/7fETgCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsVy+t9jAd2l1bNDDeb+N7BYfbefzeLyrjls Fofnt7FY3HuzlcmBxePy2VKPvi2rGD0+b5ILYI5qYLTJSE1MSS1SSM1Lzk/JzEu3VfIOjneO NzUzMNQ1tLQwV1LIS8xNtVVy8QnQdcvMAdqmpFCWmFMKFApILC5W0rfDNCE0xE3XAqYxQtc3 JAiux8gADSSsYczY9ewoS8Fa1opZ028xNjDuZOli5OSQEDCR2HBqNTOELSZx4d56NhBbSGAR o8THazZdjFxA9k9GiWcvf7GDJNgE9CRW7doD1iwiYCjRuHQyUAMHB7OAk8T0r3ogYWEBT4k3 j9eCzWERUJVo//QcrJxXwF3ix/EGFpByCQEFiTmTbCYwci9gZFjFKJpakFxQnJSea6RXnJhb XJqXrpecn7uJERzcz6R3MK5qsDjEKMDBqMTDe1NidqgQa2JZcWXuIUYJDmYlEV7dUqAQb0pi ZVVqUX58UWlOavEhRlOg5ROZpUST84GRl1cSb2hsYm5qbGppYmFiZqkkznsy3ydUSCA9sSQ1 OzW1ILUIpo+Jg1OqgTGAh3W3iEvP/FKGH3OjHe+t+vC4s7rQIu8/u+DiM6ENxpaiW3b6ty87 EZS6T7/GfEUXPyvXjKKea5Nqnsmf5NurskyMTTLfLOz1pL1HDi/mCm7fytGnm/rcKv8Sw7/i 1Tdd3n6Tt9PO/eLelGf3L+J3pdiG/svJjrVHt4j2xcxMWzO18MpPcyWW4oxEQy3mouJEAKnY 6QCEAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 907 Lines: 28 use FIELD_SIZEOF instead of open coding Signed-off-by: Maninder Singh --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/