Message ID | 1378082375.25743.61.camel@deadeye.wl.decadent.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, Sep 1, 2013 at 9:39 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > pci_addr_phys = pdev->resource[0].start; > - dev_info(&pdev->dev, "memory at 0x%08X\n", > - (unsigned int)pci_addr_phys); > + dev_info(&pdev->dev, "memory at 0x%08llX\n", > + (unsigned long long)pci_addr_phys); You could use %pa instead for printing phys_addr_t: dev_info(&pdev->dev, "memory at %pa\n", &pci_addr_phys); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, 2013-09-01 at 22:37 -0300, Fabio Estevam wrote: > On Sun, Sep 1, 2013 at 9:39 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > > > pci_addr_phys = pdev->resource[0].start; > > - dev_info(&pdev->dev, "memory at 0x%08X\n", > > - (unsigned int)pci_addr_phys); > > + dev_info(&pdev->dev, "memory at 0x%08llX\n", > > + (unsigned long long)pci_addr_phys); > > You could use %pa instead for printing phys_addr_t: > > dev_info(&pdev->dev, "memory at %pa\n", &pci_addr_phys); Could do, but I'm not sure it's clearer. And all these %p formats defeat type-checking anyway. Ben.
On Sun, Sep 1, 2013 at 10:41 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > On Sun, 2013-09-01 at 22:37 -0300, Fabio Estevam wrote: >> On Sun, Sep 1, 2013 at 9:39 PM, Ben Hutchings <ben@decadent.org.uk> wrote: >> >> > pci_addr_phys = pdev->resource[0].start; >> > - dev_info(&pdev->dev, "memory at 0x%08X\n", >> > - (unsigned int)pci_addr_phys); >> > + dev_info(&pdev->dev, "memory at 0x%08llX\n", >> > + (unsigned long long)pci_addr_phys); >> >> You could use %pa instead for printing phys_addr_t: >> >> dev_info(&pdev->dev, "memory at %pa\n", &pci_addr_phys); > > Could do, but I'm not sure it's clearer. And all these %p formats > defeat type-checking anyway. IMHO using %pa looks clearer and it is also recommended in Documentation/printk-formats.txt. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c index c277bf3..8c5ba2a 100644 --- a/drivers/staging/media/lirc/lirc_bt829.c +++ b/drivers/staging/media/lirc/lirc_bt829.c @@ -99,7 +99,7 @@ static int atir_pci_probe(struct pci_dev *pdev, const struct pci_device_id *entry) { struct atir_device *atir; - unsigned long pci_addr_phys; + phys_addr_t pci_addr_phys; int rc; atir = kzalloc(sizeof(*atir), GFP_KERNEL); @@ -115,8 +115,8 @@ static int atir_pci_probe(struct pci_dev *pdev, } pci_addr_phys = pdev->resource[0].start; - dev_info(&pdev->dev, "memory at 0x%08X\n", - (unsigned int)pci_addr_phys); + dev_info(&pdev->dev, "memory at 0x%08llX\n", + (unsigned long long)pci_addr_phys); atir->pci_addr_lin = ioremap(pci_addr_phys + DATA_PCI_OFF, 0x400); if (atir->pci_addr_lin == 0) {
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> --- drivers/staging/media/lirc/lirc_bt829.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)