Re: [PATCH 2/4] [media] lirc_bt829: Fix physical address type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 1, 2013 at 10:41 PM, Ben Hutchings <ben@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux