Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757526AbbGGNsX (ORCPT ); Tue, 7 Jul 2015 09:48:23 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:35713 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757499AbbGGNsD (ORCPT ); Tue, 7 Jul 2015 09:48:03 -0400 Message-ID: <559BD890.107@kernel.dk> Date: Tue, 07 Jul 2015 07:48:00 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Maninder Singh , linux-kernel@vger.kernel.org CC: pankaj.m@samsung.com Subject: Re: [PATCH 1/1] block: use FIELD_SIZEOF to calculate size of a field References: <1436253067-22962-1-git-send-email-maninder1.s@samsung.com> In-Reply-To: <1436253067-22962-1-git-send-email-maninder1.s@samsung.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1018 Lines: 32 On 07/07/2015 01:11 AM, Maninder Singh wrote: > 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", Applied, thanks. -- Jens Axboe -- 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/