Re: [PATCH] mm/memblock: replace u64 with phys_addr_t where appropriate

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

 



On Tue, Jul 3, 2018 at 1:05 PM Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> wrote:
>
> Most functions in memblock already use phys_addr_t to represent a physical
> address with __memblock_free_late() being an exception.
>
> This patch replaces u64 with phys_addr_t in __memblock_free_late() and
> switches several format strings from %llx to %pa to avoid casting from
> phys_addr_t to u64.
>
> CC: Michal Hocko <mhocko@xxxxxxxxxx>
> CC: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>

Looks good.

Reviewed-by: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>

One minor thing that I would like to change in memblock.c is the
useage phys_addr_t for size. I understand the reasoning behind this
choice, but could we do something like:

typedef phys_addr_t phys_size_t;
It would be similar to resource_size_t. I just think the code and
function prototypes would look better with proper typing.

Thank you,
Pavel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux