Skip to contentSkip to conversation

drivers/mfd/tps65090.c: duplicated TPS65090_INT_STS tests

DISCUSSION Fengguang Wu 2 participants 2 messages Jul 28, 2012 – Jul 30, 2012 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Hi Venu,

Is this coccinelle warning a trivial one, or indicates some copy&paste error? It's introduced by commit 3c33be06 ("mfd: Add support for TPS65090").

drivers/mfd/tps65090.c:239:5-30: duplicated argument to && or ||

vim +239 drivers/mfd/tps65090.c
236
237 static bool is_volatile_reg(struct device *dev, unsigned int reg)
238 {

Quoted 1 line

239 if ((reg = TPS65090_INT_STS) || (reg = TPS65090_INT_STS))

240 return true;
241 else
242 return false;

---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <[email protected]> Intel Corporation

#1 lore raw

Thanks for catching typo.
Plz push a patch with fix.

Thanks,
Venu

Quoted 27 lines

-----Original Message-----
From: Fengguang Wu [mailto:[email protected]]
Sent: Saturday, July 28, 2012 6:05 PM
To: Venu Byravarasu
Cc: Samuel Ortiz; Axel Lin; [email protected]; LKML
Subject: drivers/mfd/tps65090.c: duplicated TPS65090_INT_STS tests

Hi Venu,

Is this coccinelle warning a trivial one, or indicates some copy&paste error? It's introduced by commit 3c33be06 ("mfd: Add support for TPS65090").

drivers/mfd/tps65090.c:239:5-30: duplicated argument to && or ||

vim +239 drivers/mfd/tps65090.c
236
237 static bool is_volatile_reg(struct device *dev, unsigned int reg)
238 {

Quoted 1 line

239 if ((reg == TPS65090_INT_STS) || (reg == TPS65090_INT_STS))

   240			return true;
   241		else
   242			return false;

---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <[email protected]> Intel Corporation