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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <434bc019-0204-40a2-7575-14aeb1f7cca5@mev.co.uk>
Date:   Mon, 27 Nov 2017 10:28:11 +0000
From:   Ian Abbott <abbotti@....co.uk>
To:     Alex Frappier Lachapelle <alex.frappierlachapelle@...il.com>,
        greg@...ah.com
Cc:     hsweeten@...ionengravers.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: comedi: das16: Fixed a const struct coding style
 issue

On 26/11/17 01:50, Alex Frappier Lachapelle wrote:
> Fixed a coding style issue.
> 
> Signed-off-by: Alex Frappier Lachapelle <Alex.FrappierLachapelle@...il.com>
> ---
>   drivers/staging/comedi/drivers/das16.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c
> index ddd4aeab6365..ed1e9e9b651d 100644
> --- a/drivers/staging/comedi/drivers/das16.c
> +++ b/drivers/staging/comedi/drivers/das16.c
> @@ -967,7 +967,7 @@ static const struct comedi_lrange *das16_ai_range(struct comedi_device *dev,
>   
>   	/* get any user-defined input range */
>   	if (pg_type == das16_pg_none && (min || max)) {
> -		struct comedi_lrange *lrange;
> +		const struct comedi_lrange *lrange;
>   		struct comedi_krange *krange;
>   
>   		/* allocate single-range range table */

NAK.  The following lines of source code allocate memory pointed to by 
'lrange' and modify it, so 'const' is not appropriate here.

> @@ -1001,7 +1001,7 @@ static const struct comedi_lrange *das16_ao_range(struct comedi_device *dev,
>   
>   	/* get any user-defined output range */
>   	if (min || max) {
> -		struct comedi_lrange *lrange;
> +		const struct comedi_lrange *lrange;
>   		struct comedi_krange *krange;
>   
>   		/* allocate single-range range table */
> 

Ditto.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ