Search Linux Wireless

Re: [PATCH v3 04/12] wifi: rtlwifi: Add rtl8192du/table.{c,h}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2024-03-27 at 14:36 +0200, Bitterblue Smith wrote:
> 
> On 27/03/2024 11:30, Ping-Ke Shih wrote:
> > On Wed, 2024-03-27 at 11:18 +0200, Kalle Valo wrote:
> > > Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> writes:
> > > 
> > > > > > --- /dev/null
> > > > > > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.c
> > > > > > @@ -0,0 +1,1675 @@
> > > > > > +// SPDX-License-Identifier: GPL-2.0
> > > > > > +/* Copyright(c) 2009-2012  Realtek Corporation.*/
> > > > > > +
> > > > > > +#include <linux/types.h>
> > > > > > +
> > > > > > +#include "table.h"
> > > > > > +
> > > > > > +u32 rtl8192du_phy_reg_2tarray[PHY_REG_2T_ARRAYLENGTH] = {
> > > > > 
> > > > > static const ?
> > > > > 
> > > > > > +
> > > > > > +u32 rtl8192du_phy_reg_array_pg[PHY_REG_ARRAY_PG_LENGTH] = {
> > > > > 
> > > > > static const ?
> > > > > 
> > > > 
> > > > I can make them static if I move them to table.h. Only phy.c
> > > > includes this header, so that should be fine.
> > > 
> > > Do note that .h files can't contain static variables, otherwise there
> > > will be duplicate data.
> > > 
> > 
> > Indeed, so these cases should be 'const u32', no need 'static'.
> > 
> > 
> 
> So I should leave them in table.c? Only phy.c includes table.h,
> so nothing would be duplicated.

I think so. What you need to do is to add 'const' to each of them. 






[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux