@@ -1238,13 +1238,12 @@ void espi_mswv1_interrupt(void)
1238
1238
girq24_result = MCHP_INT_RESULT (24 );
1239
1239
MCHP_INT_SOURCE (24 ) = girq24_result ;
1240
1240
1241
- bpos = __builtin_ctz (girq24_result ); /* rbit, clz sequence */
1242
- while ( bpos != 32 ) {
1241
+ while (girq24_result ) {
1242
+ bpos = __builtin_ctz ( girq24_result ); /* rbit, clz sequence */
1243
1243
d = * (uint8_t * )(MCHP_ESPI_MSVW_BASE + 8 +
1244
1244
(12 * (bpos >> 2 )) + (bpos & 0x03 )) & 0x01 ;
1245
1245
(girq24_vw_handlers [bpos ])(d , bpos );
1246
1246
girq24_result &= ~(1ul << bpos );
1247
- bpos = __builtin_ctz (girq24_result );
1248
1247
}
1249
1248
}
1250
1249
DECLARE_IRQ (MCHP_IRQ_GIRQ24 , espi_mswv1_interrupt , 2 );
@@ -1259,13 +1258,12 @@ void espi_msvw2_interrupt(void)
1259
1258
girq25_result = MCHP_INT_RESULT (25 );
1260
1259
MCHP_INT_SOURCE (25 ) = girq25_result ;
1261
1260
1262
- bpos = __builtin_ctz (girq25_result ); /* rbit, clz sequence */
1263
- while ( bpos != 32 ) {
1261
+ while (girq25_result ) {
1262
+ bpos = __builtin_ctz ( girq25_result ); /* rbit, clz sequence */
1264
1263
d = * (uint8_t * )(MCHP_ESPI_MSVW_BASE + (12 * 7 ) + 8 +
1265
1264
(12 * (bpos >> 2 )) + (bpos & 0x03 )) & 0x01 ;
1266
1265
(girq25_vw_handlers [bpos ])(d , bpos );
1267
1266
girq25_result &= ~(1ul << bpos );
1268
- bpos = __builtin_ctz (girq25_result );
1269
1267
}
1270
1268
}
1271
1269
DECLARE_IRQ (MCHP_IRQ_GIRQ25 , espi_msvw2_interrupt , 2 );
0 commit comments