Skip to content

Commit

Permalink
can: sja1000_of_platform: fix build problems with printk format
Browse files Browse the repository at this point in the history
According to "Documentation/printk-formats.txt", if the type is
dependent on a config option for its size, like resource_size_t,
we should use a format specifier of its largest possible type and
explicitly cast to it.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wolfgang Grandegger authored and David S. Miller committed Jun 10, 2009
1 parent bf12691 commit 51611a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/can/sja1000/sja1000_of_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,17 @@ static int __devinit sja1000_ofp_probe(struct of_device *ofdev,
res_size = resource_size(&res);

if (!request_mem_region(res.start, res_size, DRV_NAME)) {
dev_err(&ofdev->dev, "couldn't request %#x..%#x\n",
res.start, res.end);
dev_err(&ofdev->dev, "couldn't request %#llx..%#llx\n",
(unsigned long long)res.start,
(unsigned long long)res.end);
return -EBUSY;
}

base = ioremap_nocache(res.start, res_size);
if (!base) {
dev_err(&ofdev->dev, "couldn't ioremap %#x..%#x\n",
res.start, res.end);
dev_err(&ofdev->dev, "couldn't ioremap %#llx..%#llx\n",
(unsigned long long)res.start,
(unsigned long long)res.end);
err = -ENOMEM;
goto exit_release_mem;
}
Expand Down

0 comments on commit 51611a1

Please sign in to comment.