From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Riyan Dhiman <riyandhiman14@gmail.com>, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: rtl8192e: Constify struct pci_device_id
Date: Mon, 2 Sep 2024 19:37:56 +0200 [thread overview]
Message-ID: <cd97d2eb-25d9-423b-9037-c4cc3816a760@gmail.com> (raw)
In-Reply-To: <20240831160831.121720-1-riyandhiman14@gmail.com>
On 8/31/24 18:08, Riyan Dhiman wrote:
> static variable struct pci_device_id rtl8192_pci_id_tbl is not modified
> in file rtl_core.c.
>
> Constifying this structure moves some data to a read-only section, so
> increase overall security.
>
> Before
> ======
> text data bss dec hex filename
> 17838 893 1 18732 492c drivers/staging/rtl8192e/rtl8192e/rtl_core.o
>
> After
> =====
> text data bss dec hex filename
> 18006 725 1 18732 492c drivers/staging/rtl8192e/rtl8192e/rtl_core.o
>
> Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com>
> ---
> Compile tested only
> --
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> index ad21263e725f..22a203d01b8a 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> @@ -25,7 +25,7 @@
> int hwwep = 1;
> static char *ifname = "wlan%d";
>
> -static struct pci_device_id rtl8192_pci_id_tbl[] = {
> +static const struct pci_device_id rtl8192_pci_id_tbl[] = {
> {PCI_DEVICE(0x10ec, 0x8192)},
> {PCI_DEVICE(0x07aa, 0x0044)},
> {PCI_DEVICE(0x07aa, 0x0047)},
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
prev parent reply other threads:[~2024-09-02 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-31 16:08 Riyan Dhiman
2024-09-02 17:37 ` Philipp Hortmann [this message]
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=cd97d2eb-25d9-423b-9037-c4cc3816a760@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=riyandhiman14@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
all inboxes | Powered by JetHome®