public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Hariprasad S <hariprasad@chelsio.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-scsi@vger.kernel.org, roland@purestorage.com,
	JBottomley@parallels.com, hch@infradead.org,
	swise@opengridcomputing.com, leedom@chelsio.com,
	praveenm@chelsio.com, anish@chelsio.com, nirranjan@chelsio.com,
	kumaras@chelsio.com
Subject: Re: [PATCHv2 net-next 0/3] RDMA/cxgb4,cxgb4vf,cxgb4i,csiostor: Cleanup macros
Date: Thu, 6 Nov 2014 21:45:10 +0530	[thread overview]
Message-ID: <20141106161444.GA8954@hariprasad-pc> (raw)
In-Reply-To: <20141105.145443.897956918105740779.davem@davemloft.net>

On Wed, Nov 05, 2014 at 14:54:43 -0500, David Miller wrote:
> From: Hariprasad Shenai <hariprasad@chelsio.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 linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-11-06 16:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04  2:50 [PATCHv2 net-next 0/3] RDMA/cxgb4,cxgb4vf,cxgb4i,csiostor: Cleanup macros Hariprasad Shenai
2014-11-04  2:50 ` [PATCHv2 net-next 1/3] cxgb4: Add cxgb4_debugfs.c, move all debugfs code to new file Hariprasad Shenai
2014-11-04  2:50 ` [PATCHv2 net-next 2/3] cxgb4: Cleanup macros so they follow the same style and look consistent Hariprasad Shenai
     [not found] ` <1415069457-22277-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-11-04  2:50   ` [PATCHv2 net-next 3/3] cxgb4: Cleanup macros so they follow the same style and look consistent, part 2 Hariprasad Shenai
2014-11-05 19:54   ` [PATCHv2 net-next 0/3] RDMA/cxgb4,cxgb4vf,cxgb4i,csiostor: Cleanup macros David Miller
2014-11-06 16:15     ` Hariprasad S [this message]
2014-11-06 21:57       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141106161444.GA8954@hariprasad-pc \
    --to=hariprasad@chelsio.com \
    --cc=JBottomley@parallels.com \
    --cc=anish@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=kumaras@chelsio.com \
    --cc=leedom@chelsio.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.com \
    --cc=praveenm@chelsio.com \
    --cc=roland@purestorage.com \
    --cc=swise@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox