Commit 877b4ecb authored by Federico Vaga's avatar Federico Vaga

kernel: do not use statement-scope variable

When possible, avoid statement-scope variable for a better maintanability
of the code.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent a9b4d07c
......@@ -202,12 +202,11 @@ void svec_vic_irq_free(struct svec_dev *svec, unsigned long id)
int i;
for (i = 0; i < VIC_MAX_VECTORS; i++) {
uint32_t vec = svec->vic->vectors[i].saved_id;
if (vec == id) {
if (svec->vic->vectors[i].saved_id == id) {
spin_lock(&svec->vic->vec_lock);
vic_writel(svec->vic, 1 << i, VIC_REG_IDR);
vic_writel(svec->vic, vec, VIC_IVT_RAM_BASE + 4 * i);
vic_writel(svec->vic, id, VIC_IVT_RAM_BASE + 4 * i);
svec->vic->vectors[i].handler = NULL;
spin_unlock(&svec->vic->vec_lock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment