提交 1f52b2b9 编写于 作者: S Shannon Nelson 提交者: Zheng Zengkai

ionic: fix type complaint in ionic_dev_cmd_clean()

stable inclusion
from stable-v5.10.110
commit 47402eaf888e03d59c9294555f3d3cad1f810810
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=47402eaf888e03d59c9294555f3d3cad1f810810

--------------------------------

[ Upstream commit bc0bf9de ]

Sparse seems to have gotten a little more picky lately and
we need to revisit this bit of code to make sparse happy.

warning: incorrect type in initializer (different address spaces)
   expected union ionic_dev_cmd_regs *regs
   got union ionic_dev_cmd_regs [noderef] __iomem *dev_cmd_regs
warning: incorrect type in argument 2 (different address spaces)
   expected void [noderef] __iomem *
   got unsigned int *
warning: incorrect type in argument 1 (different address spaces)
   expected void volatile [noderef] __iomem *
   got union ionic_dev_cmd *

Fixes: d701ec32 ("ionic: clean up sparse complaints")
Signed-off-by: NShannon Nelson <snelson@pensando.io>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 94592501
...@@ -311,10 +311,10 @@ int ionic_adminq_post_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx) ...@@ -311,10 +311,10 @@ int ionic_adminq_post_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx)
static void ionic_dev_cmd_clean(struct ionic *ionic) static void ionic_dev_cmd_clean(struct ionic *ionic)
{ {
union __iomem ionic_dev_cmd_regs *regs = ionic->idev.dev_cmd_regs; struct ionic_dev *idev = &ionic->idev;
iowrite32(0, &regs->doorbell); iowrite32(0, &idev->dev_cmd_regs->doorbell);
memset_io(&regs->cmd, 0, sizeof(regs->cmd)); memset_io(&idev->dev_cmd_regs->cmd, 0, sizeof(idev->dev_cmd_regs->cmd));
} }
int ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds) int ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册