* [bug report] device property: Move FW type specific functionality to FW specific files
@ 2017-06-29 13:00 Dan Carpenter
2017-06-29 13:04 ` Dan Carpenter
2017-06-29 13:11 ` Sakari Ailus
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-06-29 13:00 UTC (permalink / raw)
To: kernel-janitors
Hello Sakari Ailus,
The patch 3708184afc77: "device property: Move FW type specific
functionality to FW specific files" from Jun 6, 2017, leads to the
following static checker warning:
drivers/base/property.c:256 fwnode_property_present()
warn: assigning (-6) to unsigned variable 'ret'
drivers/base/property.c
247 /**
248 * fwnode_property_present - check if a property of a firmware node is present
249 * @fwnode: Firmware node whose property to check
250 * @propname: Name of the property
251 */
252 bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname)
253 {
254 bool ret;
255
256 ret = fwnode_call_int_op(fwnode, property_present, propname);
^^^^^^^^^^^^^^^^^^
This macro can return negative error codes, which is treated as true and
I presume true means success.
257 if (ret = false && !IS_ERR_OR_NULL(fwnode) &&
258 !IS_ERR_OR_NULL(fwnode->secondary))
259 ret = fwnode_call_int_op(fwnode->secondary, property_present,
260 propname);
261 return ret;
262 }
263 EXPORT_SYMBOL_GPL(fwnode_property_present);
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug report] device property: Move FW type specific functionality to FW specific files
2017-06-29 13:00 [bug report] device property: Move FW type specific functionality to FW specific files Dan Carpenter
@ 2017-06-29 13:04 ` Dan Carpenter
2017-06-29 13:11 ` Sakari Ailus
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-06-29 13:04 UTC (permalink / raw)
To: kernel-janitors
Also on the next lines:
drivers/base/property.c:259 fwnode_property_present() warn: assigning (-6) to unsigned variable 'ret'
And really it should have complained about fwnode_device_is_available()
but it doesn't.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug report] device property: Move FW type specific functionality to FW specific files
2017-06-29 13:00 [bug report] device property: Move FW type specific functionality to FW specific files Dan Carpenter
2017-06-29 13:04 ` Dan Carpenter
@ 2017-06-29 13:11 ` Sakari Ailus
1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2017-06-29 13:11 UTC (permalink / raw)
To: kernel-janitors
On 06/29/17 16:04, Dan Carpenter wrote:
> Also on the next lines:
> drivers/base/property.c:259 fwnode_property_present() warn: assigning (-6) to unsigned variable 'ret'
>
> And really it should have complained about fwnode_device_is_available()
> but it doesn't.
Will fix.
Thanks, Dan!
--
Sakari Ailus
sakari.ailus@linux.intel.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-29 13:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 13:00 [bug report] device property: Move FW type specific functionality to FW specific files Dan Carpenter
2017-06-29 13:04 ` Dan Carpenter
2017-06-29 13:11 ` Sakari Ailus
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.