0007-video-Remove-trailing-whitespaces.patch 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. From 1faa412c502c7c4ca1230fc152be30b88847fdd2 Mon Sep 17 00:00:00 2001
  2. From: Elyes Haouas <ehaouas@noos.fr>
  3. Date: Fri, 4 Mar 2022 07:42:13 +0100
  4. Subject: [PATCH] video: Remove trailing whitespaces
  5. Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
  6. Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
  7. Upstream: 1f48917d8ddb490dcdc70176e0f58136b7f7811a
  8. [Thomas: needed to backport patches fixing CVEs in the video code]
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  10. ---
  11. grub-core/video/bochs.c | 2 +-
  12. grub-core/video/capture.c | 2 +-
  13. grub-core/video/cirrus.c | 4 ++--
  14. grub-core/video/coreboot/cbfb.c | 2 +-
  15. grub-core/video/efi_gop.c | 22 +++++++++----------
  16. grub-core/video/fb/fbblit.c | 8 +++----
  17. grub-core/video/fb/video_fb.c | 10 ++++-----
  18. grub-core/video/i386/pc/vbe.c | 34 ++++++++++++++---------------
  19. grub-core/video/i386/pc/vga.c | 6 ++---
  20. grub-core/video/ieee1275.c | 4 ++--
  21. grub-core/video/radeon_fuloong2e.c | 6 ++---
  22. grub-core/video/radeon_yeeloong3a.c | 6 ++---
  23. grub-core/video/readers/png.c | 2 +-
  24. grub-core/video/readers/tga.c | 2 +-
  25. grub-core/video/sis315_init.c | 2 +-
  26. grub-core/video/sis315pro.c | 8 +++----
  27. grub-core/video/sm712.c | 10 ++++-----
  28. grub-core/video/video.c | 8 +++----
  29. 18 files changed, 69 insertions(+), 69 deletions(-)
  30. diff --git a/grub-core/video/bochs.c b/grub-core/video/bochs.c
  31. index 30ea1bd82..edc651697 100644
  32. --- a/grub-core/video/bochs.c
  33. +++ b/grub-core/video/bochs.c
  34. @@ -212,7 +212,7 @@ find_card (grub_pci_device_t dev, grub_pci_id_t pciid, void *data)
  35. if (((class >> 16) & 0xffff) != 0x0300 || pciid != 0x11111234)
  36. return 0;
  37. -
  38. +
  39. addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
  40. framebuffer.base = grub_pci_read (addr) & GRUB_PCI_ADDR_MEM_MASK;
  41. if (!framebuffer.base)
  42. diff --git a/grub-core/video/capture.c b/grub-core/video/capture.c
  43. index 4d3195e01..c653d89f9 100644
  44. --- a/grub-core/video/capture.c
  45. +++ b/grub-core/video/capture.c
  46. @@ -92,7 +92,7 @@ grub_video_capture_start (const struct grub_video_mode_info *mode_info,
  47. framebuffer.ptr = grub_calloc (framebuffer.mode_info.height, framebuffer.mode_info.pitch);
  48. if (!framebuffer.ptr)
  49. return grub_errno;
  50. -
  51. +
  52. err = grub_video_fb_create_render_target_from_pointer (&framebuffer.render_target,
  53. &framebuffer.mode_info,
  54. framebuffer.ptr);
  55. diff --git a/grub-core/video/cirrus.c b/grub-core/video/cirrus.c
  56. index e2149e8ce..f5542ccdc 100644
  57. --- a/grub-core/video/cirrus.c
  58. +++ b/grub-core/video/cirrus.c
  59. @@ -354,11 +354,11 @@ grub_video_cirrus_setup (unsigned int width, unsigned int height,
  60. grub_uint8_t sr_ext = 0, hidden_dac = 0;
  61. grub_vga_set_geometry (&config, grub_vga_cr_write);
  62. -
  63. +
  64. grub_vga_gr_write (GRUB_VGA_GR_MODE_256_COLOR | GRUB_VGA_GR_MODE_READ_MODE1,
  65. GRUB_VGA_GR_MODE);
  66. grub_vga_gr_write (GRUB_VGA_GR_GR6_GRAPHICS_MODE, GRUB_VGA_GR_GR6);
  67. -
  68. +
  69. grub_vga_sr_write (GRUB_VGA_SR_MEMORY_MODE_NORMAL, GRUB_VGA_SR_MEMORY_MODE);
  70. grub_vga_cr_write ((config.pitch >> CIRRUS_CR_EXTENDED_DISPLAY_PITCH_SHIFT)
  71. diff --git a/grub-core/video/coreboot/cbfb.c b/grub-core/video/coreboot/cbfb.c
  72. index 9af81fa5b..986003c51 100644
  73. --- a/grub-core/video/coreboot/cbfb.c
  74. +++ b/grub-core/video/coreboot/cbfb.c
  75. @@ -106,7 +106,7 @@ grub_video_cbfb_setup (unsigned int width, unsigned int height,
  76. grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
  77. grub_video_fbstd_colors);
  78. -
  79. +
  80. return err;
  81. }
  82. diff --git a/grub-core/video/efi_gop.c b/grub-core/video/efi_gop.c
  83. index b7590dc6c..7a5054631 100644
  84. --- a/grub-core/video/efi_gop.c
  85. +++ b/grub-core/video/efi_gop.c
  86. @@ -273,7 +273,7 @@ grub_video_gop_iterate (int (*hook) (const struct grub_video_mode_info *info, vo
  87. grub_efi_status_t status;
  88. struct grub_efi_gop_mode_info *info = NULL;
  89. struct grub_video_mode_info mode_info;
  90. -
  91. +
  92. status = efi_call_4 (gop->query_mode, gop, mode, &size, &info);
  93. if (status)
  94. @@ -390,7 +390,7 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
  95. found = 1;
  96. }
  97. }
  98. -
  99. +
  100. if (!found)
  101. {
  102. unsigned mode;
  103. @@ -399,7 +399,7 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
  104. {
  105. grub_efi_uintn_t size;
  106. grub_efi_status_t status;
  107. -
  108. +
  109. status = efi_call_4 (gop->query_mode, gop, mode, &size, &info);
  110. if (status)
  111. {
  112. @@ -472,11 +472,11 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
  113. framebuffer.ptr = (void *) (grub_addr_t) gop->mode->fb_base;
  114. framebuffer.offscreen
  115. = grub_malloc (framebuffer.mode_info.height
  116. - * framebuffer.mode_info.width
  117. + * framebuffer.mode_info.width
  118. * sizeof (struct grub_efi_gop_blt_pixel));
  119. buffer = framebuffer.offscreen;
  120. -
  121. +
  122. if (!buffer)
  123. {
  124. grub_dprintf ("video", "GOP: couldn't allocate shadow\n");
  125. @@ -485,11 +485,11 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
  126. &framebuffer.mode_info);
  127. buffer = framebuffer.ptr;
  128. }
  129. -
  130. +
  131. grub_dprintf ("video", "GOP: initialising FB @ %p %dx%dx%d\n",
  132. framebuffer.ptr, framebuffer.mode_info.width,
  133. framebuffer.mode_info.height, framebuffer.mode_info.bpp);
  134. -
  135. +
  136. err = grub_video_fb_create_render_target_from_pointer
  137. (&framebuffer.render_target, &framebuffer.mode_info, buffer);
  138. @@ -498,15 +498,15 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
  139. grub_dprintf ("video", "GOP: Couldn't create FB target\n");
  140. return err;
  141. }
  142. -
  143. +
  144. err = grub_video_fb_set_active_render_target (framebuffer.render_target);
  145. -
  146. +
  147. if (err)
  148. {
  149. grub_dprintf ("video", "GOP: Couldn't set FB target\n");
  150. return err;
  151. }
  152. -
  153. +
  154. err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
  155. grub_video_fbstd_colors);
  156. @@ -514,7 +514,7 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
  157. grub_dprintf ("video", "GOP: Couldn't set palette\n");
  158. else
  159. grub_dprintf ("video", "GOP: Success\n");
  160. -
  161. +
  162. return err;
  163. }
  164. diff --git a/grub-core/video/fb/fbblit.c b/grub-core/video/fb/fbblit.c
  165. index d55924837..1010ef393 100644
  166. --- a/grub-core/video/fb/fbblit.c
  167. +++ b/grub-core/video/fb/fbblit.c
  168. @@ -466,7 +466,7 @@ grub_video_fbblit_replace_24bit_indexa (struct grub_video_fbblit_info *dst,
  169. for (i = 0; i < width; i++)
  170. {
  171. register grub_uint32_t col;
  172. - if (*srcptr == 0xf0)
  173. + if (*srcptr == 0xf0)
  174. col = palette[16];
  175. else
  176. col = palette[*srcptr & 0xf];
  177. @@ -478,7 +478,7 @@ grub_video_fbblit_replace_24bit_indexa (struct grub_video_fbblit_info *dst,
  178. *dstptr++ = col >> 0;
  179. *dstptr++ = col >> 8;
  180. *dstptr++ = col >> 16;
  181. -#endif
  182. +#endif
  183. srcptr++;
  184. }
  185. @@ -651,7 +651,7 @@ grub_video_fbblit_blend_24bit_indexa (struct grub_video_fbblit_info *dst,
  186. for (i = 0; i < width; i++)
  187. {
  188. register grub_uint32_t col;
  189. - if (*srcptr != 0xf0)
  190. + if (*srcptr != 0xf0)
  191. {
  192. col = palette[*srcptr & 0xf];
  193. #ifdef GRUB_CPU_WORDS_BIGENDIAN
  194. @@ -662,7 +662,7 @@ grub_video_fbblit_blend_24bit_indexa (struct grub_video_fbblit_info *dst,
  195. *dstptr++ = col >> 0;
  196. *dstptr++ = col >> 8;
  197. *dstptr++ = col >> 16;
  198. -#endif
  199. +#endif
  200. }
  201. else
  202. dstptr += 3;
  203. diff --git a/grub-core/video/fb/video_fb.c b/grub-core/video/fb/video_fb.c
  204. index ae6b89f9a..fa4ebde26 100644
  205. --- a/grub-core/video/fb/video_fb.c
  206. +++ b/grub-core/video/fb/video_fb.c
  207. @@ -754,7 +754,7 @@ grub_video_fb_unmap_color_int (struct grub_video_fbblit_info * source,
  208. *alpha = 0;
  209. return;
  210. }
  211. -
  212. +
  213. /* If we have an out-of-bounds color, return transparent black. */
  214. if (color > 255)
  215. {
  216. @@ -1141,7 +1141,7 @@ grub_video_fb_scroll (grub_video_color_t color, int dx, int dy)
  217. /* If everything is aligned on 32-bit use 32-bit copy. */
  218. if ((grub_addr_t) grub_video_fb_get_video_ptr (&target, src_x, src_y)
  219. % sizeof (grub_uint32_t) == 0
  220. - && (grub_addr_t) grub_video_fb_get_video_ptr (&target, dst_x, dst_y)
  221. + && (grub_addr_t) grub_video_fb_get_video_ptr (&target, dst_x, dst_y)
  222. % sizeof (grub_uint32_t) == 0
  223. && linelen % sizeof (grub_uint32_t) == 0
  224. && linedelta % sizeof (grub_uint32_t) == 0)
  225. @@ -1155,7 +1155,7 @@ grub_video_fb_scroll (grub_video_color_t color, int dx, int dy)
  226. else if ((grub_addr_t) grub_video_fb_get_video_ptr (&target, src_x, src_y)
  227. % sizeof (grub_uint16_t) == 0
  228. && (grub_addr_t) grub_video_fb_get_video_ptr (&target,
  229. - dst_x, dst_y)
  230. + dst_x, dst_y)
  231. % sizeof (grub_uint16_t) == 0
  232. && linelen % sizeof (grub_uint16_t) == 0
  233. && linedelta % sizeof (grub_uint16_t) == 0)
  234. @@ -1170,7 +1170,7 @@ grub_video_fb_scroll (grub_video_color_t color, int dx, int dy)
  235. {
  236. grub_uint8_t *src, *dst;
  237. DO_SCROLL
  238. - }
  239. + }
  240. }
  241. /* 4. Fill empty space with specified color. In this implementation
  242. @@ -1615,7 +1615,7 @@ grub_video_fb_setup (unsigned int mode_type, unsigned int mode_mask,
  243. framebuffer.render_target = framebuffer.back_target;
  244. return GRUB_ERR_NONE;
  245. }
  246. -
  247. +
  248. mode_info->mode_type &= ~(GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED
  249. | GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP);
  250. diff --git a/grub-core/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c
  251. index b7f911926..0e65b5206 100644
  252. --- a/grub-core/video/i386/pc/vbe.c
  253. +++ b/grub-core/video/i386/pc/vbe.c
  254. @@ -219,7 +219,7 @@ grub_vbe_disable_mtrr (int mtrr)
  255. }
  256. /* Call VESA BIOS 0x4f09 to set palette data, return status. */
  257. -static grub_vbe_status_t
  258. +static grub_vbe_status_t
  259. grub_vbe_bios_set_palette_data (grub_uint32_t color_count,
  260. grub_uint32_t start_index,
  261. struct grub_vbe_palette_data *palette_data)
  262. @@ -237,7 +237,7 @@ grub_vbe_bios_set_palette_data (grub_uint32_t color_count,
  263. }
  264. /* Call VESA BIOS 0x4f00 to get VBE Controller Information, return status. */
  265. -grub_vbe_status_t
  266. +grub_vbe_status_t
  267. grub_vbe_bios_get_controller_info (struct grub_vbe_info_block *ci)
  268. {
  269. struct grub_bios_int_registers regs;
  270. @@ -251,7 +251,7 @@ grub_vbe_bios_get_controller_info (struct grub_vbe_info_block *ci)
  271. }
  272. /* Call VESA BIOS 0x4f01 to get VBE Mode Information, return status. */
  273. -grub_vbe_status_t
  274. +grub_vbe_status_t
  275. grub_vbe_bios_get_mode_info (grub_uint32_t mode,
  276. struct grub_vbe_mode_info_block *mode_info)
  277. {
  278. @@ -285,7 +285,7 @@ grub_vbe_bios_set_mode (grub_uint32_t mode,
  279. }
  280. /* Call VESA BIOS 0x4f03 to return current VBE Mode, return status. */
  281. -grub_vbe_status_t
  282. +grub_vbe_status_t
  283. grub_vbe_bios_get_mode (grub_uint32_t *mode)
  284. {
  285. struct grub_bios_int_registers regs;
  286. @@ -298,7 +298,7 @@ grub_vbe_bios_get_mode (grub_uint32_t *mode)
  287. return regs.eax & 0xffff;
  288. }
  289. -grub_vbe_status_t
  290. +grub_vbe_status_t
  291. grub_vbe_bios_getset_dac_palette_width (int set, int *dac_mask_size)
  292. {
  293. struct grub_bios_int_registers regs;
  294. @@ -346,7 +346,7 @@ grub_vbe_bios_get_memory_window (grub_uint32_t window,
  295. }
  296. /* Call VESA BIOS 0x4f06 to set scanline length (in bytes), return status. */
  297. -grub_vbe_status_t
  298. +grub_vbe_status_t
  299. grub_vbe_bios_set_scanline_length (grub_uint32_t length)
  300. {
  301. struct grub_bios_int_registers regs;
  302. @@ -354,14 +354,14 @@ grub_vbe_bios_set_scanline_length (grub_uint32_t length)
  303. regs.ecx = length;
  304. regs.eax = 0x4f06;
  305. /* BL = 2, Set Scan Line in Bytes. */
  306. - regs.ebx = 0x0002;
  307. + regs.ebx = 0x0002;
  308. regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
  309. grub_bios_interrupt (0x10, &regs);
  310. return regs.eax & 0xffff;
  311. }
  312. /* Call VESA BIOS 0x4f06 to return scanline length (in bytes), return status. */
  313. -grub_vbe_status_t
  314. +grub_vbe_status_t
  315. grub_vbe_bios_get_scanline_length (grub_uint32_t *length)
  316. {
  317. struct grub_bios_int_registers regs;
  318. @@ -377,7 +377,7 @@ grub_vbe_bios_get_scanline_length (grub_uint32_t *length)
  319. }
  320. /* Call VESA BIOS 0x4f07 to set display start, return status. */
  321. -static grub_vbe_status_t
  322. +static grub_vbe_status_t
  323. grub_vbe_bios_set_display_start (grub_uint32_t x, grub_uint32_t y)
  324. {
  325. struct grub_bios_int_registers regs;
  326. @@ -390,7 +390,7 @@ grub_vbe_bios_set_display_start (grub_uint32_t x, grub_uint32_t y)
  327. regs.edx = y;
  328. regs.eax = 0x4f07;
  329. /* BL = 80h, Set Display Start during Vertical Retrace. */
  330. - regs.ebx = 0x0080;
  331. + regs.ebx = 0x0080;
  332. regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
  333. grub_bios_interrupt (0x10, &regs);
  334. @@ -401,7 +401,7 @@ grub_vbe_bios_set_display_start (grub_uint32_t x, grub_uint32_t y)
  335. }
  336. /* Call VESA BIOS 0x4f07 to get display start, return status. */
  337. -grub_vbe_status_t
  338. +grub_vbe_status_t
  339. grub_vbe_bios_get_display_start (grub_uint32_t *x,
  340. grub_uint32_t *y)
  341. {
  342. @@ -419,7 +419,7 @@ grub_vbe_bios_get_display_start (grub_uint32_t *x,
  343. }
  344. /* Call VESA BIOS 0x4f0a. */
  345. -grub_vbe_status_t
  346. +grub_vbe_status_t
  347. grub_vbe_bios_get_pm_interface (grub_uint16_t *segment, grub_uint16_t *offset,
  348. grub_uint16_t *length)
  349. {
  350. @@ -896,7 +896,7 @@ vbe2videoinfo (grub_uint32_t mode,
  351. case GRUB_VBE_MEMORY_MODEL_YUV:
  352. mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_YUV;
  353. break;
  354. -
  355. +
  356. case GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR:
  357. mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_RGB;
  358. break;
  359. @@ -923,10 +923,10 @@ vbe2videoinfo (grub_uint32_t mode,
  360. break;
  361. case 8:
  362. mode_info->bytes_per_pixel = 1;
  363. - break;
  364. + break;
  365. case 4:
  366. mode_info->bytes_per_pixel = 0;
  367. - break;
  368. + break;
  369. }
  370. if (controller_info.version >= 0x300)
  371. @@ -976,7 +976,7 @@ grub_video_vbe_iterate (int (*hook) (const struct grub_video_mode_info *info, vo
  372. static grub_err_t
  373. grub_video_vbe_setup (unsigned int width, unsigned int height,
  374. - grub_video_mode_type_t mode_type,
  375. + grub_video_mode_type_t mode_type,
  376. grub_video_mode_type_t mode_mask)
  377. {
  378. grub_uint16_t *p;
  379. @@ -1193,7 +1193,7 @@ grub_video_vbe_print_adapter_specific_info (void)
  380. controller_info.version & 0xFF,
  381. controller_info.oem_software_rev >> 8,
  382. controller_info.oem_software_rev & 0xFF);
  383. -
  384. +
  385. /* The total_memory field is in 64 KiB units. */
  386. grub_printf_ (N_(" total memory: %d KiB\n"),
  387. (controller_info.total_memory << 6));
  388. diff --git a/grub-core/video/i386/pc/vga.c b/grub-core/video/i386/pc/vga.c
  389. index b2f776c99..50d0b5e02 100644
  390. --- a/grub-core/video/i386/pc/vga.c
  391. +++ b/grub-core/video/i386/pc/vga.c
  392. @@ -48,7 +48,7 @@ static struct
  393. int back_page;
  394. } framebuffer;
  395. -static unsigned char
  396. +static unsigned char
  397. grub_vga_set_mode (unsigned char mode)
  398. {
  399. struct grub_bios_int_registers regs;
  400. @@ -182,10 +182,10 @@ grub_video_vga_setup (unsigned int width, unsigned int height,
  401. is_target = 1;
  402. err = grub_video_fb_set_active_render_target (framebuffer.render_target);
  403. -
  404. +
  405. if (err)
  406. return err;
  407. -
  408. +
  409. err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
  410. grub_video_fbstd_colors);
  411. diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c
  412. index 17a3dbbb5..f8cf94d96 100644
  413. --- a/grub-core/video/ieee1275.c
  414. +++ b/grub-core/video/ieee1275.c
  415. @@ -234,7 +234,7 @@ grub_video_ieee1275_setup (unsigned int width, unsigned int height,
  416. /* TODO. */
  417. return grub_error (GRUB_ERR_IO, "can't set mode %dx%d", width, height);
  418. }
  419. -
  420. +
  421. err = grub_video_ieee1275_fill_mode_info (dev, &framebuffer.mode_info);
  422. if (err)
  423. {
  424. @@ -261,7 +261,7 @@ grub_video_ieee1275_setup (unsigned int width, unsigned int height,
  425. grub_video_ieee1275_set_palette (0, framebuffer.mode_info.number_of_colors,
  426. grub_video_fbstd_colors);
  427. -
  428. +
  429. return err;
  430. }
  431. diff --git a/grub-core/video/radeon_fuloong2e.c b/grub-core/video/radeon_fuloong2e.c
  432. index b4da34b5e..40917acb7 100644
  433. --- a/grub-core/video/radeon_fuloong2e.c
  434. +++ b/grub-core/video/radeon_fuloong2e.c
  435. @@ -75,7 +75,7 @@ find_card (grub_pci_device_t dev, grub_pci_id_t pciid, void *data)
  436. if (((class >> 16) & 0xffff) != GRUB_PCI_CLASS_SUBCLASS_VGA
  437. || pciid != 0x515a1002)
  438. return 0;
  439. -
  440. +
  441. *found = 1;
  442. addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
  443. @@ -139,7 +139,7 @@ grub_video_radeon_fuloong2e_setup (unsigned int width, unsigned int height,
  444. framebuffer.mapped = 1;
  445. /* Prevent garbage from appearing on the screen. */
  446. - grub_memset (framebuffer.ptr, 0x55,
  447. + grub_memset (framebuffer.ptr, 0x55,
  448. framebuffer.mode_info.height * framebuffer.mode_info.pitch);
  449. #ifndef TEST
  450. @@ -152,7 +152,7 @@ grub_video_radeon_fuloong2e_setup (unsigned int width, unsigned int height,
  451. return err;
  452. err = grub_video_fb_set_active_render_target (framebuffer.render_target);
  453. -
  454. +
  455. if (err)
  456. return err;
  457. diff --git a/grub-core/video/radeon_yeeloong3a.c b/grub-core/video/radeon_yeeloong3a.c
  458. index 52614feb6..48631c181 100644
  459. --- a/grub-core/video/radeon_yeeloong3a.c
  460. +++ b/grub-core/video/radeon_yeeloong3a.c
  461. @@ -74,7 +74,7 @@ find_card (grub_pci_device_t dev, grub_pci_id_t pciid, void *data)
  462. if (((class >> 16) & 0xffff) != GRUB_PCI_CLASS_SUBCLASS_VGA
  463. || pciid != 0x96151002)
  464. return 0;
  465. -
  466. +
  467. *found = 1;
  468. addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
  469. @@ -137,7 +137,7 @@ grub_video_radeon_yeeloong3a_setup (unsigned int width, unsigned int height,
  470. #endif
  471. /* Prevent garbage from appearing on the screen. */
  472. - grub_memset (framebuffer.ptr, 0,
  473. + grub_memset (framebuffer.ptr, 0,
  474. framebuffer.mode_info.height * framebuffer.mode_info.pitch);
  475. #ifndef TEST
  476. @@ -150,7 +150,7 @@ grub_video_radeon_yeeloong3a_setup (unsigned int width, unsigned int height,
  477. return err;
  478. err = grub_video_fb_set_active_render_target (framebuffer.render_target);
  479. -
  480. +
  481. if (err)
  482. return err;
  483. diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c
  484. index 0157ff742..54dfedf43 100644
  485. --- a/grub-core/video/readers/png.c
  486. +++ b/grub-core/video/readers/png.c
  487. @@ -916,7 +916,7 @@ grub_png_convert_image (struct grub_png_data *data)
  488. }
  489. return;
  490. }
  491. -
  492. +
  493. if (data->is_gray)
  494. {
  495. switch (data->bpp)
  496. diff --git a/grub-core/video/readers/tga.c b/grub-core/video/readers/tga.c
  497. index 7cb9d1d2a..a9ec3a1b6 100644
  498. --- a/grub-core/video/readers/tga.c
  499. +++ b/grub-core/video/readers/tga.c
  500. @@ -127,7 +127,7 @@ tga_load_palette (struct tga_data *data)
  501. if (len > sizeof (data->palette))
  502. len = sizeof (data->palette);
  503. -
  504. +
  505. if (grub_file_read (data->file, &data->palette, len)
  506. != (grub_ssize_t) len)
  507. return grub_errno;
  508. diff --git a/grub-core/video/sis315_init.c b/grub-core/video/sis315_init.c
  509. index ae5c1419c..09c3c7bbe 100644
  510. --- a/grub-core/video/sis315_init.c
  511. +++ b/grub-core/video/sis315_init.c
  512. @@ -1,4 +1,4 @@
  513. -static const struct { grub_uint8_t reg; grub_uint8_t val; } sr_dump [] =
  514. +static const struct { grub_uint8_t reg; grub_uint8_t val; } sr_dump [] =
  515. {
  516. { 0x28, 0x81 },
  517. { 0x2a, 0x00 },
  518. diff --git a/grub-core/video/sis315pro.c b/grub-core/video/sis315pro.c
  519. index 22a0c85a6..4d2f9999a 100644
  520. --- a/grub-core/video/sis315pro.c
  521. +++ b/grub-core/video/sis315pro.c
  522. @@ -103,7 +103,7 @@ find_card (grub_pci_device_t dev, grub_pci_id_t pciid, void *data)
  523. if (((class >> 16) & 0xffff) != GRUB_PCI_CLASS_SUBCLASS_VGA
  524. || pciid != GRUB_SIS315PRO_PCIID)
  525. return 0;
  526. -
  527. +
  528. *found = 1;
  529. addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
  530. @@ -218,7 +218,7 @@ grub_video_sis315pro_setup (unsigned int width, unsigned int height,
  531. #ifndef TEST
  532. /* Prevent garbage from appearing on the screen. */
  533. - grub_memset (framebuffer.ptr, 0,
  534. + grub_memset (framebuffer.ptr, 0,
  535. framebuffer.mode_info.height * framebuffer.mode_info.pitch);
  536. grub_arch_sync_dma_caches (framebuffer.ptr,
  537. framebuffer.mode_info.height
  538. @@ -231,7 +231,7 @@ grub_video_sis315pro_setup (unsigned int width, unsigned int height,
  539. | GRUB_VGA_IO_MISC_EXTERNAL_CLOCK_0
  540. | GRUB_VGA_IO_MISC_28MHZ
  541. | GRUB_VGA_IO_MISC_ENABLE_VRAM_ACCESS
  542. - | GRUB_VGA_IO_MISC_COLOR,
  543. + | GRUB_VGA_IO_MISC_COLOR,
  544. GRUB_VGA_IO_MISC_WRITE + GRUB_MACHINE_PCI_IO_BASE);
  545. grub_vga_sr_write (0x86, 5);
  546. @@ -335,7 +335,7 @@ grub_video_sis315pro_setup (unsigned int width, unsigned int height,
  547. {
  548. if (read_sis_cmd (0x5) != 0xa1)
  549. write_sis_cmd (0x86, 0x5);
  550. -
  551. +
  552. write_sis_cmd (read_sis_cmd (0x20) | 0xa1, 0x20);
  553. write_sis_cmd (read_sis_cmd (0x1e) | 0xda, 0x1e);
  554. diff --git a/grub-core/video/sm712.c b/grub-core/video/sm712.c
  555. index 10c46eb65..65f59f84b 100644
  556. --- a/grub-core/video/sm712.c
  557. +++ b/grub-core/video/sm712.c
  558. @@ -167,7 +167,7 @@ enum
  559. GRUB_SM712_CR_SHADOW_VGA_VBLANK_START = 0x46,
  560. GRUB_SM712_CR_SHADOW_VGA_VBLANK_END = 0x47,
  561. GRUB_SM712_CR_SHADOW_VGA_VRETRACE_START = 0x48,
  562. - GRUB_SM712_CR_SHADOW_VGA_VRETRACE_END = 0x49,
  563. + GRUB_SM712_CR_SHADOW_VGA_VRETRACE_END = 0x49,
  564. GRUB_SM712_CR_SHADOW_VGA_OVERFLOW = 0x4a,
  565. GRUB_SM712_CR_SHADOW_VGA_CELL_HEIGHT = 0x4b,
  566. GRUB_SM712_CR_SHADOW_VGA_HDISPLAY_END = 0x4c,
  567. @@ -375,7 +375,7 @@ find_card (grub_pci_device_t dev, grub_pci_id_t pciid, void *data)
  568. if (((class >> 16) & 0xffff) != GRUB_PCI_CLASS_SUBCLASS_VGA
  569. || pciid != GRUB_SM712_PCIID)
  570. return 0;
  571. -
  572. +
  573. *found = 1;
  574. addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
  575. @@ -471,7 +471,7 @@ grub_video_sm712_setup (unsigned int width, unsigned int height,
  576. #if !defined (TEST) && !defined(GENINIT)
  577. /* Prevent garbage from appearing on the screen. */
  578. - grub_memset ((void *) framebuffer.cached_ptr, 0,
  579. + grub_memset ((void *) framebuffer.cached_ptr, 0,
  580. framebuffer.mode_info.height * framebuffer.mode_info.pitch);
  581. #endif
  582. @@ -482,7 +482,7 @@ grub_video_sm712_setup (unsigned int width, unsigned int height,
  583. grub_sm712_sr_write (0x2, 0x6b);
  584. grub_sm712_write_reg (0, GRUB_VGA_IO_PIXEL_MASK);
  585. grub_sm712_sr_write (GRUB_VGA_SR_RESET_ASYNC, GRUB_VGA_SR_RESET);
  586. - grub_sm712_write_reg (GRUB_VGA_IO_MISC_NEGATIVE_VERT_POLARITY
  587. + grub_sm712_write_reg (GRUB_VGA_IO_MISC_NEGATIVE_VERT_POLARITY
  588. | GRUB_VGA_IO_MISC_NEGATIVE_HORIZ_POLARITY
  589. | GRUB_VGA_IO_MISC_UPPER_64K
  590. | GRUB_VGA_IO_MISC_EXTERNAL_CLOCK_0
  591. @@ -694,7 +694,7 @@ grub_video_sm712_setup (unsigned int width, unsigned int height,
  592. for (i = 0; i < ARRAY_SIZE (dda_lookups); i++)
  593. grub_sm712_write_dda_lookup (i, dda_lookups[i].compare, dda_lookups[i].dda,
  594. dda_lookups[i].vcentering);
  595. -
  596. +
  597. /* Undocumented */
  598. grub_sm712_cr_write (0, 0x9c);
  599. grub_sm712_cr_write (0, 0x9d);
  600. diff --git a/grub-core/video/video.c b/grub-core/video/video.c
  601. index 983424107..8937da745 100644
  602. --- a/grub-core/video/video.c
  603. +++ b/grub-core/video/video.c
  604. @@ -491,13 +491,13 @@ parse_modespec (const char *current_mode, int *width, int *height, int *depth)
  605. current_mode);
  606. param++;
  607. -
  608. +
  609. *width = grub_strtoul (value, 0, 0);
  610. if (grub_errno != GRUB_ERR_NONE)
  611. return grub_error (GRUB_ERR_BAD_ARGUMENT,
  612. N_("invalid video mode specification `%s'"),
  613. current_mode);
  614. -
  615. +
  616. /* Find height value. */
  617. value = param;
  618. param = grub_strchr(param, 'x');
  619. @@ -513,13 +513,13 @@ parse_modespec (const char *current_mode, int *width, int *height, int *depth)
  620. {
  621. /* We have optional color depth value. */
  622. param++;
  623. -
  624. +
  625. *height = grub_strtoul (value, 0, 0);
  626. if (grub_errno != GRUB_ERR_NONE)
  627. return grub_error (GRUB_ERR_BAD_ARGUMENT,
  628. N_("invalid video mode specification `%s'"),
  629. current_mode);
  630. -
  631. +
  632. /* Convert color depth value. */
  633. value = param;
  634. *depth = grub_strtoul (value, 0, 0);
  635. --
  636. 2.41.0