All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Guenter Roeck <groeck@google.com>
Cc: Jun Li <jun.li@nxp.com>, Guenter Roeck <groeck@chromium.org>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	Chandra Sekhar Anagani <chandra.sekhar.anagani@intel.com>,
	Bruce Ashfield <bruce.ashfield@windriver.com>,
	Bin Gao <bin.gao@intel.com>,
	Pranav Tipnis <pranav.tipnis@intel.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [RFC PATCH v3 1/2] usb: typec: USB Type-C Port Manager (tcpm)
Date: Fri, 30 Sep 2016 14:02:45 -0700	[thread overview]
Message-ID: <1475269365.1880.6.camel@perches.com> (raw)
In-Reply-To: <CABXOdTc6fA0RM-Osw96Dwwcy0PG1tyq-E07Fs2TJceYOe1ng6A@mail.gmail.com>

On Fri, 2016-09-30 at 13:57 -0700, Guenter Roeck wrote:
> Code now looks as follows.
> 
> #define PDO_VAR_MIN_VOLT(mv) ((((mv) / 50) & PDO_VAR_MIN_VOLT_MASK) << \
>                               PDO_VAR_MIN_VOLT_SHIFT)
> #define PDO_VAR_MAX_VOLT(mv) ((((mv) / 50) & PDO_VAR_MAX_VOLT_MASK) << \
>                               PDO_VAR_MAX_VOLT_SHIFT)
> #define PDO_VAR_MAX_CURR(ma) ((((ma) / 10) & PDO_VAR_MAX_CURR_MASK) << \
>                               PDO_VAR_MAX_CURR_SHIFT)

When #defines are continued, I generally find it nicer to have the
entire definition on a separate line

#define PDO_VAR_MIN_VOLT(mv)						\
	((((mv) / 50) & PDO_VAR_MIN_VOLT_MASK) << PDO_VAR_MIN_VOLT_SHIFT)

> Though maybe I should just ignore line length limits or use shorter defines.

When it makes sense, yes please.

  reply	other threads:[~2016-09-30 21:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 21:10 [RFC PATCH v3 0/2] Type-C Port Manager Guenter Roeck
2016-08-23 21:10 ` [RFC PATCH v3 1/2] usb: typec: USB Type-C Port Manager (tcpm) Guenter Roeck
2016-09-10  0:26   ` Jun Li
2016-09-10  2:23     ` Guenter Roeck
2016-09-12  2:16       ` Jun Li
2016-09-12  2:23         ` Guenter Roeck
2016-09-12  2:41           ` Jun Li
2016-09-29 14:35   ` Jun Li
2016-09-29 16:36     ` Guenter Roeck
2016-09-30  6:41       ` Jun Li
2016-09-30 15:46         ` Guenter Roeck
2016-09-30  6:37   ` Jun Li
2016-09-30 19:06     ` Guenter Roeck
2016-09-30 19:41       ` Joe Perches
2016-09-30 20:57         ` Guenter Roeck
2016-09-30 21:02           ` Joe Perches [this message]
2016-10-03 14:04   ` Heikki Krogerus
2016-08-23 21:10 ` [RFC PATCH v3 2/2] usb: typec: Type-C Port Controller Interface driver (tcpci) Guenter Roeck
2016-09-30  6:24   ` Jun Li
2016-09-30 18:45     ` Guenter Roeck
2016-10-01  0:12       ` Jun Li
2016-10-01 16:27         ` Guenter Roeck
2016-08-24 12:52 ` [RFC PATCH v3 0/2] Type-C Port Manager Heikki Krogerus
2016-08-24 17:56   ` Guenter Roeck

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=1475269365.1880.6.camel@perches.com \
    --to=joe@perches.com \
    --cc=bin.gao@intel.com \
    --cc=bruce.ashfield@windriver.com \
    --cc=chandra.sekhar.anagani@intel.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=groeck@chromium.org \
    --cc=groeck@google.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jun.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pranav.tipnis@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.