Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752808AbdGHI7I (ORCPT ); Sat, 8 Jul 2017 04:59:08 -0400 Received: from esgaroth.petrovitsch.at ([78.47.184.11]:3945 "EHLO esgaroth.tuxoid.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752762AbdGHI7G (ORCPT ); Sat, 8 Jul 2017 04:59:06 -0400 Message-ID: <1499504311.3472.13.camel@petrovitsch.priv.at> Subject: Re: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with kvfree() From: Bernd Petrovitsch To: Amitoj Kaur Chawla , mchehab@kernel.org, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Sat, 08 Jul 2017 10:58:31 +0200 In-Reply-To: <20170708004102.GA27161@amitoj-Inspiron-3542> References: <20170708004102.GA27161@amitoj-Inspiron-3542> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-DCC-wuwien-Metrics: esgaroth.tuxoid.at 1290; Body=6 Fuz1=6 Fuz2=6 X-Spam-Report: * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 704 Lines: 27 On Fri, 2017-07-07 at 20:41 -0400, Amitoj Kaur Chawla wrote: [...] > --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c > +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c > @@ -117,11 +117,7 @@ void *atomisp_kernel_zalloc(size_t bytes, bool > zero_mem) >   */ >  void atomisp_kernel_free(void *ptr) >  { > - /* Verify if buffer was allocated by vmalloc() or kmalloc() > */ > - if (is_vmalloc_addr(ptr)) > - vfree(ptr); > - else > - kfree(ptr); > + kvfree(ptr); >  } >   >  /* Why not get rid of the trivial wrapper function completely? MfG, Bernd -- Bernd Petrovitsch Email : bernd@petrovitsch.priv.at LUGA : http://www.luga.at