Re: [PATCH v2] partitions/efi: Fix partition name parsing in GUID partition entry

From: Christoph Hellwig
Date: Wed Jan 08 2020 - 08:39:29 EST


> index db2fef7dfc47..51287a8a3bea 100644
> --- a/block/partitions/efi.c
> +++ b/block/partitions/efi.c
> @@ -715,7 +715,7 @@ int efi_partition(struct parsed_partitions *state)
> ARRAY_SIZE(ptes[i].partition_name));
> info->volname[label_max] = 0;
> while (label_count < label_max) {
> - u8 c = ptes[i].partition_name[label_count] & 0xff;
> + u8 c = le16_to_cpu(ptes[i].partition_name[label_count]) & 0xff;
> if (c && !isprint(c))
> c = '!';
>
This adds an overly long line. Please add a an efi_char_from_cpu or
similarly named helper to encapsulate this logic.

Otherwise the change looks good.