On Wed, Jun 24, 2020 at 4:44 PM Andrzej Hajda a.hajda@samsung.com wrote:
On 24.06.2020 14:14, Rafael J. Wysocki wrote:
On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda a.hajda@samsung.com wrote:
Many resource acquisition functions return error value encapsulated in pointer instead of integer value. To simplify coding we can use macro which will accept both types of error. With this patch user can use: probe_err(dev, ptr, ...) instead of: probe_err(dev, PTR_ERR(ptr), ...) Without loosing old functionality: probe_err(dev, err, ...)
Signed-off-by: Andrzej Hajda a.hajda@samsung.com
The separation of this change from patch [1/5] looks kind of artificial to me.
You are introducing a new function anyway, so why not to make it what you want right away?
Two reasons:
1.This patch is my recent idea, I didn't want to mix it with already reviewed code.
- This patch could be treated hacky by some devs due to macro
definition and type-casting.
Fair enough.
There is some opposition against the $subject one, so I guess it may be dropped even.
Thanks!