From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx107.postini.com [74.125.245.107]) by kanga.kvack.org (Postfix) with SMTP id A1F916B0083 for ; Wed, 23 May 2012 16:10:11 -0400 (EDT) Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 23 May 2012 14:10:10 -0600 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id E685CC40002 for ; Wed, 23 May 2012 14:09:56 -0600 (MDT) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q4NK9iFm036080 for ; Wed, 23 May 2012 14:09:47 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q4NK9hok030490 for ; Wed, 23 May 2012 14:09:44 -0600 Message-ID: <4FBD4402.7060509@linux.vnet.ibm.com> Date: Wed, 23 May 2012 15:09:38 -0500 From: Seth Jennings MIME-Version: 1.0 Subject: Re: [PATCH 2/2 v2] zram: clean up handle References: <1337737402-16543-1-git-send-email-minchan@kernel.org> <1337737402-16543-2-git-send-email-minchan@kernel.org> In-Reply-To: <1337737402-16543-2-git-send-email-minchan@kernel.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Nitin Gupta On 05/22/2012 08:43 PM, Minchan Kim wrote: > zram's handle variable can store handle of zsmalloc in case of > compressing efficiently. Otherwise, it stores point of page descriptor. > This patch clean up the mess by union struct. > > changelog > * from v1 > - none(new add in v2) > > Cc: Nitin Gupta > Cc: Seth Jennings > Signed-off-by: Minchan Kim Not sure if the BUILD_BUG is completely needed since it's pretty well assumed that sizeof(unsigned long) == sizeof(void *) but it does provide some safety is someone tries to change the type of handle. Acked-by: Thanks, Seth -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ 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 S1760579Ab2EWUKL (ORCPT ); Wed, 23 May 2012 16:10:11 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:56892 "EHLO e8.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756684Ab2EWUKJ (ORCPT ); Wed, 23 May 2012 16:10:09 -0400 Message-ID: <4FBD4402.7060509@linux.vnet.ibm.com> Date: Wed, 23 May 2012 15:09:38 -0500 From: Seth Jennings User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Minchan Kim CC: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Nitin Gupta Subject: Re: [PATCH 2/2 v2] zram: clean up handle References: <1337737402-16543-1-git-send-email-minchan@kernel.org> <1337737402-16543-2-git-send-email-minchan@kernel.org> In-Reply-To: <1337737402-16543-2-git-send-email-minchan@kernel.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12052320-9360-0000-0000-0000069FAB8E Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/22/2012 08:43 PM, Minchan Kim wrote: > zram's handle variable can store handle of zsmalloc in case of > compressing efficiently. Otherwise, it stores point of page descriptor. > This patch clean up the mess by union struct. > > changelog > * from v1 > - none(new add in v2) > > Cc: Nitin Gupta > Cc: Seth Jennings > Signed-off-by: Minchan Kim Not sure if the BUILD_BUG is completely needed since it's pretty well assumed that sizeof(unsigned long) == sizeof(void *) but it does provide some safety is someone tries to change the type of handle. Acked-by: Thanks, Seth