summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/octeon/cvmx.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2022-11-01 09:01:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-02 08:21:49 +0100
commit3cbb8d0d6d42958c146624a102d1a0e59a820b65 (patch)
treec937fa118126b1e0b7c8552e353b47a8fc5dbe0f /arch/mips/include/asm/octeon/cvmx.h
parent3b45e2e139c1e71b17a97ae887ba1caadd8e8ad2 (diff)
staging: octeon: cvmx_ptr_to_phys() should return physaddr_t
On 32-bit without physical address extensions (e.g. sh-allmodconfig): drivers/staging/octeon/ethernet-mem.c: In function ‘cvm_oct_free_hw_memory’: ./arch/sh/include/asm/io.h:239:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 239 | #define phys_to_virt(address) ((void *)(address)) | ^ drivers/staging/octeon/ethernet-mem.c:123:18: note: in expansion of macro ‘phys_to_virt’ 123 | fpa = (char *)phys_to_virt(cvmx_ptr_to_phys(fpa)); | ^~~~~~~~~~~~ Fix this by making cvmx_ptr_to_phys() return physaddr_t instead of uint64_t. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20221101080111.750748-1-geert@linux-m68k.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips/include/asm/octeon/cvmx.h')
-rw-r--r--arch/mips/include/asm/octeon/cvmx.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
index 25854abc95f8..72e775bf31e6 100644
--- a/arch/mips/include/asm/octeon/cvmx.h
+++ b/arch/mips/include/asm/octeon/cvmx.h
@@ -154,13 +154,13 @@ static inline uint64_t cvmx_build_bits(uint64_t high_bit,
/**
* Convert a memory pointer (void*) into a hardware compatible
- * memory address (uint64_t). Octeon hardware widgets don't
+ * memory address (phys_addr_t). Octeon hardware widgets don't
* understand logical addresses.
*
* @ptr: C style memory pointer
* Returns Hardware physical address
*/
-static inline uint64_t cvmx_ptr_to_phys(void *ptr)
+static inline phys_addr_t cvmx_ptr_to_phys(void *ptr)
{
if (sizeof(void *) == 8) {
/*