lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141106161444.GA8954@hariprasad-pc>
Date:	Thu, 6 Nov 2014 21:45:10 +0530
From:	Hariprasad S <hariprasad@...lsio.com>
To:	David Miller <davem@...emloft.net>
CC:	<netdev@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
	<linux-scsi@...r.kernel.org>, <roland@...estorage.com>,
	<JBottomley@...allels.com>, <hch@...radead.org>,
	<swise@...ngridcomputing.com>, <leedom@...lsio.com>,
	<praveenm@...lsio.com>, <anish@...lsio.com>,
	<nirranjan@...lsio.com>, <kumaras@...lsio.com>
Subject: Re: [PATCHv2 net-next 0/3] RDMA/cxgb4,cxgb4vf,cxgb4i,csiostor:
 Cleanup macros

On Wed, Nov 05, 2014 at 14:54:43 -0500, David Miller wrote:
> From: Hariprasad Shenai <hariprasad@...lsio.com>
> Date: Tue,  4 Nov 2014 08:20:54 +0530
> 
> > It's not really the "hardware" which generates these hardware constant symbolic
> > macros/register defines of course, it's scripts developed by the hardware team.
> > Various patches have ended up changing the style of the symbolic macros/register
> > defines and some of them used the macros/register defines that matches the
> > output of the script from the hardware team.
> 
> We've told you that we don't care what format your internal whatever uses
> for these macros.
> 
> We have standards, tastes, and desires and reasons for naming macros
> in a certain way in upstream kernel code.
> 
> I consider it flat out unacceptable to use macros with one letter
> prefixes like "S_".  You simply should not do this.
> 

Okay. We’ll clean up all of the macros to match the files' original style. We
do need to change the sense of the *_MASK macros since they don’t match how we 
use them as field tokens.  Also the *_SHIFT, *_MASK and *_GET names are
sucking up space and making lines wrap unnecessarily, creating readability
problems.  Can we change these to *_S, *_M and *_G?  E.g.:

-#define  INGPADBOUNDARY_MASK    0x00000070U
-#define  INGPADBOUNDARY_SHIFT   4
-#define  INGPADBOUNDARY(x)      ((x) << INGPADBOUNDARY_SHIFT)
-#define  INGPADBOUNDARY_GET(x)  (((x) & INGPADBOUNDARY_MASK) \
-                                 >> INGPADBOUNDARY_SHIFT)
+#define  INGPADBOUNDARY_M       0x00000007U
+#define  INGPADBOUNDARY_S       4
+#define  INGPADBOUNDARY(x)      ((x) << INGPADBOUNDARY_S)
+#define  INGPADBOUNDARY_G(x)    (((x) >> INGPADBOUNDARY_S) \
+                                 & INGPADBOUNDARY_M)


 
Thanks,
Hari
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ