Go to file
Giulio Benetti e1281d4de9 mmc-utils: mmc_cmds: fix type-punned warning on &ext_csd[] casting
When building with -Werror=strict-aliasing error is thrown:

mmc_cmds.c: In function 'do_ffu':
mmc_cmds.c:2972:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
  sect_done = htole32(*((__u32 *)&ext_csd[EXT_CSD_NUM_OF_FW_SEC_PROG_0]));
  ^
cc1: all warnings being treated as errors

Let's fix type-punned breaking strict-aliasing by implementing local
per_byte_htole32(__u8 *) and use it for the 2 present occurences of
htole32(). Let's also change sect_done type to __u32 for consistency.

Suggested-by: Avri Altman <Avri.Altman@wdc.com>
Fixes: a1b594ca73 ("mmc-utils: ffu: Simplify ext_csd bytes parsing")
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20240305184513.400364-1-giulio.benetti@benettiengineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-03-07 11:59:00 +01:00
3rdparty/hmac_sha mmc-utils: RPMB: add HMAC SHA256 support 2014-08-12 10:29:37 -04:00
man mmc-utils: manpage: Document -c option for partitioning commands 2022-02-08 16:15:10 +01:00
.gitignore mmc-utils: expand .gitignore 2018-02-16 20:19:35 -05:00
Android.mk fix building errors on Android 2015-03-24 22:09:55 -04:00
lsmmc.c mmc-utils: lsmmc: Fix emmc capacity calculation 2023-10-10 16:30:03 +02:00
Makefile mmc-utils: support overriding CFLAGS without setting -DVERSION 2023-05-26 15:05:46 +02:00
mmc_cmds.c mmc-utils: mmc_cmds: fix type-punned warning on &ext_csd[] casting 2024-03-07 11:59:00 +01:00
mmc_cmds.h mmc-utils: Implement alternative boot operation 2022-11-09 11:52:52 +01:00
mmc.c mmc-utils: ffu: Add optional chunk-size argument 2023-08-07 13:14:42 +02:00
mmc.h mmc-utils: Implement alternative boot operation 2022-11-09 11:52:52 +01:00
README add README 2022-01-25 17:19:41 +01:00

MMC tools (mmc-utils)
=====================

mmc-utils is a tool for configuring MMC storage devices from userspace.

Contribution guidelines
-----------------------

The project works using a mailing list patch submission process, similar to the
process used for the Linux kernel itself.

One can document themselves by reading how to submit a patch in the official
Linux kernel documentation:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html

Not all sections apply but it should be a good way to get started.

A patch should be sent as a mail (not as an attachement, see documentation
above) to the linux-mmc@vger.kernel.org mailing list with maintainers as
Cc recipients.

Maintainers
-----------

Avri Altman <avri.altman@wdc.com>
Ulf Hansson <ulf.hansson@linaro.org>

License
-------

This project is licensed under GPL-2.0-only.