Skip to content

Commit c3e6edd

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Remove redundant use of local variable
Remove redundant use of local variable chan_idx in the lll_chan_iso_subevent() function. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 86757f5 commit c3e6edd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

subsys/bluetooth/controller/ll_sw/lll_chan.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ uint8_t lll_chan_iso_subevent(uint16_t chan_id, uint8_t *chan_map,
127127
uint16_t *remap_idx)
128128
{
129129
uint16_t prn_subevent_se;
130-
uint8_t chan_idx;
131130
uint8_t d;
132131
uint8_t x;
133132

@@ -145,10 +144,9 @@ uint8_t lll_chan_iso_subevent(uint16_t chan_id, uint8_t *chan_map,
145144
}
146145

147146
*remap_idx = ((((uint32_t)prn_subevent_se * x) >> 16) +
148-
d + *remap_idx) % chan_count;
149-
chan_idx = chan_sel_remap(chan_map, *remap_idx);
147+
d + *remap_idx) % chan_count;
150148

151-
return chan_idx;
149+
return chan_sel_remap(chan_map, *remap_idx);
152150
}
153151
#endif /* CONFIG_BT_CTLR_ISO */
154152
#endif /* CONFIG_BT_CTLR_CHAN_SEL_2 */

0 commit comments

Comments
 (0)