From mboxrd@z Thu Jan 1 00:00:00 1970 From: Beniamino Galvani Date: Mon, 11 Apr 2016 22:46:20 +0200 Subject: [U-Boot] [PATCH v3 1/2] net: designware: fix descriptor layout and warnings on 64-bit archs In-Reply-To: <570AE8FF.5000509@gmail.com> References: <1460302242-16420-1-git-send-email-b.galvani@gmail.com> <1460302242-16420-2-git-send-email-b.galvani@gmail.com> <570AE8FF.5000509@gmail.com> Message-ID: <20160411204620.GA22294@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Apr 11, 2016 at 01:59:59AM +0200, Marek Vasut wrote: > > This looks more like silencing the warning by a forced cast. > The pointer should most likely be sanity-checked to make sure it's in > 4GiB address space at least. I am worried such forced casts will bite > us in the long run. Yes, this patch assumes that addresses of buffers and descriptors are in the first 4GiB of address space. AFAIU this should be a safe premise for current SoCs, since the physical memory is always mapped within the 32bit addressable range; other drivers (see for example sunxi_mmc) do a similar assumption. So, right now I don't think a check is strictly needed, but to be future-proof probably it wouldn't hurt either. Beniamino