lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 07 Jul 2015 07:48:00 -0600
From:	Jens Axboe <axboe@...nel.dk>
To:	Maninder Singh <maninder1.s@...sung.com>,
	linux-kernel@...r.kernel.org
CC:	pankaj.m@...sung.com
Subject: Re: [PATCH 1/1] block: use FIELD_SIZEOF to calculate size of a field

On 07/07/2015 01:11 AM, Maninder Singh wrote:
> use FIELD_SIZEOF instead of open coding
>
> Signed-off-by: Maninder Singh <maninder1.s@...sung.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",

Applied, thanks.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ