On Mon, May 27, 2019 at 06:57:19PM +0200, David Sterba wrote: > I think the helper is not needed at all, the format "%*phN" can be used > for crc32c too without the intermediate buffers. For better readability, > some macros can be added like > > "this is wrong csum " CSUM_FORMAT " end of string", > CSUM_FORMAT_VALUE(csum_size, csum_bytes) > > with CSUM_FORMAT "0x%*phN" and > CSUM_FORMAT_VALUE(size, bytes) size, bytes > > ie. just for the explict requirement of the variable length required by > "*". Good idea, will be updating the patch. -- Johannes Thumshirn SUSE Labs Filesystems jthumshirn@xxxxxxx +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
