History log of /u-boot/include/api_public.h
Revision Date Author Comments
# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <kabel@kernel.org>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# d32211ee 06-Mar-2021 Marek Behún <marek.behun@nic.cz>

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>


# 4549e789 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our multiple license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have multiple licenses (in
these cases, dual license) declared in the SPDX-License-Identifier tag.
In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
as per the Linux Kernel style document. Note that parenthesis are
allowed so when they were used before we continue to use them.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 933aa017 28-Jul-2013 Wolfgang Denk <wd@denx.de>

SPDX-License-Identifier: convert GPL-2.0+ / BSD-2-Clause dual-licensed files

Signed-off-by: Wolfgang Denk <wd@denx.de>


# a2a5729f 20-Oct-2011 Che-Liang Chiou <clchiou@chromium.org>

api: export LCD device to external apps

This patch exports LCD info-query and bitmap-rendering functions to
external apps.

This patch is tested on a Seaboard. Because the LCD driver is not yet
upstreamed, the test was done in a local downstream repo.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>


# 923aa481 23-Jan-2009 Rafal Jaworowski <raj@semihalf.com>

API: Improve glue mid-layer of the API demo application.

- Extend ub_dev_read() and ub_dev_recv() so they return the length actually
read, which allows for better control and error handling (this introduces
additional error code API_ESYSC returned by the glue mid-layer).

- Clean up definitions naming and usage.

- Other minor cosmetics.

Note these changes do not touch the API proper, so the interface between
U-Boot and standalone applications remains unchanged.

Signed-off-by: Rafal Jaworowski <raj@semihalf.com>


# 6d0f6bcf 16-Oct-2008 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

rename CFG_ macros to CONFIG_SYS

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>


# f2302d44 06-Aug-2008 Stefan Roese <sr@denx.de>

Fix merge problems

Signed-off-by: Stefan Roese <sr@denx.de>


# 8d87589e 28-Jul-2008 Rafal Jaworowski <raj@semihalf.com>

API: Teach the storage layer about SATA and MMC options.

Signed-off-by: Rafal Czubak <rcz@semihalf.com>
Acked-by: Rafal Jaworowski <raj@semihalf.com>


# e7a85f26 21-Feb-2008 Rafal Jaworowski <raj@semihalf.com>

API: Add (c) and licensing notice to the public API header.

Signed-off-by: Rafal Jaworowski <raj@semihalf.com>


# 500856eb 09-Jan-2008 Rafal Jaworowski <raj@semihalf.com>

API for external applications.

This is an API for external (standalone) applications running on top of
U-Boot, and is meant to be more extensible and robust than the existing
jumptable mechanism. It is similar to UNIX syscall approach. See api/README
for more details.

Included is the demo application using this new framework (api_examples).

Please note this is still an experimental feature, and is turned off by
default.

Signed-off-by: Rafal Jaworowski <raj@semihalf.com>