lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5019a2d6-bace-26dc-dda2-c263efc30185@infradead.org>
Date:   Mon, 20 Apr 2020 17:26:02 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Vinod Koul <vkoul@...nel.org>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: drivers/dma/iop-adma.c cast build warnings

Hi,

On i386, when CONFIG_ARCH_DMA_ADDR_T_64BIT=y,
but long and void* are only 32 bits, there are a few build warnings:

  CC [M]  drivers/dma/iop-adma.o
../drivers/dma/iop-adma.c: In function 'iop_adma_alloc_chan_resources':
../drivers/dma/iop-adma.c:448:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   hw_desc = (char *) iop_chan->device->dma_desc_pool;
             ^
../drivers/dma/iop-adma.c:450:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    (dma_addr_t) &hw_desc[idx * IOP_ADMA_SLOT_SIZE];
    ^
In file included from ../include/linux/printk.h:328:0,
                 from ../include/linux/kernel.h:15,
                 from ../include/linux/list.h:9,
                 from ../include/linux/module.h:12,
                 from ../drivers/dma/iop-adma.c:13:
../drivers/dma/iop-adma.c: In function 'iop_adma_probe':
../drivers/dma/iop-adma.c:1302:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (void *) adev->dma_desc_pool);
   ^

This is on linux-next 20200420.

Are DMA addresses for this driver/hw device limited to 32 bits?

thanks.
-- 
~Randy
Reported-by: Randy Dunlap <rdunlap@...radead.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ