projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1213a36
)
extcon: Make static analyzer happy about union assignment
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Mon, 27 Aug 2018 15:35:51 +0000
(18:35 +0300)
committer
Chanwoo Choi
<cw00.choi@samsung.com>
Tue, 28 Aug 2018 02:21:14 +0000
(11:21 +0900)
When assign unions we need to supply non-scalar value, otherwise
static analyzer is not happy:
CHECK drivers/extcon/extcon.c
drivers/extcon/extcon.c:631:22: warning: cast to non-scalar
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon.c
patch
|
blob
|
history
diff --git
a/drivers/extcon/extcon.c
b/drivers/extcon/extcon.c
index
b9d27c8
..
c21650a
100644
(file)
--- a/
drivers/extcon/extcon.c
+++ b/
drivers/extcon/extcon.c
@@
-628,7
+628,7
@@
int extcon_get_property(struct extcon_dev *edev, unsigned int id,
unsigned long flags;
int index, ret = 0;
- *prop_val = (union extcon_property_value)
(0)
;
+ *prop_val = (union extcon_property_value)
{0}
;
if (!edev)
return -EINVAL;