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: <20200923014838.GA3267@shinobu>
Date:   Tue, 22 Sep 2020 21:48:38 -0400
From:   William Breathitt Gray <vilhelm.gray@...il.com>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc:     Kamel Bouhara <kamel.bouhara@...tlin.com>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] counter: microchip-tcb-capture: Constify mchp_tc_ops

On Tue, Sep 22, 2020 at 10:19:41PM +0200, Rikard Falkeborn wrote:
> The only usage of mchp_tc_ops is to assign its address to the ops field
> in the counter_device struct which is a const pointer. Make it const to
> allow the compiler to put it in read-only memory.
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>

Acked-by: William Breathitt Gray <vilhelm.gray@...il.com>

> ---
>  drivers/counter/microchip-tcb-capture.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c
> index b7b252c5addf..039c54a78aa5 100644
> --- a/drivers/counter/microchip-tcb-capture.c
> +++ b/drivers/counter/microchip-tcb-capture.c
> @@ -253,7 +253,7 @@ static struct counter_count mchp_tc_counts[] = {
>  	},
>  };
>  
> -static struct counter_ops mchp_tc_ops = {
> +static const struct counter_ops mchp_tc_ops = {
>  	.signal_read  = mchp_tc_count_signal_read,
>  	.count_read   = mchp_tc_count_read,
>  	.function_get = mchp_tc_count_function_get,
> -- 
> 2.28.0
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ