On 05/13/2015 05:08 PM, Luca Ceresoli wrote:
Several functions in this driver return a boolean: _SUCCESS = 1 on success,
_FAIL = 0 on error, defined in
drivers/staging/rtl8188eu/include/osdep_service.h.
The common practice in the Linux kernel is to return 0 on success, a negative
error code otherwise. This has the advantage that the return value also
describes the kind of error that happened, while a boolean squashes all errors
down a unique value.
Change rtw_start_drv_threads() to return a proper 0-or-error value.
Signed-off-by: Luca Ceresoli <l...@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gre...@linux.com>
Cc: Larry Finger <larry.fin...@lwfinger.net>
---
I think _SUCCESS and _FAIL should be totally eradicated and replaced with
proper error codes and my intent is to do it all over the codebase.
However, since that would be a massive change, I'm sending this small
patch to get some feedback. Should the idea be accepted, I'd go on.
I have no objections to the major change from those macros to simple 1 and 0.
Such changes would be more acceptable if you have the hardware and can test as
well to eliminate any subtle side effects..
Larry
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel