arm_adi_v5: deconflict local variables from global symbols

BeagleBone debian 7 builds produce:
   adi_v5_jtag.c: In function 'jtag_ap_q_bankselect':
   adi_v5_jtag.c:336:11: error: declaration of 'select' shadows a global declaration [-Werror=shadow]

Fix this by changing the local variable to 'sel'.

Change-Id: I8e29662ac12bc77d38d5064046d59b7364853cd9
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Reviewed-on: http://openocd.zylin.com/3184
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
__archive__
Peter A. Bigot 2015-12-31 09:13:58 -06:00 committed by Andreas Fritiofson
parent 2f131d3c30
commit 48768db9d6
2 changed files with 12 additions and 12 deletions

View File

@ -333,14 +333,14 @@ static int jtag_dp_q_write(struct adiv5_dap *dap, unsigned reg,
static int jtag_ap_q_bankselect(struct adiv5_ap *ap, unsigned reg)
{
struct adiv5_dap *dap = ap->dap;
uint32_t select = ((uint32_t)ap->ap_num << 24) | (reg & 0x000000F0);
uint32_t sel = ((uint32_t)ap->ap_num << 24) | (reg & 0x000000F0);
if (select == dap->select)
if (sel == dap->select)
return ERROR_OK;
dap->select = select;
dap->select = sel;
return jtag_dp_q_write(dap, DP_SELECT, select);
return jtag_dp_q_write(dap, DP_SELECT, sel);
}
static int jtag_ap_q_read(struct adiv5_ap *ap, unsigned reg,

View File

@ -162,15 +162,15 @@ static void swd_queue_dp_bankselect(struct adiv5_dap *dap, unsigned reg)
return;
uint32_t select_dp_bank = (reg & 0x000000F0) >> 4;
uint32_t select = select_dp_bank
uint32_t sel = select_dp_bank
| (dap->select & (DP_SELECT_APSEL | DP_SELECT_APBANK));
if (select == dap->select)
if (sel == dap->select)
return;
dap->select = select;
dap->select = sel;
swd_queue_dp_write(dap, DP_SELECT, select);
swd_queue_dp_write(dap, DP_SELECT, sel);
}
static int swd_queue_dp_read(struct adiv5_dap *dap, unsigned reg,
@ -210,16 +210,16 @@ static int swd_queue_dp_write(struct adiv5_dap *dap, unsigned reg,
static void swd_queue_ap_bankselect(struct adiv5_ap *ap, unsigned reg)
{
struct adiv5_dap *dap = ap->dap;
uint32_t select = ((uint32_t)ap->ap_num << 24)
uint32_t sel = ((uint32_t)ap->ap_num << 24)
| (reg & 0x000000F0)
| (dap->select & DP_SELECT_DPBANK);
if (select == dap->select)
if (sel == dap->select)
return;
dap->select = select;
dap->select = sel;
swd_queue_dp_write(dap, DP_SELECT, select);
swd_queue_dp_write(dap, DP_SELECT, sel);
}
static int swd_queue_ap_read(struct adiv5_ap *ap, unsigned reg,