public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: SF Markus Elfring <elfring@users.sourceforge.net>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Linux USB List <linux-usb@vger.kernel.org>,
	Tony Olech <tony.olech@elandigitalsystems.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mmc: vub300: Use common code in __download_offload_pseudocode()
Date: Mon, 30 Oct 2017 12:15:09 +0000	[thread overview]
Message-ID: <20171030121508.zfnsvpsrt25prhr4@mwanda> (raw)
In-Reply-To: <CAPDyKFp6h_DAcDvDEMft_WApEakdPQiMw0v8t2fPVxS+H1KkOA@mail.gmail.com>

On Mon, Oct 30, 2017 at 12:40:39PM +0100, Ulf Hansson wrote:
> On 27 October 2017 at 21:31, SF Markus Elfring
> <elfring@users.sourceforge.net> wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Fri, 27 Oct 2017 21:21:40 +0200
> >
> > Add a jump target so that a specific string copy operation is stored
> > only once at the end of this function implementation.
> > Replace two calls of the function "strncpy" by goto statements.
> >
> > This issue was detected by using the Coccinelle software.
> >
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> 
> Thanks, applied for next!
> 

What's the advantage of this patch?  The new code seems more complicated
to me and GCC automatically reuses duplicate constant strings so there
is no memory savings.

regards,
dan capenter


  reply	other threads:[~2017-10-30 12:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 19:31 [PATCH] mmc: vub300: Use common code in __download_offload_pseudocode() SF Markus Elfring
2017-10-30 11:40 ` Ulf Hansson
2017-10-30 12:15   ` Dan Carpenter [this message]
2017-10-30 13:03     ` Ulf Hansson
2017-10-31  8:45       ` Dan Carpenter
2017-10-31  9:15         ` SF Markus Elfring
2017-10-31 15:10         ` [PATCH] " Ulf Hansson
2017-10-31 15:42           ` SF Markus Elfring

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=20171030121508.zfnsvpsrt25prhr4@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=elfring@users.sourceforge.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tony.olech@elandigitalsystems.com \
    --cc=ulf.hansson@linaro.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