lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 29 May 2015 01:25:43 +0900
From:	"Jingoo Han" <jingoohan1@...il.com>
To:	"'Hyungwon Hwang'" <human.hwang@...sung.com>
Cc:	<linux-kernel@...r.kernel.org>,
	"'Lee Jones'" <lee.jones@...aro.org>
Subject: Re: [PATCH] backlight: change the return type of backlight_update_status() to int

On Thursday, May 28, 2015 4:25 PM, Hyungwon Hwang wrote:
> 
> Backlight device returns the result of update_status(), but
> backlight_update_status() ignores it. So the consumers cannot confirm the
> result of their function call. This patch makes the result to be returned
> back for consumers.
> 
> Signed-off-by: Hyungwon Hwang <human.hwang@...sung.com>

Acked-by: Jingoo Han <jingoohan1@...il.com>

> ---
>  include/linux/backlight.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/backlight.h b/include/linux/backlight.h
> index adb14a8..1e7a69a 100644
> --- a/include/linux/backlight.h
> +++ b/include/linux/backlight.h
> @@ -117,12 +117,16 @@ struct backlight_device {
>  	int use_count;
>  };
> 
> -static inline void backlight_update_status(struct backlight_device *bd)
> +static inline int backlight_update_status(struct backlight_device *bd)
>  {
> +	int ret = -ENOENT;
> +
>  	mutex_lock(&bd->update_lock);
>  	if (bd->ops && bd->ops->update_status)
> -		bd->ops->update_status(bd);
> +		ret = bd->ops->update_status(bd);
>  	mutex_unlock(&bd->update_lock);
> +
> +	return ret;
>  }
> 
>  extern struct backlight_device *backlight_device_register(const char *name,
> --
> 1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ