452-partitions-efi-apply-Linux-code-style.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. From d4e82837c8b86ff2c21fa923271908988bc72faa Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <[email protected]>
  3. Date: Mon, 7 Oct 2024 23:22:53 +0100
  4. Subject: [PATCH 3/8] partitions/efi: apply Linux code style
  5. Fix (mostly white space related) coding style issues in
  6. block/partitions/efi.c by use of clang-format.
  7. Signed-off-by: Daniel Golle <[email protected]>
  8. ---
  9. block/partitions/efi.c | 235 +++++++++++++++++++++--------------------
  10. 1 file changed, 121 insertions(+), 114 deletions(-)
  11. --- a/block/partitions/efi.c
  12. +++ b/block/partitions/efi.c
  13. @@ -95,15 +95,13 @@
  14. * the partition tables happens after init too.
  15. */
  16. static int force_gpt;
  17. -static int __init
  18. -force_gpt_fn(char *str)
  19. +static int __init force_gpt_fn(char *str)
  20. {
  21. force_gpt = 1;
  22. return 1;
  23. }
  24. __setup("gpt", force_gpt_fn);
  25. -
  26. /**
  27. * efi_crc32() - EFI version of crc32 function
  28. * @buf: buffer to calculate crc32 of
  29. @@ -116,8 +114,7 @@ __setup("gpt", force_gpt_fn);
  30. * Note, the EFI Specification, v1.02, has a reference to
  31. * Dr. Dobbs Journal, May 1994 (actually it's in May 1992).
  32. */
  33. -static inline u32
  34. -efi_crc32(const void *buf, unsigned long len)
  35. +static inline u32 efi_crc32(const void *buf, unsigned long len)
  36. {
  37. return (crc32(~0L, buf, len) ^ ~0L);
  38. }
  39. @@ -134,7 +131,8 @@ efi_crc32(const void *buf, unsigned long
  40. static u64 last_lba(struct gendisk *disk)
  41. {
  42. return div_u64(bdev_nr_bytes(disk->part0),
  43. - queue_logical_block_size(disk->queue)) - 1ULL;
  44. + queue_logical_block_size(disk->queue)) -
  45. + 1ULL;
  46. }
  47. static inline int pmbr_part_valid(gpt_mbr_record *part)
  48. @@ -195,7 +193,7 @@ static int is_pmbr_valid(legacy_mbr *mbr
  49. check_hybrid:
  50. for (i = 0; i < 4; i++)
  51. if ((mbr->partition_record[i].os_type !=
  52. - EFI_PMBR_OSTYPE_EFI_GPT) &&
  53. + EFI_PMBR_OSTYPE_EFI_GPT) &&
  54. (mbr->partition_record[i].os_type != 0x00))
  55. ret = GPT_MBR_HYBRID;
  56. @@ -213,10 +211,11 @@ check_hybrid:
  57. */
  58. if (ret == GPT_MBR_PROTECTIVE) {
  59. sz = le32_to_cpu(mbr->partition_record[part].size_in_lba);
  60. - if (sz != (uint32_t) total_sectors - 1 && sz != 0xFFFFFFFF)
  61. - pr_debug("GPT: mbr size in lba (%u) different than whole disk (%u).\n",
  62. - sz, min_t(uint32_t,
  63. - total_sectors - 1, 0xFFFFFFFF));
  64. + if (sz != (uint32_t)total_sectors - 1 && sz != 0xFFFFFFFF)
  65. + pr_debug(
  66. + "GPT: mbr size in lba (%u) different than whole disk (%u).\n",
  67. + sz,
  68. + min_t(uint32_t, total_sectors - 1, 0xFFFFFFFF));
  69. }
  70. done:
  71. return ret;
  72. @@ -232,15 +231,14 @@ done:
  73. * Description: Reads @count bytes from @state->disk into @buffer.
  74. * Returns number of bytes read on success, 0 on error.
  75. */
  76. -static size_t read_lba(struct parsed_partitions *state,
  77. - u64 lba, u8 *buffer, size_t count)
  78. +static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 *buffer,
  79. + size_t count)
  80. {
  81. size_t totalreadcount = 0;
  82. - sector_t n = lba *
  83. - (queue_logical_block_size(state->disk->queue) / 512);
  84. + sector_t n = lba * (queue_logical_block_size(state->disk->queue) / 512);
  85. if (!buffer || lba > last_lba(state->disk))
  86. - return 0;
  87. + return 0;
  88. while (count) {
  89. int copied = 512;
  90. @@ -253,7 +251,7 @@ static size_t read_lba(struct parsed_par
  91. memcpy(buffer, data, copied);
  92. put_dev_sector(sect);
  93. buffer += copied;
  94. - totalreadcount +=copied;
  95. + totalreadcount += copied;
  96. count -= copied;
  97. }
  98. return totalreadcount;
  99. @@ -278,17 +276,17 @@ static gpt_entry *alloc_read_gpt_entries
  100. return NULL;
  101. count = (size_t)le32_to_cpu(gpt->num_partition_entries) *
  102. - le32_to_cpu(gpt->sizeof_partition_entry);
  103. + le32_to_cpu(gpt->sizeof_partition_entry);
  104. if (!count)
  105. return NULL;
  106. pte = kmalloc(count, GFP_KERNEL);
  107. if (!pte)
  108. return NULL;
  109. - if (read_lba(state, le64_to_cpu(gpt->partition_entry_lba),
  110. - (u8 *) pte, count) < count) {
  111. + if (read_lba(state, le64_to_cpu(gpt->partition_entry_lba), (u8 *)pte,
  112. + count) < count) {
  113. kfree(pte);
  114. - pte=NULL;
  115. + pte = NULL;
  116. return NULL;
  117. }
  118. return pte;
  119. @@ -313,9 +311,9 @@ static gpt_header *alloc_read_gpt_header
  120. if (!gpt)
  121. return NULL;
  122. - if (read_lba(state, lba, (u8 *) gpt, ssz) < ssz) {
  123. + if (read_lba(state, lba, (u8 *)gpt, ssz) < ssz) {
  124. kfree(gpt);
  125. - gpt=NULL;
  126. + gpt = NULL;
  127. return NULL;
  128. }
  129. @@ -354,8 +352,9 @@ static int is_gpt_valid(struct parsed_pa
  130. /* Check the GUID Partition Table header size is too big */
  131. if (le32_to_cpu((*gpt)->header_size) >
  132. - queue_logical_block_size(state->disk->queue)) {
  133. - pr_debug("GUID Partition Table Header size is too large: %u > %u\n",
  134. + queue_logical_block_size(state->disk->queue)) {
  135. + pr_debug(
  136. + "GUID Partition Table Header size is too large: %u > %u\n",
  137. le32_to_cpu((*gpt)->header_size),
  138. queue_logical_block_size(state->disk->queue));
  139. goto fail;
  140. @@ -363,16 +362,17 @@ static int is_gpt_valid(struct parsed_pa
  141. /* Check the GUID Partition Table header size is too small */
  142. if (le32_to_cpu((*gpt)->header_size) < sizeof(gpt_header)) {
  143. - pr_debug("GUID Partition Table Header size is too small: %u < %zu\n",
  144. - le32_to_cpu((*gpt)->header_size),
  145. - sizeof(gpt_header));
  146. + pr_debug(
  147. + "GUID Partition Table Header size is too small: %u < %zu\n",
  148. + le32_to_cpu((*gpt)->header_size), sizeof(gpt_header));
  149. goto fail;
  150. }
  151. /* Check the GUID Partition Table CRC */
  152. origcrc = le32_to_cpu((*gpt)->header_crc32);
  153. (*gpt)->header_crc32 = 0;
  154. - crc = efi_crc32((const unsigned char *) (*gpt), le32_to_cpu((*gpt)->header_size));
  155. + crc = efi_crc32((const unsigned char *)(*gpt),
  156. + le32_to_cpu((*gpt)->header_size));
  157. if (crc != origcrc) {
  158. pr_debug("GUID Partition Table Header CRC is wrong: %x != %x\n",
  159. @@ -396,20 +396,25 @@ static int is_gpt_valid(struct parsed_pa
  160. lastlba = last_lba(state->disk);
  161. if (le64_to_cpu((*gpt)->first_usable_lba) > lastlba) {
  162. pr_debug("GPT: first_usable_lba incorrect: %lld > %lld\n",
  163. - (unsigned long long)le64_to_cpu((*gpt)->first_usable_lba),
  164. + (unsigned long long)le64_to_cpu(
  165. + (*gpt)->first_usable_lba),
  166. (unsigned long long)lastlba);
  167. goto fail;
  168. }
  169. if (le64_to_cpu((*gpt)->last_usable_lba) > lastlba) {
  170. pr_debug("GPT: last_usable_lba incorrect: %lld > %lld\n",
  171. - (unsigned long long)le64_to_cpu((*gpt)->last_usable_lba),
  172. + (unsigned long long)le64_to_cpu(
  173. + (*gpt)->last_usable_lba),
  174. (unsigned long long)lastlba);
  175. goto fail;
  176. }
  177. - if (le64_to_cpu((*gpt)->last_usable_lba) < le64_to_cpu((*gpt)->first_usable_lba)) {
  178. + if (le64_to_cpu((*gpt)->last_usable_lba) <
  179. + le64_to_cpu((*gpt)->first_usable_lba)) {
  180. pr_debug("GPT: last_usable_lba incorrect: %lld > %lld\n",
  181. - (unsigned long long)le64_to_cpu((*gpt)->last_usable_lba),
  182. - (unsigned long long)le64_to_cpu((*gpt)->first_usable_lba));
  183. + (unsigned long long)le64_to_cpu(
  184. + (*gpt)->last_usable_lba),
  185. + (unsigned long long)le64_to_cpu(
  186. + (*gpt)->first_usable_lba));
  187. goto fail;
  188. }
  189. /* Check that sizeof_partition_entry has the correct value */
  190. @@ -420,10 +425,11 @@ static int is_gpt_valid(struct parsed_pa
  191. /* Sanity check partition table size */
  192. pt_size = (u64)le32_to_cpu((*gpt)->num_partition_entries) *
  193. - le32_to_cpu((*gpt)->sizeof_partition_entry);
  194. + le32_to_cpu((*gpt)->sizeof_partition_entry);
  195. if (pt_size > KMALLOC_MAX_SIZE) {
  196. - pr_debug("GUID Partition Table is too large: %llu > %lu bytes\n",
  197. - (unsigned long long)pt_size, KMALLOC_MAX_SIZE);
  198. + pr_debug(
  199. + "GUID Partition Table is too large: %llu > %lu bytes\n",
  200. + (unsigned long long)pt_size, KMALLOC_MAX_SIZE);
  201. goto fail;
  202. }
  203. @@ -431,7 +437,7 @@ static int is_gpt_valid(struct parsed_pa
  204. goto fail;
  205. /* Check the GUID Partition Entry Array CRC */
  206. - crc = efi_crc32((const unsigned char *) (*ptes), pt_size);
  207. + crc = efi_crc32((const unsigned char *)(*ptes), pt_size);
  208. if (crc != le32_to_cpu((*gpt)->partition_entry_array_crc32)) {
  209. pr_debug("GUID Partition Entry Array CRC check failed.\n");
  210. @@ -441,10 +447,10 @@ static int is_gpt_valid(struct parsed_pa
  211. /* We're done, all's well */
  212. return 1;
  213. - fail_ptes:
  214. +fail_ptes:
  215. kfree(*ptes);
  216. *ptes = NULL;
  217. - fail:
  218. +fail:
  219. kfree(*gpt);
  220. *gpt = NULL;
  221. return 0;
  222. @@ -457,12 +463,11 @@ static int is_gpt_valid(struct parsed_pa
  223. *
  224. * Description: returns 1 if valid, 0 on error.
  225. */
  226. -static inline int
  227. -is_pte_valid(const gpt_entry *pte, const u64 lastlba)
  228. +static inline int is_pte_valid(const gpt_entry *pte, const u64 lastlba)
  229. {
  230. if ((!efi_guidcmp(pte->partition_type_guid, NULL_GUID)) ||
  231. - le64_to_cpu(pte->starting_lba) > lastlba ||
  232. - le64_to_cpu(pte->ending_lba) > lastlba)
  233. + le64_to_cpu(pte->starting_lba) > lastlba ||
  234. + le64_to_cpu(pte->ending_lba) > lastlba)
  235. return 0;
  236. return 1;
  237. }
  238. @@ -477,8 +482,7 @@ is_pte_valid(const gpt_entry *pte, const
  239. * and prints warnings on discrepancies.
  240. *
  241. */
  242. -static void
  243. -compare_gpts(gpt_header *pgpt, gpt_header *agpt, u64 lastlba)
  244. +static void compare_gpts(gpt_header *pgpt, gpt_header *agpt, u64 lastlba)
  245. {
  246. int error_found = 0;
  247. if (!pgpt || !agpt)
  248. @@ -486,31 +490,32 @@ compare_gpts(gpt_header *pgpt, gpt_heade
  249. if (le64_to_cpu(pgpt->my_lba) != le64_to_cpu(agpt->alternate_lba)) {
  250. pr_warn("GPT:Primary header LBA != Alt. header alternate_lba\n");
  251. pr_warn("GPT:%lld != %lld\n",
  252. - (unsigned long long)le64_to_cpu(pgpt->my_lba),
  253. - (unsigned long long)le64_to_cpu(agpt->alternate_lba));
  254. + (unsigned long long)le64_to_cpu(pgpt->my_lba),
  255. + (unsigned long long)le64_to_cpu(agpt->alternate_lba));
  256. error_found++;
  257. }
  258. if (le64_to_cpu(pgpt->alternate_lba) != le64_to_cpu(agpt->my_lba)) {
  259. pr_warn("GPT:Primary header alternate_lba != Alt. header my_lba\n");
  260. pr_warn("GPT:%lld != %lld\n",
  261. - (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
  262. - (unsigned long long)le64_to_cpu(agpt->my_lba));
  263. + (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
  264. + (unsigned long long)le64_to_cpu(agpt->my_lba));
  265. error_found++;
  266. }
  267. if (le64_to_cpu(pgpt->first_usable_lba) !=
  268. - le64_to_cpu(agpt->first_usable_lba)) {
  269. + le64_to_cpu(agpt->first_usable_lba)) {
  270. pr_warn("GPT:first_usable_lbas don't match.\n");
  271. pr_warn("GPT:%lld != %lld\n",
  272. - (unsigned long long)le64_to_cpu(pgpt->first_usable_lba),
  273. - (unsigned long long)le64_to_cpu(agpt->first_usable_lba));
  274. + (unsigned long long)le64_to_cpu(pgpt->first_usable_lba),
  275. + (unsigned long long)le64_to_cpu(
  276. + agpt->first_usable_lba));
  277. error_found++;
  278. }
  279. if (le64_to_cpu(pgpt->last_usable_lba) !=
  280. - le64_to_cpu(agpt->last_usable_lba)) {
  281. + le64_to_cpu(agpt->last_usable_lba)) {
  282. pr_warn("GPT:last_usable_lbas don't match.\n");
  283. pr_warn("GPT:%lld != %lld\n",
  284. - (unsigned long long)le64_to_cpu(pgpt->last_usable_lba),
  285. - (unsigned long long)le64_to_cpu(agpt->last_usable_lba));
  286. + (unsigned long long)le64_to_cpu(pgpt->last_usable_lba),
  287. + (unsigned long long)le64_to_cpu(agpt->last_usable_lba));
  288. error_found++;
  289. }
  290. if (efi_guidcmp(pgpt->disk_guid, agpt->disk_guid)) {
  291. @@ -518,27 +523,27 @@ compare_gpts(gpt_header *pgpt, gpt_heade
  292. error_found++;
  293. }
  294. if (le32_to_cpu(pgpt->num_partition_entries) !=
  295. - le32_to_cpu(agpt->num_partition_entries)) {
  296. + le32_to_cpu(agpt->num_partition_entries)) {
  297. pr_warn("GPT:num_partition_entries don't match: "
  298. - "0x%x != 0x%x\n",
  299. - le32_to_cpu(pgpt->num_partition_entries),
  300. - le32_to_cpu(agpt->num_partition_entries));
  301. + "0x%x != 0x%x\n",
  302. + le32_to_cpu(pgpt->num_partition_entries),
  303. + le32_to_cpu(agpt->num_partition_entries));
  304. error_found++;
  305. }
  306. if (le32_to_cpu(pgpt->sizeof_partition_entry) !=
  307. - le32_to_cpu(agpt->sizeof_partition_entry)) {
  308. + le32_to_cpu(agpt->sizeof_partition_entry)) {
  309. pr_warn("GPT:sizeof_partition_entry values don't match: "
  310. - "0x%x != 0x%x\n",
  311. - le32_to_cpu(pgpt->sizeof_partition_entry),
  312. - le32_to_cpu(agpt->sizeof_partition_entry));
  313. + "0x%x != 0x%x\n",
  314. + le32_to_cpu(pgpt->sizeof_partition_entry),
  315. + le32_to_cpu(agpt->sizeof_partition_entry));
  316. error_found++;
  317. }
  318. if (le32_to_cpu(pgpt->partition_entry_array_crc32) !=
  319. - le32_to_cpu(agpt->partition_entry_array_crc32)) {
  320. + le32_to_cpu(agpt->partition_entry_array_crc32)) {
  321. pr_warn("GPT:partition_entry_array_crc32 values don't match: "
  322. - "0x%x != 0x%x\n",
  323. - le32_to_cpu(pgpt->partition_entry_array_crc32),
  324. - le32_to_cpu(agpt->partition_entry_array_crc32));
  325. + "0x%x != 0x%x\n",
  326. + le32_to_cpu(pgpt->partition_entry_array_crc32),
  327. + le32_to_cpu(agpt->partition_entry_array_crc32));
  328. error_found++;
  329. }
  330. if (le64_to_cpu(pgpt->alternate_lba) != lastlba) {
  331. @@ -594,7 +599,7 @@ static int find_valid_gpt(struct parsed_
  332. return 0;
  333. lastlba = last_lba(state->disk);
  334. - if (!force_gpt) {
  335. + if (!force_gpt) {
  336. /* This will be added to the EFI Spec. per Intel after v1.02. */
  337. legacymbr = kzalloc(sizeof(*legacymbr), GFP_KERNEL);
  338. if (!legacymbr)
  339. @@ -608,18 +613,17 @@ static int find_valid_gpt(struct parsed_
  340. goto fail;
  341. pr_debug("Device has a %s MBR\n",
  342. - good_pmbr == GPT_MBR_PROTECTIVE ?
  343. - "protective" : "hybrid");
  344. + good_pmbr == GPT_MBR_PROTECTIVE ? "protective" :
  345. + "hybrid");
  346. }
  347. - good_pgpt = is_gpt_valid(state, GPT_PRIMARY_PARTITION_TABLE_LBA,
  348. - &pgpt, &pptes);
  349. - if (good_pgpt)
  350. - good_agpt = is_gpt_valid(state,
  351. - le64_to_cpu(pgpt->alternate_lba),
  352. - &agpt, &aptes);
  353. - if (!good_agpt && force_gpt)
  354. - good_agpt = is_gpt_valid(state, lastlba, &agpt, &aptes);
  355. + good_pgpt = is_gpt_valid(state, GPT_PRIMARY_PARTITION_TABLE_LBA, &pgpt,
  356. + &pptes);
  357. + if (good_pgpt)
  358. + good_agpt = is_gpt_valid(
  359. + state, le64_to_cpu(pgpt->alternate_lba), &agpt, &aptes);
  360. + if (!good_agpt && force_gpt)
  361. + good_agpt = is_gpt_valid(state, lastlba, &agpt, &aptes);
  362. if (!good_agpt && force_gpt && fops->alternative_gpt_sector) {
  363. sector_t agpt_sector;
  364. @@ -627,43 +631,42 @@ static int find_valid_gpt(struct parsed_
  365. err = fops->alternative_gpt_sector(disk, &agpt_sector);
  366. if (!err)
  367. - good_agpt = is_gpt_valid(state, agpt_sector,
  368. - &agpt, &aptes);
  369. + good_agpt =
  370. + is_gpt_valid(state, agpt_sector, &agpt, &aptes);
  371. }
  372. - /* The obviously unsuccessful case */
  373. - if (!good_pgpt && !good_agpt)
  374. - goto fail;
  375. -
  376. - compare_gpts(pgpt, agpt, lastlba);
  377. -
  378. - /* The good cases */
  379. - if (good_pgpt) {
  380. - *gpt = pgpt;
  381. - *ptes = pptes;
  382. - kfree(agpt);
  383. - kfree(aptes);
  384. + /* The obviously unsuccessful case */
  385. + if (!good_pgpt && !good_agpt)
  386. + goto fail;
  387. +
  388. + compare_gpts(pgpt, agpt, lastlba);
  389. +
  390. + /* The good cases */
  391. + if (good_pgpt) {
  392. + *gpt = pgpt;
  393. + *ptes = pptes;
  394. + kfree(agpt);
  395. + kfree(aptes);
  396. if (!good_agpt)
  397. - pr_warn("Alternate GPT is invalid, using primary GPT.\n");
  398. - return 1;
  399. - }
  400. - else if (good_agpt) {
  401. - *gpt = agpt;
  402. - *ptes = aptes;
  403. - kfree(pgpt);
  404. - kfree(pptes);
  405. + pr_warn("Alternate GPT is invalid, using primary GPT.\n");
  406. + return 1;
  407. + } else if (good_agpt) {
  408. + *gpt = agpt;
  409. + *ptes = aptes;
  410. + kfree(pgpt);
  411. + kfree(pptes);
  412. pr_warn("Primary GPT is invalid, using alternate GPT.\n");
  413. - return 1;
  414. - }
  415. + return 1;
  416. + }
  417. - fail:
  418. - kfree(pgpt);
  419. - kfree(agpt);
  420. - kfree(pptes);
  421. - kfree(aptes);
  422. - *gpt = NULL;
  423. - *ptes = NULL;
  424. - return 0;
  425. +fail:
  426. + kfree(pgpt);
  427. + kfree(agpt);
  428. + kfree(pptes);
  429. + kfree(aptes);
  430. + *gpt = NULL;
  431. + *ptes = NULL;
  432. + return 0;
  433. }
  434. /**
  435. @@ -725,7 +728,9 @@ int efi_partition(struct parsed_partitio
  436. pr_debug("GUID Partition Table is valid! Yea!\n");
  437. - for (i = 0; i < le32_to_cpu(gpt->num_partition_entries) && i < state->limit-1; i++) {
  438. + for (i = 0; i < le32_to_cpu(gpt->num_partition_entries) &&
  439. + i < state->limit - 1;
  440. + i++) {
  441. struct partition_meta_info *info;
  442. unsigned label_max;
  443. u64 start = le64_to_cpu(ptes[i].starting_lba);
  444. @@ -735,10 +740,11 @@ int efi_partition(struct parsed_partitio
  445. if (!is_pte_valid(&ptes[i], last_lba(state->disk)))
  446. continue;
  447. - put_partition(state, i+1, start * ssz, size * ssz);
  448. + put_partition(state, i + 1, start * ssz, size * ssz);
  449. /* If this is a RAID volume, tell md */
  450. - if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_RAID_GUID))
  451. + if (!efi_guidcmp(ptes[i].partition_type_guid,
  452. + PARTITION_LINUX_RAID_GUID))
  453. state->parts[i + 1].flags = ADDPART_FLAG_RAID;
  454. info = &state->parts[i + 1].info;
  455. @@ -747,7 +753,8 @@ int efi_partition(struct parsed_partitio
  456. /* Naively convert UTF16-LE to 7 bits. */
  457. label_max = min(ARRAY_SIZE(info->volname) - 1,
  458. ARRAY_SIZE(ptes[i].partition_name));
  459. - utf16_le_to_7bit(ptes[i].partition_name, label_max, info->volname);
  460. + utf16_le_to_7bit(ptes[i].partition_name, label_max,
  461. + info->volname);
  462. state->parts[i + 1].has_info = true;
  463. }
  464. kfree(ptes);