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: <CY1PR0701MB20124ACD2CFD87EF9E1EFD6988C70@CY1PR0701MB2012.namprd07.prod.outlook.com>
Date:   Wed, 28 Feb 2018 08:21:20 +0000
From:   "Kalderon, Michal" <Michal.Kalderon@...ium.com>
To:     Hernán Gonzalez <hernan@...guardiasur.com.ar>,
        "Elior, Ariel" <Ariel.Elior@...ium.com>,
        Dept-Eng Everest Linux L2 <Dept-EngEverestLinuxL2@...ium.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] qlogic/qed: Constify *pkt_type_str[]

> From: Hernán Gonzalez [mailto:hernan@...guardiasur.com.ar]
> Sent: Wednesday, February 28, 2018 12:32 AM
> 
> Note: This is compile only tested as I have no access to the hw.
> Constifying and declaring as static saves 24 bytes.
> 
> add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24)
> Function                                     old     new   delta
> pkt_type_str                                  24       -     -24
> Total: Before=3599256, After=3599232, chg -0.00%
> 
> Signed-off-by: Hernán Gonzalez <hernan@...guardiasur.com.ar>
> ---
>  drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
> b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
> index ca4a81d..03ad4ee 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
> @@ -1784,7 +1784,7 @@ enum qed_iwarp_mpa_pkt_type {
>  /* fpdu can be fragmented over maximum 3 bds: header, partial mpa,
> unaligned */  #define QED_IWARP_MAX_BDS_PER_FPDU 3
> 
> -char *pkt_type_str[] = {
> +static const char * const pkt_type_str[] = {
>  	"QED_IWARP_MPA_PKT_PACKED",
>  	"QED_IWARP_MPA_PKT_PARTIAL",
>  	"QED_IWARP_MPA_PKT_UNALIGNED"
> --
> 2.7.4

Thanks

Acked-by: Michal Kalderon <michal.kalderon@...ium.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ