mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: haver <haver@linux.vnet.ibm.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Cc: linux-kernel@vger.kernel.org, arnd@arndb.de,
	gregkh@linuxfoundation.org, Frank Haverkamp <haver@linux.ibm.com>
Subject: Re: [PATCH 2/4] misc: genwqe: Constify struct pci_error_handlers
Date: Tue, 30 Jun 2020 09:13:47 +0200	[thread overview]
Message-ID: <c91aed2e8b1530c2f4334774af510814@linux.vnet.ibm.com> (raw)
In-Reply-To: <20200610224704.27082-3-rikard.falkeborn@gmail.com>

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@gmail.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@linux.ibm.com>

  reply	other threads:[~2020-06-30  7:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 22:47 [PATCH 0/4] drivers/misc: Constify static structs Rikard Falkeborn
2020-06-10 22:47 ` [PATCH 1/4] misc: rtsx_usb: Constify struct usb_device_id Rikard Falkeborn
2020-06-10 22:47 ` [PATCH 2/4] misc: genwqe: Constify struct pci_error_handlers Rikard Falkeborn
2020-06-30  7:13   ` haver [this message]
2020-06-10 22:47 ` [PATCH 3/4] mei: hdcp: Constify struct mei_cl_device_id Rikard Falkeborn
2020-06-10 22:47 ` [PATCH 4/4] mic: vop: Constify static structs Rikard Falkeborn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c91aed2e8b1530c2f4334774af510814@linux.vnet.ibm.com \
    --to=haver@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=haver@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rikard.falkeborn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome