Thread (6 messages) flat view 6 messages, 3 authors, 2018-05-21

Re: [PATCH 1/3] powerpc/io: Add __raw_writeq_be() __raw_rm_writeq_be()

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-05-18 12:00:26

Samuel Mendoza-Jonas [off-list ref] writes:
On Mon, 2018-05-14 at 22:50 +1000, Michael Ellerman wrote:
quoted
Add byte-swapping versions of __raw_writeq() and __raw_rm_writeq().

This allows us to avoid sparse warnings caused by passing __be64 to
__raw_writeq(), which takes unsigned long:

  arch/powerpc/platforms/powernv/pci-ioda.c:1981:38:
  warning: incorrect type in argument 1 (different base types)
      expected unsigned long [unsigned] v
      got restricted __be64 [usertype] <noident>

It's also generally preferable to use a byte-swapping accessor rather
than doing it by hand in the code, which is more bug prone.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
For this and the following patches:

Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Thanks.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help