Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2370566rdf; Mon, 6 Nov 2023 12:04:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpMCq+WApACmAVId8kQ27PxK9Fye5xHHtHJAYQrjmmRFamZXF0u8QDqkbCbsTR6IqTBnHi X-Received: by 2002:a05:6808:1509:b0:3b2:e32f:fddd with SMTP id u9-20020a056808150900b003b2e32ffdddmr34839696oiw.43.1699301055681; Mon, 06 Nov 2023 12:04:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699301055; cv=none; d=google.com; s=arc-20160816; b=dgovhU+vS5eohjxbc+gHyolFYxYWRLczD9ctt1+/tvp2Kr7N6dJLJlRRb4K7Ir2eS5 Egd2lJIfBuSzkTB+hszNWL4Y/IIoREvEKRUpsCziVbdo48Ibhwdu0Xo1VXmKBM02kSPq T7XWbE5jsKv1uqvbpsGM6TgOLj14yyLdi3dtcIjiEzozLd4p8efoUmfssZo2714HpDQK EWHkM+VfYhkl8J2Ti5XqxkTO4/ToQGxV2XNtKqA8tE5StbZd5WOyUKwSu8qR0AEKWQLN Mx6q3iwr+J7MlIsS6NMnbw+8b42IJwQVkHYcOAfGS1QsxiEdMPqnIwJzK+RsmwpqD/t8 LKUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:content-language:subject:from:mime-version:date :dkim-signature:message-id; bh=hKWfuOa3Q0szrCKnsOau3qz4CjBKZPrK1uXh9qY6QbE=; fh=tKz0vmj9Lm12wOZozyY1SqDfGk3/sdviOyUFEV3KBLM=; b=DCaGc+9uZhVMzfBAcXPOsK76QQjO2iYDl1h10+KAo3Yst+QPiPNihLW9m5t79TRci+ ePMC5zP92z4lgFkHnkhbtMFPlInxF9O3laNKgTVMJZgQA2ZMhd/McQvE4fjkP+Hxo9Q1 hLEAMyMkOjxFDlYvwmz5eM11EUt7fVjJIHoNE54EVrcBf/QykTNLCQa2EUAHCqwe8wYM 4O710c8dQm/nFp1uzGxHnJwmPx3RliNiPsUxxNGhE9f/E2/XOCsXxOvYWtpQItfz0KdS CycOiTEqog6TBgmszBSsb6U1gVGcjf/Kr3hoo3f+zSC4q4nIRfHn/4JVP0eoBqK367Ap VD0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ggrMO68H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o2-20020a05680803c200b003a38146f14asi3318867oie.200.2023.11.06.12.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 12:04:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ggrMO68H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 2756080323E1; Mon, 6 Nov 2023 12:04:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232949AbjKFUDz (ORCPT + 99 others); Mon, 6 Nov 2023 15:03:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232927AbjKFUDw (ORCPT ); Mon, 6 Nov 2023 15:03:52 -0500 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [IPv6:2001:41d0:203:375::ad]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8408DD49 for ; Mon, 6 Nov 2023 12:03:49 -0800 (PST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1699301026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hKWfuOa3Q0szrCKnsOau3qz4CjBKZPrK1uXh9qY6QbE=; b=ggrMO68Hc3yQhQ3zVNjiJqUqKRXuOGWP3Q2Tqlpk8/bJrZwMlYl6hCK2QhmMsQ8+Z9SLwx HlUdzCtuJildD3g4yc+AY/9PZVZdr1KudBaxlhgtPl3Lc58pwUvOmmMM6ypFTNG/p8EQ6i WkWEfOgIbWGdpiRUaCuH8kCD4caSA/8= Date: Mon, 6 Nov 2023 23:03:44 +0300 MIME-Version: 1.0 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vasily Averin Subject: Re: [PATCH] zram: extra zram_get_element call in zram_read_from_zspool() Content-Language: en-US To: Sergey Senozhatsky , Minchan Kim Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 12:04:13 -0800 (PST) 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