Return-Path: Received: from mail-wr0-f196.google.com ([209.85.128.196]:40435 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752653AbeC2NQw (ORCPT ); Thu, 29 Mar 2018 09:16:52 -0400 Received: by mail-wr0-f196.google.com with SMTP id n2so2043312wrj.7 for ; Thu, 29 Mar 2018 06:16:51 -0700 (PDT) Subject: Re: [PATCH 1/3] virt: vbox: Add vbg_req_free() helper function To: Greg Kroah-Hartman Cc: Arnd Bergmann , Michael Thayer , linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20180329112116.26488-1-hdegoede@redhat.com> <20180329115630.GB6734@kroah.com> From: Hans de Goede Message-ID: Date: Thu, 29 Mar 2018 15:16:49 +0200 MIME-Version: 1.0 In-Reply-To: <20180329115630.GB6734@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: Hi, On 29-03-18 13:56, Greg Kroah-Hartman wrote: > On Thu, Mar 29, 2018 at 01:21:14PM +0200, Hans de Goede wrote: >> +void vbg_req_free(void *req, size_t len) >> +{ >> + if (!req) >> + return; >> + >> + kfree(req); >> +} > > Wait, no, this isn't ok. Don't create wrapper functions that you never > use except as a wrapper :( > > I can see someone sending me almost the indental revert patch right > after this one gets applied... The 2nd patch in the series changes this function to be more then just a wrapper around kfree. As mentioned in the commit message this is a preparation patch for that 2nd patch, the idea is that by splitting out the patch replacing all the kfree() calls with vbg_req_free() calls the 2nd patch becomes easier to review. Regards, Hans