[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB5866D85D97DD51AAA1E79E20E5C82@SJ0PR11MB5866.namprd11.prod.outlook.com>
Date: Tue, 4 Mar 2025 09:15:12 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>, joaomboni
<joaoboni017@...il.com>
CC: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>, "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH v2] e1000: The 'const' qualifier has
been added where applicable to enhance code safety and prevent unintended
modifications.
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Przemek Kitszel
> Sent: Tuesday, March 4, 2025 9:28 AM
> To: joaomboni <joaoboni017@...il.com>
> Cc: Nguyen, Anthony L <anthony.l.nguyen@...el.com>;
> andrew+netdev@...n.ch; davem@...emloft.net; edumazet@...gle.com;
> kuba@...nel.org; pabeni@...hat.com; intel-wired-lan@...ts.osuosl.org;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [Intel-wired-lan] [PATCH v2] e1000: The 'const' qualifier has been
> added where applicable to enhance code safety and prevent unintended
> modifications.
>
> On 3/3/25 21:47, joaomboni wrote:
> > Signed-off-by: Joao Bonifacio <joaoboni017@...il.com>
>
> it will be good to use imperative mood in the Subject, and add one more
> paragraph, like:
>
> Subject: e1000: mark global variables const where possible
>
I'd suggest 'fix'
e1000: fix global variables const where possible
But anyway the change is useful and so small and well-understandable.
> Next paragraph:
> Mark global variables const, so unintended modification would not be
> possible.
>
> > ---
> > drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c
> > b/drivers/net/ethernet/intel/e1000/e1000_main.c
> > index 3f089c3d47b2..96bc85f09aaf 100644
> > --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> > +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> > @@ -9,7 +9,7 @@
> > #include <linux/if_vlan.h>
> >
> > char e1000_driver_name[] = "e1000";
>
> your commit message suggests that you add const "everywhere", but it seems
> that there are other candidates, like the one above
>
> PS. You have to wait 24h before posting next revision.
>
> > -static char e1000_driver_string[] = "Intel(R) PRO/1000 Network
> > Driver";
> > +static const char e1000_driver_string[] = "Intel(R) PRO/1000 Network
> > +Driver";
> > static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel
> > Corporation.";
> >
> > /* e1000_pci_tbl - PCI Device ID Table
Powered by blists - more mailing lists