mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
mhi: core: marked __packed only members that's required
It's recommended style to mark __packed only members that does not have natural alignment for clarity. CRs-Fixed: 2258358 Change-Id: Id560e23427d932c9e15cc7e4872366f130d7e8df Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
This commit is contained in:
parent
2a90a80663
commit
a5c630bb28
@ -394,7 +394,7 @@ int mhi_alloc_bhie_table(struct mhi_controller *mhi_cntrl,
|
||||
|
||||
/* last entry is for vector table */
|
||||
if (i == segments - 1)
|
||||
vec_size = sizeof(struct __packed bhi_vec_entry) * i;
|
||||
vec_size = sizeof(struct bhi_vec_entry) * i;
|
||||
|
||||
mhi_buf->len = vec_size;
|
||||
mhi_buf->buf = mhi_alloc_coherent(mhi_cntrl, vec_size,
|
||||
|
@ -333,7 +333,7 @@ int mhi_init_dev_ctxt(struct mhi_controller *mhi_cntrl)
|
||||
er_ctxt->msivec = mhi_event->msi;
|
||||
mhi_event->db_cfg.db_mode = true;
|
||||
|
||||
ring->el_size = sizeof(struct __packed mhi_tre);
|
||||
ring->el_size = sizeof(struct mhi_tre);
|
||||
ring->len = ring->el_size * ring->elements;
|
||||
ret = mhi_alloc_aligned_ring(mhi_cntrl, ring, ring->len);
|
||||
if (ret)
|
||||
@ -358,7 +358,7 @@ int mhi_init_dev_ctxt(struct mhi_controller *mhi_cntrl)
|
||||
for (i = 0; i < NR_OF_CMD_RINGS; i++, mhi_cmd++, cmd_ctxt++) {
|
||||
struct mhi_ring *ring = &mhi_cmd->ring;
|
||||
|
||||
ring->el_size = sizeof(struct __packed mhi_tre);
|
||||
ring->el_size = sizeof(struct mhi_tre);
|
||||
ring->elements = CMD_EL_PER_RING;
|
||||
ring->len = ring->el_size * ring->elements;
|
||||
ret = mhi_alloc_aligned_ring(mhi_cntrl, ring, ring->len);
|
||||
@ -643,7 +643,7 @@ int mhi_init_chan_ctxt(struct mhi_controller *mhi_cntrl,
|
||||
|
||||
buf_ring = &mhi_chan->buf_ring;
|
||||
tre_ring = &mhi_chan->tre_ring;
|
||||
tre_ring->el_size = sizeof(struct __packed mhi_tre);
|
||||
tre_ring->el_size = sizeof(struct mhi_tre);
|
||||
tre_ring->len = tre_ring->el_size * tre_ring->elements;
|
||||
chan_ctxt = &mhi_cntrl->mhi_ctxt->chan_ctxt[mhi_chan->chan];
|
||||
ret = mhi_alloc_aligned_ring(mhi_cntrl, tre_ring, tre_ring->len);
|
||||
|
@ -220,47 +220,47 @@ extern struct bus_type mhi_bus_type;
|
||||
#define BHIE_RXVECSTATUS_STATUS_XFER_COMPL (0x02)
|
||||
#define BHIE_RXVECSTATUS_STATUS_ERROR (0x03)
|
||||
|
||||
struct __packed mhi_event_ctxt {
|
||||
struct mhi_event_ctxt {
|
||||
u32 reserved : 8;
|
||||
u32 intmodc : 8;
|
||||
u32 intmodt : 16;
|
||||
u32 ertype;
|
||||
u32 msivec;
|
||||
u64 rbase;
|
||||
u64 rlen;
|
||||
u64 rp;
|
||||
u64 wp;
|
||||
u64 rbase __packed __aligned(4);
|
||||
u64 rlen __packed __aligned(4);
|
||||
u64 rp __packed __aligned(4);
|
||||
u64 wp __packed __aligned(4);
|
||||
};
|
||||
|
||||
struct __packed mhi_chan_ctxt {
|
||||
struct mhi_chan_ctxt {
|
||||
u32 chstate : 8;
|
||||
u32 brstmode : 2;
|
||||
u32 pollcfg : 6;
|
||||
u32 reserved : 16;
|
||||
u32 chtype;
|
||||
u32 erindex;
|
||||
u64 rbase;
|
||||
u64 rlen;
|
||||
u64 rp;
|
||||
u64 wp;
|
||||
u64 rbase __packed __aligned(4);
|
||||
u64 rlen __packed __aligned(4);
|
||||
u64 rp __packed __aligned(4);
|
||||
u64 wp __packed __aligned(4);
|
||||
};
|
||||
|
||||
struct __packed mhi_cmd_ctxt {
|
||||
struct mhi_cmd_ctxt {
|
||||
u32 reserved0;
|
||||
u32 reserved1;
|
||||
u32 reserved2;
|
||||
u64 rbase;
|
||||
u64 rlen;
|
||||
u64 rp;
|
||||
u64 wp;
|
||||
u64 rbase __packed __aligned(4);
|
||||
u64 rlen __packed __aligned(4);
|
||||
u64 rp __packed __aligned(4);
|
||||
u64 wp __packed __aligned(4);
|
||||
};
|
||||
|
||||
struct __packed mhi_tre {
|
||||
struct mhi_tre {
|
||||
u64 ptr;
|
||||
u32 dword[2];
|
||||
};
|
||||
|
||||
struct __packed bhi_vec_entry {
|
||||
struct bhi_vec_entry {
|
||||
u64 dma_addr;
|
||||
u64 size;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user