Re: [PATCH 2/2 v2] zram: clean up handle

From: Seth Jennings
Date: Wed May 23 2012 - 16:10:11 EST


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 <ngupta@xxxxxxxxxx>
> Cc: Seth Jennings <sjenning@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>


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: <sjenning@xxxxxxxxxxxxxxxxxx>

Thanks,
Seth

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/