linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: andriy.shevchenko@linux.intel.com (Andy Shevchenko)
To: linux-arm-kernel@lists.infradead.org
Subject: [v2,1/1] ARM: orion5x: use mac_pton() helper
Date: Fri, 23 Feb 2018 17:18:48 +0200	[thread overview]
Message-ID: <1519399128.10722.111.camel@linux.intel.com> (raw)
In-Reply-To: <20180223150147.GA17857@lunn.ch>

+Cc Alexey

On Fri, 2018-02-23 at 16:01 +0100, Andrew Lunn wrote:
> > > The patch has been corrupted by you email client. But otherwise,
> > > yes.
> > > 
> > > Please take a look at:
> > > 
> > > https://www.kernel.org/doc/html/v4.12/process/submitting-patches.h
> > > tml
> > > 
> > > It will give you hits about correctly formatting the patch. In
> > > addition it should have:
> > > 
> > > Fixes: 4cd5773a2ae6 ("net: core: move mac_pton() to
> > > lib/net_utils.c")
> > > 
> > > before the --- line, to indicate what it is fixing.
> > > 
> > > This patch should be against
> > > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git,
> > > since it is a fix, and sent to <netdev@vger.kernel.org>.
> > 
> > Guys, consider this one instead:
> > https://patchwork.ozlabs.org/patch/851008/
> 
> Hi Andy
> 
> Thanks for pointing this patch out.
> 
> What is the advantage of doing to the strnlen()? As Stefan says, the
> code which follows will detect a short string, in that a NULL is not
> in [0-9a-f], nor a : .

I'm not sure, but my understanding is that, the strchr() call in the
original code or isxdigit() in the follow up change will trash a cache a
bit. Besides that some of the users are (often?) supplying empty strings
to convert from, and in this case makes sense to bail out fast.

Alexey, can you shed a light here?

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2018-02-23 15:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 14:12 [PATCH v2 1/1] ARM: orion5x: use mac_pton() helper Andy Shevchenko
2015-10-13 11:27 ` Detlef Vollmann
2015-10-15  7:51   ` Gregory CLEMENT
2018-02-22 17:45 ` [v2,1/1] " Stefan Hellermann
2018-02-22 21:42   ` Andrew Lunn
2018-02-22 23:18     ` Stefan Hellermann
2018-02-22 23:34       ` Andrew Lunn
2018-02-23 10:09         ` Andy Shevchenko
2018-02-23 15:01           ` Andrew Lunn
2018-02-23 15:18             ` Andy Shevchenko [this message]
2018-02-23 15:51               ` Andrew Lunn
2018-02-23 16:36                 ` Stefan Hellermann
2018-02-23 16:57                   ` Andy Shevchenko
2018-02-23 17:23                   ` Andrew Lunn
2018-02-23 18:20               ` Alexey Dobriyan
2018-02-23 20:17                 ` [PATCH] net: Allow mac_pton() to work on non-NULL terminated strings Stefan Hellermann
2018-02-23 20:27                   ` Andrew Lunn
2018-02-23 20:41                   ` Alexey Dobriyan
2018-02-23 20:51                     ` Andy Shevchenko
2018-02-26 18:37                   ` 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=1519399128.10722.111.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).