From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751900AbdJ3NDQ (ORCPT ); Mon, 30 Oct 2017 09:03:16 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:57290 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751167AbdJ3NDO (ORCPT ); Mon, 30 Oct 2017 09:03:14 -0400 X-Google-Smtp-Source: ABhQp+SVdfuj4J0HEdhUjxmpWegbuo1lyoRBoCuzQn5QWnPUgogz8goaaJet/UGjqNGX0/J4ZnmY2l8lJWWOs2212Mk= MIME-Version: 1.0 In-Reply-To: <20171030121508.zfnsvpsrt25prhr4@mwanda> References: <7b418db1-ec35-4c85-5d06-45edde56822c@users.sourceforge.net> <20171030121508.zfnsvpsrt25prhr4@mwanda> From: Ulf Hansson Date: Mon, 30 Oct 2017 14:03:13 +0100 Message-ID: Subject: Re: [PATCH] mmc: vub300: Use common code in __download_offload_pseudocode() To: Dan Carpenter Cc: SF Markus Elfring , "linux-mmc@vger.kernel.org" , Linux USB List , Tony Olech , LKML , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30 October 2017 at 13:15, Dan Carpenter wrote: > On Mon, Oct 30, 2017 at 12:40:39PM +0100, Ulf Hansson wrote: >> On 27 October 2017 at 21:31, SF Markus Elfring >> wrote: >> > From: Markus Elfring >> > 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 >> >> 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