lkml.org 
[lkml]   [2019]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 10/13] exfat: add nls operations
From
Date

> +++ b/fs/exfat/nls.c

> +static int exfat_load_upcase_table(struct super_block *sb,
> + sector_t sector, unsigned long long num_sectors,
> + unsigned int utbl_checksum)
> +{

> + unsigned int i, index = 0, checksum = 0;

> + checksum = ((checksum & 1) ? 0x80000000 : 0) +
> + (checksum >> 1) +
> + *(((unsigned char *)bh->b_data) + (i + 1));

> + if (index >= 0xFFFF && utbl_checksum == checksum)
> + return 0;

* Can it be that a type other than “int” would be more portable
for the desired data processing at these source code places?

* How do you think about to use more meaningful identifiers for
two of the shown literals?

Regards,
Markus

\
 
 \ /
  Last update: 2019-11-25 09:52    [W:0.262 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site