driver:core: no need to invert the return value of the call_driver_probe()
PATCH v2 1/1 driver:core: no need to invert the return value of the call_driver_probe()
If drv->probe() or drv->bus->probe() returns EPROBE_DEFER, then there is no need to invert the sign. Similarly, if it returns -EPROBE_DEFER, no sign inversion is needed either
In the probe function (either bus->probe() or drv->probe()), there is no return value of EPROBE_DEFER.
v2:
Delete the judgment with the return value of EPROBEDEFER from the _driver_probe.device()
v1:
Add the judgment with the return value of EPROBEDEFER from the _driver_probe.device()
--- drivers/base/dd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/base/dd.c +1 -6
@@ -664,11 +664,6 @@ static int really_probe(struct device *dev, struct device_driver *drv)if (link_ret == -EAGAIN ) ret = -EPROBE_DEFER ; -/* -* Return probe errors as positive values so that the callers -* can distinguish them from other errors. -*/ - ret = -ret; goto probe_failed; }
@@ -826,7 +821,7 @@ static int driver_probe_device(struct device_driver *drv, struct device *dev)atomic_inc (&probe_count); ret =__driver_probe_device (drv, dev); -if (ret == -EPROBE_DEFER || ret ==EPROBE_DEFER ) { +if (ret == -EPROBE_DEFER ) {driver_deferred_probe_add (dev);/*
Signature · 1 line
2.17.1
Greg KH
maintainerQuoted 4 lines · Lizhe
If
drv->probe()ordrv->bus->probe()returnsEPROBE_DEFER, then there is no need to invert the sign. Similarly, if it returns -EPROBE_DEFER, no sign inversion is needed either
Quoted 8 lines
In the probe function (either
bus->probe()ordrv->probe()), there is no return value ofEPROBE_DEFER.
v2:
Delete the judgment with the return value of EPROBEDEFER from the_driver_probe.device()
v1:
Add the judgment with the return value of EPROBEDEFER from the_driver_probe.device()
Versions go below the --- line as the documentation says.
Quoted 1 line
Signed-off-by Lizhe <[email protected]>
Full name?
thanks,
greg k-h
A message that is not in the archive (sent off-list or not yet received): [email protected]
Greg KH
maintainerQuoted 9 lines · lizhe
Hi, Greg KH
have already submitted the third version. My name is 李哲. In pinyin, it's Lizhe, and my email is [email protected]
Why not just use "李哲"? No reason we can't use the proper representation of your name in the changelog, right?
thanks,
greg k-h