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] [day] [month] [year] [list]
Message-ID: <c91aed2e8b1530c2f4334774af510814@linux.vnet.ibm.com>
Date:   Tue, 30 Jun 2020 09:13:47 +0200
From:   haver <haver@...ux.vnet.ibm.com>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc:     linux-kernel@...r.kernel.org, arnd@...db.de,
        gregkh@...uxfoundation.org, Frank Haverkamp <haver@...ux.ibm.com>
Subject: Re: [PATCH 2/4] misc: genwqe: Constify struct pci_error_handlers

On 2020-06-11 00:47, Rikard Falkeborn wrote:
> genwqe_err_handler is never modified, so it can be made const to allow
> the compiler to put it in read-only memory.
> 
> Before:
>    text    data     bss     dec     hex filename
>   20174    6104    2464   28742    7046 drivers/misc/genwqe/card_base.o
> 
> After:
>    text    data     bss     dec     hex filename
>   20270    6008    2464   28742    7046 drivers/misc/genwqe/card_base.o
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>
> ---
>  drivers/misc/genwqe/card_base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/genwqe/card_base.c 
> b/drivers/misc/genwqe/card_base.c
> index 1dc6c7c5cbce..9969c0003f15 100644
> --- a/drivers/misc/genwqe/card_base.c
> +++ b/drivers/misc/genwqe/card_base.c
> @@ -1324,7 +1324,7 @@ static int genwqe_sriov_configure(struct pci_dev
> *dev, int numvfs)
>  	return 0;
>  }
> 
> -static struct pci_error_handlers genwqe_err_handler = {
> +static const struct pci_error_handlers genwqe_err_handler = {
>  	.error_detected = genwqe_err_error_detected,
>  	.mmio_enabled	= genwqe_err_result_none,
>  	.slot_reset	= genwqe_err_slot_reset,

Good idea. Thanks for the contribution.

Signed-off-by: Frank Haverkamp <haver@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ