“ff1b1bf867ebb7eb5e3ff0eab21c26b830d5e890”上不存在“drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c”
提交 c42d3be0 编写于 作者: D Dan Carpenter 提交者: Michael Ellerman

powerpc: Fix size calculation using resource_size()

The problem is the the calculation should be "end - start + 1" but the
plus one is missing in this calculation.

Fixes: 8626816e ("powerpc: add support for MPIC message register API")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 24576a70
......@@ -196,7 +196,7 @@ static int mpic_msgr_probe(struct platform_device *dev)
/* IO map the message register block. */
of_address_to_resource(np, 0, &rsrc);
msgr_block_addr = ioremap(rsrc.start, rsrc.end - rsrc.start);
msgr_block_addr = ioremap(rsrc.start, resource_size(&rsrc));
if (!msgr_block_addr) {
dev_err(&dev->dev, "Failed to iomap MPIC message registers");
return -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册