Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1321946

Re: [PATCH v2 2/3] iio: light: opt3001: trivial type refactoring

From Andreas Dannenberg <dannenberg@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/3] iio: light: opt3001: trivial type refactoring
Date 2016-01-29 19:10 +0100
Message-ID <qWlED-71J-23@gated-at.bofh.it> (permalink)
References <qRBK2-6DH-3@gated-at.bofh.it> <qRBK3-6DH-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jan 16, 2016 at 05:14:37PM +0100, Alexander Koch wrote:
> Change variable type of struct opt3001 members 'ok_to_ignore_lock' and
> 'result_ready' uint16-bitfield of length one to bool.
> 
> They are used as bool, let the compiler do the optimization.
> 
> Signed-off-by: Alexander Koch <mail@alexanderkoch.net>
> Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>

Tested-by: Andreas Dannenberg <dannenberg@ti.com>

> ---
>  drivers/iio/light/opt3001.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
> index aefbd79..b05c484 100644
> --- a/drivers/iio/light/opt3001.c
> +++ b/drivers/iio/light/opt3001.c
> @@ -79,8 +79,8 @@ struct opt3001 {
>  	struct device		*dev;
>  
>  	struct mutex		lock;
> -	u16			ok_to_ignore_lock:1;
> -	u16			result_ready:1;
> +	bool			ok_to_ignore_lock;
> +	bool			result_ready;
>  	wait_queue_head_t	result_ready_queue;
>  	u16			result;
>  
> -- 
> 2.7.0
> 

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/3] iio: light: opt3001: trivial type refactoring Andreas Dannenberg <dannenberg@ti.com> - 2016-01-29 19:10 +0100

csiph-web