Search Linux Wireless

Re: [PATCH] p54 various cleanups

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

 



On Monday 05 March 2007 11:06, Helge Deller wrote:
> > > -static const char *rfs[] = {
> > > +static const char * const rfs[] = {
> >
> > ?
>
> That's correct.
> 'rfs' is a pointer array to strings.
> The first part ("const char")  tells the compiler to put the strings into
> read-only memory. The second const after the * tells the compiler, that the
> pointer array itself is read-only as well. This prevents e.g. this kind of
> runtime modifications:  rfs[2] = "test"; Another example:
> drivers/video/s3fb.c:static const char * const s3_names[] = {"S3 Unknown",
> ... But if you don't like it, I'm fine wit dropping this part.
>
Nah, it's fine. It looked like it was doing that but I've never seen any code 
that actually did that so I wasn't sure.

> > BTW, you should have an updated summary for this patch.
>
> This one -> ?
>
> [PATCH] p54/rtl818x/zd1211rw  - various fixes
> - use PCI_DEVICE macro
> - add some const / __read_mostly annotations
> - mark some arrays 'static'
>
> Signed-off-by: Helge Deller <deller@xxxxxx>
>
Yup. Merged in my tree and pushing to wireless-dev. Thanks!

-Michael Wu

Attachment: pgpD2kyC0DaZJ.pgp
Description: PGP signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux