diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 124ac6a..dbf8e87 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -3067,7 +3067,7 @@ static int ioctl_load_zone(unsigned long data) return -ENOMEM; } - ptr += sizeof(*z); + ptr = (char *) ptr + sizeof(*z); space -= sizeof(*z); dahdi_copy_string(z->name, work->th.name, sizeof(z->name)); @@ -3109,7 +3109,7 @@ static int ioctl_load_zone(unsigned long data) t = work->samples[x] = ptr; space -= sizeof(*t); - ptr += sizeof(*t); + ptr = (char *) ptr + sizeof(*t); /* Remember which sample is work->next */ work->next[x] = work->td.next; diff --git a/drivers/dahdi/dahdi_echocan_kb1.c b/drivers/dahdi/dahdi_echocan_kb1.c index 94f8523..7433d3e 100644 --- a/drivers/dahdi/dahdi_echocan_kb1.c +++ b/drivers/dahdi/dahdi_echocan_kb1.c @@ -266,7 +266,7 @@ static inline short get_cc_s(echo_can_cb_s *cb, int pos) static inline void init_cc(struct ec_pvt *pvt, int N, int maxy, int maxu) { - void *ptr = pvt; + char *ptr = (char *) pvt; unsigned long tmp; /* Double-word align past end of state */ @@ -281,9 +281,9 @@ static inline void init_cc(struct ec_pvt *pvt, int N, int maxy, int maxu) pvt->beta2_i = DEFAULT_BETA1_I; /* Allocate coefficient memory */ - pvt->a_i = ptr; + pvt->a_i = (int *) ptr; ptr += (sizeof(int) * pvt->N_d); - pvt->a_s = ptr; + pvt->a_s = (short *) ptr; ptr += (sizeof(short) * pvt->N_d); /* Reset Y circular buffer (short version) */ diff --git a/drivers/dahdi/dahdi_echocan_mg2.c b/drivers/dahdi/dahdi_echocan_mg2.c index 5dfd882..b2a102d 100644 --- a/drivers/dahdi/dahdi_echocan_mg2.c +++ b/drivers/dahdi/dahdi_echocan_mg2.c @@ -307,7 +307,7 @@ static inline short get_cc_s(echo_can_cb_s *cb, int pos) static inline void init_cc(struct ec_pvt *pvt, int N, int maxy, int maxu) { - void *ptr = pvt; + char *ptr = (char *) pvt; unsigned long tmp; /* Double-word align past end of state */ @@ -322,15 +322,15 @@ static inline void init_cc(struct ec_pvt *pvt, int N, int maxy, int maxu) pvt->beta2_i = DEFAULT_BETA1_I; /* Allocate coefficient memory */ - pvt->a_i = ptr; + pvt->a_i = (int *) ptr; ptr += (sizeof(int) * pvt->N_d); - pvt->a_s = ptr; + pvt->a_s = (short *) ptr; ptr += (sizeof(short) * pvt->N_d); /* Allocate backup memory */ - pvt->b_i = ptr; + pvt->b_i = (int *) ptr; ptr += (sizeof(int) * pvt->N_d); - pvt->c_i = ptr; + pvt->c_i = (int *) ptr; ptr += (sizeof(int) * pvt->N_d); /* Reset Y circular buffer (short version) */ @@ -387,7 +387,7 @@ static void echo_can_free(struct dahdi_chan *chan, struct dahdi_echocan_state *e } #ifdef DC_NORMALIZE -short inline dc_removal(int *dc_estimate, short samp) +static inline short dc_removal(int *dc_estimate, short samp) { *dc_estimate += ((((int)samp << 15) - *dc_estimate) >> 9); return samp - (*dc_estimate >> 15);