lkml.org 
[lkml]   [2017]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mmc: vub300: Use common code in __download_offload_pseudocode()
On 30 October 2017 at 13:15, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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.

It looked to me that the error path got a bit cleaner. However, I
guess it's matter of taste.

If you insist, I can drop it.

Kind regards
Uffe

\
 
 \ /
  Last update: 2017-10-30 14:04    [W:2.087 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site