diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-11-15 14:21:13 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-11-15 14:21:13 +0100 |
commit | 71f347dadfd9d19b57c4bda1ff446add38081e92 (patch) | |
tree | 8695b1e3ece3577045ea1f26a61d4017fd251788 /include | |
parent | 9525a9d9354a9ed3d3515609cddc819e24c406b2 (diff) | |
parent | ccec12cddd8d16db8b661837e6fd68f6b62e7878 (diff) | |
download | barebox-71f347dadfd9d19b57c4bda1ff446add38081e92.tar.gz barebox-71f347dadfd9d19b57c4bda1ff446add38081e92.tar.xz |
Merge branch 'for-next/imx'
Diffstat (limited to 'include')
-rw-r--r-- | include/image-metadata.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/image-metadata.h b/include/image-metadata.h index a9cb9cfe8f..bf4e08d98a 100644 --- a/include/image-metadata.h +++ b/include/image-metadata.h @@ -67,7 +67,7 @@ struct imd_entry_crc32 { static inline int imd_is_crc32(uint32_t type) { - return (type & IMD_TYPE_CRC32) ? 1 : 0; + return type == IMD_TYPE_CRC32; } static inline int imd_crc32_is_valid(uint32_t flags) @@ -139,12 +139,12 @@ int imd_verify_crc32(void *buf, size_t size); } #define BAREBOX_IMD_CRC(_name, _crc, _keep_if_unused) \ - const struct imd_entry_crc32 __barebox_imd_##__name \ - __BAREBOX_IMD_SECTION(.barebox_imd_ ## _keep_if_unused ## _ ## _name) = { \ + const struct imd_entry_crc32 __barebox_imd_##__name \ + __BAREBOX_IMD_SECTION(.barebox_imd_ ## _keep_if_unused ## _ ## _name) = { \ .header.type = cpu_to_le32(IMD_TYPE_CRC32), \ .header.datalength = cpu_to_le32(sizeof(uint32_t) * 2), \ .data = _crc, \ - } + } #ifdef CONFIG_IMD void imd_used(const void *); |