Files
u-boot/include
Marek Behún d32211ee95 api: fix a potential serious bug caused by undef CONFIG_SYS_64BIT_LBA
The api_public.h header file undefined macro CONFIG_SYS_64BIT_LBA.

But api/api_storage.c includes this header before including part.h,
causing the type of lbaint_t and subsequently the type signature of
blk_dread() and blk_dwrite() functions to change from the rest of U-Boot
(if CONFIG_SYS_64BIT_LBA is defined for the board).

This is of course wrong, because the call to blk_dread() / blk_dwrite()
will receive mangled arguments.

Fix this by removing the undef of macro CONFIG_SYS_64BIT_LBA and instead
make the immediate code do what it would do as if the macro was not
defined.

Add a FIXME to whoever is maintaining this code.

CI managed to trigger this bug when compiling for lsxhl_defconfig, which
has CONFIG_API selected. The compiler complained about blk_dwrite() and
blk_dread() not matching original declarations:

  include/blk.h:280:15: warning: type of ‘blk_dwrite’ does not match
                                 original declaration
				 [-Wlto-type-mismatch]
  280 | unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t st
      |               ^
  drivers/block/blk-uclass.c:456:15: note: type mismatch in parameter 2
  456 | unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t st
      |               ^

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-19 10:36:06 -04:00
..
2019-12-06 16:44:20 -05:00
2021-03-01 09:54:11 -05:00
2019-10-16 05:42:27 +02:00
2020-05-11 10:16:49 +05:30
2021-01-15 14:36:12 -05:00
2020-04-17 12:32:36 -04:00
2021-01-25 21:52:00 +00:00
2021-01-25 21:52:00 +00:00
2020-07-09 12:33:24 +08:00
2020-05-18 17:33:33 -04:00
2021-03-07 17:37:13 +01:00
2021-01-12 10:58:04 +05:30
2021-01-12 10:58:04 +05:30
2020-12-26 12:37:28 +01:00
2021-01-30 14:25:41 -07:00
2021-01-30 14:25:42 -07:00
2021-01-31 14:08:56 +01:00
2020-02-05 19:33:46 -07:00
2020-05-07 09:01:42 -04:00
2020-08-03 22:19:54 -04:00
2021-01-13 02:38:01 +01:00
2020-05-18 21:19:23 -04:00
2020-08-07 22:31:32 -04:00
2021-02-10 10:00:51 +01:00
2020-10-30 10:56:11 -04:00
2020-05-18 17:33:33 -04:00
2020-06-12 13:14:07 -04:00
2021-03-17 12:50:19 -04:00
2019-10-14 09:31:41 +02:00
2020-01-20 15:38:16 +01:00
2019-11-07 18:39:16 -05:00
2020-05-18 18:36:55 -04:00
2020-04-17 12:32:36 -04:00
2020-08-04 23:30:02 -04:00
2021-01-16 19:17:11 -05:00
2019-12-02 18:23:11 -05:00
2020-01-25 12:04:36 -05:00
2021-02-03 03:38:41 -07:00
2020-07-17 10:47:19 -04:00
2020-12-18 20:32:21 -07:00
2020-06-14 21:07:20 +02:00
2020-02-05 19:33:46 -07:00
2020-06-14 21:07:20 +02:00
2020-07-09 06:02:44 +02:00
2020-09-30 11:55:23 -04:00
2020-02-05 19:33:46 -07:00
2021-01-05 16:20:26 -05:00
2020-10-22 09:54:53 -04:00
2020-08-03 22:19:54 -04:00
2020-01-21 15:56:15 +01:00
2021-01-27 17:03:16 -05:00
2020-08-03 22:19:54 -04:00
2020-08-03 22:19:54 -04:00
2021-01-15 14:36:12 -05:00