RE: [PATCH 01/24] mpi3mr: add mpi30 Rev-R headers and Kconfig

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

 



> > +#ifndef MPI3_POINTER
> > +#define MPI3_POINTER    *
> > +#endif  /* MPI3_POINTER */
>
> Near and far pointers are concepts that come from 16-bit Intel
architectures. I
> think that these concepts are not relevant in the Linux kernel. Hence
please
> remove the MPI3_POINTER macro and use '*' directly.

Hi Bart,

All your comments are noted. This is a common header file used by Firmware
and all OS drivers.  That is a reason we need typedef and other coding
standard exception (mainly for mpi header files).
We will cover coding standards as you pointed in all other .c files.

>
> > +typedef u8 U8;
> > +typedef __le16 U16;
> > +typedef __le32 U32;
> > +typedef __le64 U64 __aligned(4);
>
> Typedefs like the above reduce source code readability significantly.
> Please remove these typedefs and use __le16 etc. directly.
>
> > +typedef U8 * PU8;
> > +typedef U16 * PU16;
> > +typedef U32 * PU32;
> > +typedef U64 * PU64;
>
> Same comment for the above typedefs.
>
> > +typedef struct _S64struct {
> > +    U32         Low;
> > +    S32         High;
> > +} S64struct;
> > +
> > +typedef struct _U64struct {
> > +    U32         Low;
> > +    U32         High;
> > +} U64struct;
>
> Please use upper_32_bits() and lower_32_bits() and remove the above
> structure definitions.
>
> > +typedef S8 * PS8;
> > +typedef U8 * PU8;
> > +typedef S16 * PS16;
> > +typedef U16 * PU16;
> > +typedef S32         *PS32;
> > +typedef U32         *PU32;
> > +typedef S64 * PS64;
> > +typedef U64 * PU64;
> > +typedef S64struct * PS64struct;
> > +typedef U64struct * PU64struct;
>
> Please remove these typedefs too. Additionally, please follow the Linux
kernel
> coding style (only a space at the left of '*' but not at the right).

One specific part of this file is undefined, so we can remove it
completely. I have to syncup internally since this file is shared header
file.

Kashyap

>
> Thanks,
>
> Bart.

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux