From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.parallels.com (mx2.parallels.com [64.131.90.16]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A2E892C0086 for ; Fri, 6 Jul 2012 19:07:06 +1000 (EST) Message-ID: <4FF6AA11.2010303@parallels.com> Date: Fri, 6 Jul 2012 13:04:17 +0400 From: Glauber Costa MIME-Version: 1.0 To: Li Zhong Subject: Re: [PATCH SLAB 1/2 v3] duplicate the cache name in SLUB's saved_alias list, SLAB, and SLOB References: <1341561286.24895.9.camel@ThinkPad-T420> In-Reply-To: <1341561286.24895.9.camel@ThinkPad-T420> Content-Type: text/plain; charset="UTF-8" Cc: Christoph Lameter , LKML , Pekka Enberg , linux-mm , Paul Mackerras , Matt Mackall , PowerPC email list , Wanlong Gao List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 07/06/2012 11:54 AM, Li Zhong wrote: > + if (!c && lname) > + kfree(lname); > + kfree can still be validly called with a NULL argument. No need for the lname in the conditional. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx183.postini.com [74.125.245.183]) by kanga.kvack.org (Postfix) with SMTP id 2B3CA6B0074 for ; Fri, 6 Jul 2012 05:07:03 -0400 (EDT) Message-ID: <4FF6AA11.2010303@parallels.com> Date: Fri, 6 Jul 2012 13:04:17 +0400 From: Glauber Costa MIME-Version: 1.0 Subject: Re: [PATCH SLAB 1/2 v3] duplicate the cache name in SLUB's saved_alias list, SLAB, and SLOB References: <1341561286.24895.9.camel@ThinkPad-T420> In-Reply-To: <1341561286.24895.9.camel@ThinkPad-T420> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Li Zhong Cc: LKML , Christoph Lameter , Pekka Enberg , Matt Mackall , Benjamin Herrenschmidt , Paul Mackerras , linux-mm , PowerPC email list , Wanlong Gao On 07/06/2012 11:54 AM, Li Zhong wrote: > + if (!c && lname) > + kfree(lname); > + kfree can still be validly called with a NULL argument. No need for the lname in the conditional. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753422Ab2GFJLG (ORCPT ); Fri, 6 Jul 2012 05:11:06 -0400 Received: from mx2.parallels.com ([64.131.90.16]:60110 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751749Ab2GFJKt (ORCPT ); Fri, 6 Jul 2012 05:10:49 -0400 Message-ID: <4FF6AA11.2010303@parallels.com> Date: Fri, 6 Jul 2012 13:04:17 +0400 From: Glauber Costa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Li Zhong CC: LKML , Christoph Lameter , Pekka Enberg , Matt Mackall , Benjamin Herrenschmidt , Paul Mackerras , linux-mm , PowerPC email list , Wanlong Gao Subject: Re: [PATCH SLAB 1/2 v3] duplicate the cache name in SLUB's saved_alias list, SLAB, and SLOB References: <1341561286.24895.9.camel@ThinkPad-T420> In-Reply-To: <1341561286.24895.9.camel@ThinkPad-T420> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/06/2012 11:54 AM, Li Zhong wrote: > + if (!c && lname) > + kfree(lname); > + kfree can still be validly called with a NULL argument. No need for the lname in the conditional.