On 07/10/2019 17:46, David Sterba wrote: [...] >> nit: This function is used only once and the ARRAY_SIZE() macro is >> descriptive enough, why not just remove it and opencoude the call to >> array_size > > Agreed, ARRAY_SIZE in loops is fine, it's a compile-time constant.
Nope, btrfs_csums[] is defined in ctree.c, so I can't get the size of this array outside of ctree.c. And it was moved to ctree.c from ctree.h on request by David. -- Johannes Thumshirn SUSE Labs Filesystems jthumsh...@suse.de +49 911 74053 689 SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nürnberg Germany (HRB 247165, AG München) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850