Skip to content

Commit

Permalink
Merge branch 'net-ipa-a-few-bug-fixes'
Browse files Browse the repository at this point in the history
Alex Elder says:

====================
net: ipa: a few bug fixes

This series fixes four minor bugs.  The first two are things that
sparse points out.  All four are very simple and each patch should
explain itself pretty well.
====================

Link: https://lore.kernel.org/r/20210201232609.3524451-1-elder@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Feb 2, 2021
2 parents 4ace7a6 + 113b6ea commit f2539e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ipa/gsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static void gsi_evt_ring_de_alloc_command(struct gsi *gsi, u32 evt_ring_id)
static enum gsi_channel_state gsi_channel_state(struct gsi_channel *channel)
{
u32 channel_id = gsi_channel_id(channel);
void *virt = channel->gsi->virt;
void __iomem *virt = channel->gsi->virt;
u32 val;

val = ioread32(virt + GSI_CH_C_CNTXT_0_OFFSET(channel_id));
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ipa/ipa_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ static void ipa_endpoint_init_hdr_metadata_mask(struct ipa_endpoint *endpoint)

/* Note that HDR_ENDIANNESS indicates big endian header fields */
if (endpoint->data->qmap)
val = cpu_to_be32(IPA_ENDPOINT_QMAP_METADATA_MASK);
val = (__force u32)cpu_to_be32(IPA_ENDPOINT_QMAP_METADATA_MASK);

iowrite32(val, endpoint->ipa->reg_virt + offset);
}
Expand Down Expand Up @@ -1164,8 +1164,8 @@ static bool ipa_endpoint_status_skip(struct ipa_endpoint *endpoint,
return true;
if (!status->pkt_len)
return true;
endpoint_id = u32_get_bits(status->endp_dst_idx,
IPA_STATUS_DST_IDX_FMASK);
endpoint_id = u8_get_bits(status->endp_dst_idx,
IPA_STATUS_DST_IDX_FMASK);
if (endpoint_id != endpoint->endpoint_id)
return true;

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ipa/ipa_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ static void ipa_imem_exit(struct ipa *ipa)

size = iommu_unmap(domain, ipa->imem_iova, ipa->imem_size);
if (size != ipa->imem_size)
dev_warn(dev, "unmapped %zu IMEM bytes, expected %lu\n",
dev_warn(dev, "unmapped %zu IMEM bytes, expected %zu\n",
size, ipa->imem_size);
} else {
dev_err(dev, "couldn't get IPA IOMMU domain for IMEM\n");
Expand Down Expand Up @@ -440,7 +440,7 @@ static void ipa_smem_exit(struct ipa *ipa)

size = iommu_unmap(domain, ipa->smem_iova, ipa->smem_size);
if (size != ipa->smem_size)
dev_warn(dev, "unmapped %zu SMEM bytes, expected %lu\n",
dev_warn(dev, "unmapped %zu SMEM bytes, expected %zu\n",
size, ipa->smem_size);

} else {
Expand Down

0 comments on commit f2539e1

Please sign in to comment.