[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200108133926.GC4455@infradead.org>
Date: Wed, 8 Jan 2020 05:39:26 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Nikolai Merinov <n.merinov@...ngo-systems.com>
Cc: Davidlohr Bueso <dave@...olabs.net>, Jens Axboe <axboe@...nel.dk>,
linux-efi@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] partitions/efi: Fix partition name parsing in GUID
partition entry
> 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.
Powered by blists - more mailing lists