All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm: Use vsnprintf extension %ph
Date: Sat, 10 Jun 2017 17:20:48 -0700	[thread overview]
Message-ID: <1497140448.3254.3.camel@perches.com> (raw)
In-Reply-To: <CAHp75VcwKGmBHGk2NLEzsWofOOH5_rqnvfksx1Vq-+B1--gO+A@mail.gmail.com>

On Sat, 2017-06-10 at 19:12 +0300, Andy Shevchenko wrote:
> On Wed, May 31, 2017 at 2:35 AM, Joe Perches <joe@perches.com> wrote:
> > Using the extension saves a bit of code.
> > +               seq_printf(m, "faux/mst: %*ph\n", 2, buf);
> > +               seq_printf(m, "mst ctrl: %*ph\n", 1, buf);
> > +               seq_printf(m, "branch oui: %*phN devid: ", 3, buf);
> 
> All above may use shorter form, i.e.
> "..., "%Xph", buf);", where X is a constant written explicitly inplace.

I know.  Consistency is better though.
Note the use of DP_RECEIVER_CAP_SIZE, etc...

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm: Use vsnprintf extension %ph
Date: Sat, 10 Jun 2017 17:20:48 -0700	[thread overview]
Message-ID: <1497140448.3254.3.camel@perches.com> (raw)
In-Reply-To: <CAHp75VcwKGmBHGk2NLEzsWofOOH5_rqnvfksx1Vq-+B1--gO+A@mail.gmail.com>

On Sat, 2017-06-10 at 19:12 +0300, Andy Shevchenko wrote:
> On Wed, May 31, 2017 at 2:35 AM, Joe Perches <joe@perches.com> wrote:
> > Using the extension saves a bit of code.
> > +               seq_printf(m, "faux/mst: %*ph\n", 2, buf);
> > +               seq_printf(m, "mst ctrl: %*ph\n", 1, buf);
> > +               seq_printf(m, "branch oui: %*phN devid: ", 3, buf);
> 
> All above may use shorter form, i.e.
> "..., "%Xph", buf);", where X is a constant written explicitly inplace.

I know.  Consistency is better though.
Note the use of DP_RECEIVER_CAP_SIZE, etc...

  reply	other threads:[~2017-06-11  0:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30 23:35 [PATCH] drm: Use vsnprintf extension %ph Joe Perches
2017-05-30 23:35 ` Joe Perches
2017-05-31  8:31 ` Daniel Vetter
2017-05-31  8:31   ` Daniel Vetter
2017-06-10 16:12 ` Andy Shevchenko
2017-06-10 16:12   ` Andy Shevchenko
2017-06-11  0:20   ` Joe Perches [this message]
2017-06-11  0:20     ` Joe Perches
2017-06-11 13:52     ` Andy Shevchenko
2017-06-11 13:52       ` Andy Shevchenko

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=1497140448.3254.3.camel@perches.com \
    --to=joe@perches.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.