summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2014-06-18 04:02:21 (GMT)
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-20 21:40:59 (GMT)
commita5202b8a3ae735c3df85ee5d20804984cd8b646f (patch)
treed6e60c90e48cdf83a6fb82666bc295be5481a75a
parent69442d58f65288da00442d9ad20aa88168345c5a (diff)
downloaddepthcharge-stabilize.5978.98.B.tar.gz
depthcharge-stabilize.5978.98.B.tar.xz
BUG=None BRANCH=None TEST=Compiles successfully Change-Id: Ib3a6b7d56ed8ad8ef98b8ba61f4cf06ec2578dfa Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/204453 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--src/drivers/bus/spi/tegra.c2
-rw-r--r--src/drivers/sound/tegra_ahub.c2
-rw-r--r--src/drivers/storage/bouncebuf.c4
-rw-r--r--src/drivers/storage/tegra_mmc.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/bus/spi/tegra.c b/src/drivers/bus/spi/tegra.c
index 41e6d27..72adfbe 100644
--- a/src/drivers/bus/spi/tegra.c
+++ b/src/drivers/bus/spi/tegra.c
@@ -447,7 +447,7 @@ static int tegra_spi_transfer(SpiOps *me, void *in, const void *out,
// Don't transfer more than the DMA can handle, transfer a
// multiple of 4 bytes, and make sure there's at least
// line_size bytes left when you're done.
- uint32_t mask = ~(sizeof(uint32_t) - 1);
+ uint32_t mask = (uint32_t)~(sizeof(uint32_t) - 1);
todo = MIN((size - line_size) & mask,
SPI_MAX_TRANSFER_BYTES_DMA & mask);
if (!todo)
diff --git a/src/drivers/sound/tegra_ahub.c b/src/drivers/sound/tegra_ahub.c
index d30c201..3688c8e 100644
--- a/src/drivers/sound/tegra_ahub.c
+++ b/src/drivers/sound/tegra_ahub.c
@@ -164,7 +164,7 @@ static ssize_t tegra_ahub_apbif_send(TxFifoOps *me, const void *buf, size_t len)
ssize_t written = 0;
TegraApbifRegs *regs = container_of(me, TegraAudioHubApbif, ops)->regs;
if (len % sizeof(*data)) {
- printf("%s: Data size (%d) must be aligned to %d.\n", __func__,
+ printf("%s: Data size (%zd) must be aligned to %zd.\n", __func__,
len, sizeof(*data));
return -1;
}
diff --git a/src/drivers/storage/bouncebuf.c b/src/drivers/storage/bouncebuf.c
index 0893c36..930fcc4 100644
--- a/src/drivers/storage/bouncebuf.c
+++ b/src/drivers/storage/bouncebuf.c
@@ -40,7 +40,7 @@ static int addr_aligned(struct bounce_buffer *state)
const uint32_t align_mask = ARCH_DMA_MINALIGN - 1;
// Check if start is aligned
- if ((uint32_t)state->user_buffer & align_mask) {
+ if ((uintptr_t)state->user_buffer & align_mask) {
if (_debug)
printf("Unaligned buffer address %p\n",
state->user_buffer);
@@ -50,7 +50,7 @@ static int addr_aligned(struct bounce_buffer *state)
// Check if length is aligned
if (state->len != state->len_aligned) {
if (_debug)
- printf("Unaligned buffer length %d\n", state->len);
+ printf("Unaligned buffer length %zd\n", state->len);
return 0;
}
diff --git a/src/drivers/storage/tegra_mmc.c b/src/drivers/storage/tegra_mmc.c
index 0ddc82c..69a8a49 100644
--- a/src/drivers/storage/tegra_mmc.c
+++ b/src/drivers/storage/tegra_mmc.c
@@ -87,7 +87,7 @@ static void tegra_mmc_prepare_data(TegraMmcHost *host, MmcData *data,
__func__, bbstate->bounce_buffer, bbstate->user_buffer,
data->blocks, data->blocksize);
- writel((uint32_t)bbstate->bounce_buffer, &host->reg->sysad);
+ writel((uintptr_t)bbstate->bounce_buffer, &host->reg->sysad);
/*
* DMASEL[4:3]
* 00 = Selects SDMA