Commit 8df98105 authored by Jiri Slaby's avatar Jiri Slaby Committed by Sasha Levin

mmc: core: Annotate cmd_hdr as __le32

[ Upstream commit 3f2d2664 ]

Commit f68381a7 (mmc: block: fix packed command header endianness)
correctly fixed endianness handling of packed_cmd_hdr in
mmc_blk_packed_hdr_wrq_prep.

But now, sparse complains about incorrect types:
drivers/mmc/card/block.c:1613:27: sparse: incorrect type in assignment (different base types)
drivers/mmc/card/block.c:1613:27:    expected unsigned int [unsigned] [usertype] <noident>
drivers/mmc/card/block.c:1613:27:    got restricted __le32 [usertype] <noident>
...

So annotate cmd_hdr properly using __le32 to make everyone happy.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Fixes: f68381a7 (mmc: block: fix packed command header endianness)
Cc: stable@vger.kernel.org
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 7ea3d2e9
...@@ -1652,7 +1652,7 @@ static void mmc_blk_packed_hdr_wrq_prep(struct mmc_queue_req *mqrq, ...@@ -1652,7 +1652,7 @@ static void mmc_blk_packed_hdr_wrq_prep(struct mmc_queue_req *mqrq,
struct mmc_blk_data *md = mq->data; struct mmc_blk_data *md = mq->data;
struct mmc_packed *packed = mqrq->packed; struct mmc_packed *packed = mqrq->packed;
bool do_rel_wr, do_data_tag; bool do_rel_wr, do_data_tag;
u32 *packed_cmd_hdr; __le32 *packed_cmd_hdr;
u8 hdr_blocks; u8 hdr_blocks;
u8 i = 1; u8 i = 1;
......
...@@ -24,7 +24,7 @@ enum mmc_packed_type { ...@@ -24,7 +24,7 @@ enum mmc_packed_type {
struct mmc_packed { struct mmc_packed {
struct list_head list; struct list_head list;
u32 cmd_hdr[1024]; __le32 cmd_hdr[1024];
unsigned int blocks; unsigned int blocks;
u8 nr_entries; u8 nr_entries;
u8 retries; u8 retries;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment