From: Jean THOMAS Date: Mon, 3 Aug 2020 10:27:47 +0000 (+0200) Subject: Fix warnings in libgram X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cdcc51f0cf88a65c58f15647bfad9ec691adb5d0;p=gram.git Fix warnings in libgram --- diff --git a/libgram/src/calibration.c b/libgram/src/calibration.c index 2a7d8e8..0483998 100644 --- a/libgram/src/calibration.c +++ b/libgram/src/calibration.c @@ -9,9 +9,9 @@ static void set_rdly(const struct gramCtx *ctx, unsigned int phase, unsigned int rdly) { #ifdef GRAM_RW_FUNC if (phase == 0) { - gram_write(ctx, &(ctx->phy->rdly_p0), rdly); + gram_write(ctx, (void*)&(ctx->phy->rdly_p0), rdly); } else if (phase == 1) { - gram_write(ctx, &(ctx->phy->rdly_p1), rdly); + gram_write(ctx, (void*)&(ctx->phy->rdly_p1), rdly); } #else if (phase == 0) { @@ -24,7 +24,7 @@ static void set_rdly(const struct gramCtx *ctx, unsigned int phase, unsigned int void gram_reset_burstdet(const struct gramCtx *ctx) { #ifdef GRAM_RW_FUNC - gram_write(ctx, &(ctx->phy->burstdet), 0); + gram_write(ctx, (void*)&(ctx->phy->burstdet), 0); #else ctx->phy->burstdet = 0; #endif @@ -32,7 +32,7 @@ void gram_reset_burstdet(const struct gramCtx *ctx) { bool gram_read_burstdet(const struct gramCtx *ctx, int phase) { #ifdef GRAM_RW_FUNC - return !!(gram_read(ctx, &(ctx->phy->burstdet)) & (1 << phase)); + return !!(gram_read(ctx, (void*)&(ctx->phy->burstdet)) & (1 << phase)); #else return !!(ctx->phy->burstdet & (1 << phase)); #endif diff --git a/libgram/src/dfii.c b/libgram/src/dfii.c index 8011668..58519bd 100644 --- a/libgram/src/dfii.c +++ b/libgram/src/dfii.c @@ -7,7 +7,7 @@ static void dfii_setcontrol(const struct gramCtx *ctx, uint8_t val) { #ifdef GRAM_RW_FUNC - gram_write(ctx, &(ctx->core->control), val); + gram_write(ctx, (void*)&(ctx->core->control), val); #else ctx->core->control = val; #endif @@ -23,7 +23,7 @@ void dfii_setsw(const struct gramCtx *ctx, bool software_control) { void dfii_set_p0_address(const struct gramCtx *ctx, uint32_t val) { #ifdef GRAM_RW_FUNC - gram_write(ctx, &(ctx->core->phases[0].address), val); + gram_write(ctx, (void*)&(ctx->core->phases[0].address), val); #else ctx->core->phases[0].address = val; #endif @@ -31,7 +31,7 @@ void dfii_set_p0_address(const struct gramCtx *ctx, uint32_t val) { void dfii_set_p0_baddress(const struct gramCtx *ctx, uint32_t val) { #ifdef GRAM_RW_FUNC - gram_write(ctx, &(ctx->core->phases[0].baddress), val); + gram_write(ctx, (void*)&(ctx->core->phases[0].baddress), val); #else ctx->core->phases[0].baddress = val; #endif @@ -39,8 +39,8 @@ void dfii_set_p0_baddress(const struct gramCtx *ctx, uint32_t val) { void dfii_p0_command(const struct gramCtx *ctx, uint32_t cmd) { #ifdef GRAM_RW_FUNC - gram_write(ctx, &(ctx->core->phases[0].command), cmd); - gram_write(ctx, &(ctx->core->phases[0].command_issue), 1); + gram_write(ctx, (void*)&(ctx->core->phases[0].command), cmd); + gram_write(ctx, (void*)&(ctx->core->phases[0].command_issue), 1); #else ctx->core->phases[0].command = cmd; ctx->core->phases[0].command_issue = 1;