lkml.org 
[lkml]   [2023]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] zram: extra zram_get_element call in zram_read_from_zspool()
On 11/6/23 22:55, Vasily Averin wrote:
> 'element' and 'handle' are union in struct zram_table_entry.

struct zram_table_entry {
union {
unsigned long handle;
unsigned long element;
};

I do not understand the sense of this union.
From my POV it just makes it harder to check the code because an reviewer doesn't
expect that the zram element can't be used together.
Can I remove this union at all and replace zram_get/set_element calls by zram_get/set_handle instead?

Thank you,
Vasily Averin

\
 
 \ /
  Last update: 2023-11-20 13:50    [W:0.046 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site