From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 12 Apr 2016 14:00:21 -0600 Subject: [U-Boot] [PATCH 05/44] Allow iotrace byte access to use an address of any size In-Reply-To: <1460256336-30436-6-git-send-email-sjg@chromium.org> References: <1460256336-30436-1-git-send-email-sjg@chromium.org> <1460256336-30436-6-git-send-email-sjg@chromium.org> Message-ID: <570D53D5.5010607@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/09/2016 08:44 PM, Simon Glass wrote: > If an address is used with readb() and writeb() which is smaller than the > expected size (e.g. 32-bit value on a machine with 64-bit addresses), a > warning results. Fix this by adding a cast. > diff --git a/include/iotrace.h b/include/iotrace.h > -#define readb(addr) iotrace_readb((const void *)(addr)) > +#define readb(addr) iotrace_readb((const void *)((uintptr_t)addr)) Nit: I think (type)(othertype)val is as good as (type)((othertype)val)