Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp428302rwd; Tue, 16 May 2023 03:07:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5l/cvPLrHeKK4BvF6g1Zii3oEe2i4hCLnETH2fzlkPZPV/T/Jr9xXAPXpLtrd1ogYvg2E7 X-Received: by 2002:a05:6a20:3caa:b0:105:f8e4:7227 with SMTP id b42-20020a056a203caa00b00105f8e47227mr9449994pzj.33.1684231624316; Tue, 16 May 2023 03:07:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684231624; cv=none; d=google.com; s=arc-20160816; b=pY/ijgJurBUrkV1WaYSQe0T2Qz0fAPWF95QhBfbLViVg+7y6AbuM9tWOvqV2hNJ0Wc erJZRSdG8mgTxAjW/nrjio4okAPwl9krzV0s2dfzAiRqhx5VHBeX+zWghXQSds2/NZ4I pxK/ycDx9jc8Gm7hgLuCdnOGASWrFyM53yDkXpvSX7VBlG7XltaAJ0VEcqy4QMSp+bwI 1bS/QPO/7r3mjpu1OVgtL9RLiOEPPJKy21kuZFzz9Z82RjIxumGKi/SxGV99jV2oyZvu yBmmh/bNFJr3q/tSbJBviI6unmNCyHlPNFRwfk563pV5QJSHORLA2uLLrXhADm4sjmQ3 i22w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tyBrBVnNr2SOCdaFWqHhcOXYMqWOw/MP+dWIFM1LTtg=; b=bUVPRLhQyUmacPlTEHgBM0Piprm9B5xbpDtw5yLdxc7epMKgW2tPIM1IhMbrJDdUqb fWu4n//CIeJ+RYD1SGhcacIVO6p6t7iHWW2qZeESrnvtH+xk0eqEqYEMWCqE+Sd53bSd 9yLnlWK9zEUyIffBAKNmqxXOadEbkFUJkQI9VfcQY+9cBLW4UvGP4BCPx7h6c5Gv8Waa GN4rTwMbJlZ1TV+dyb9hiqi1QrMjhGo6vlcSvchnkqX/lWKf1ZQjdsaV0THEf6syL1Dn oUrT67926M7wFi3ZbT8T6piP2vEH4TIOMH2212t210lvUDueNBfJOcE6hkcs5uX5JSQN UZXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RclO7+et; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u20-20020a634714000000b005340840c0c8si5497641pga.327.2023.05.16.03.06.51; Tue, 16 May 2023 03:07:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RclO7+et; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231996AbjEPJxf (ORCPT + 99 others); Tue, 16 May 2023 05:53:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231670AbjEPJxd (ORCPT ); Tue, 16 May 2023 05:53:33 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BC56120 for ; Tue, 16 May 2023 02:53:32 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-24decf5cc03so9526593a91.0 for ; Tue, 16 May 2023 02:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684230812; x=1686822812; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tyBrBVnNr2SOCdaFWqHhcOXYMqWOw/MP+dWIFM1LTtg=; b=RclO7+etUaKAQjyZ1S8NsH+uIH632x2W9GFsGzLA3xsG7SzNK1aZbCM4M4P98+udqJ 2EQErGfPB6nY+nSqePmqTMC4eRNLjVsyIrS4SHE6kgeKkDYVXhC+ptO8w4xC4VBwX8Aq UuIeIHDkDx5bynCZZEGpRa4bh/ORInxwhZOho= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684230812; x=1686822812; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tyBrBVnNr2SOCdaFWqHhcOXYMqWOw/MP+dWIFM1LTtg=; b=HeWZ59tqaa9r+fzubuqYmppNAP7hi1H5HZI3TElUApCRj1Pa5WQ4kUZfsoRIHo4juw Ru7Qj1V8rjaG30V6OBpbL0CI/dreegO7tayPWPoApBSr18DXLAFLutQ7BstLvD441gaa gi86z6y9kFd3IV/JSPLsur4lGOz89P6ebStb7OlErob84mbuusE9KMHGUL9tdDC1M3cu Fsni1wksm8snJITiFN7FSpqK/J8KaFOWSCK4ymA/qmyuOIsavFmaNMm4ud/oJnIdo9oG TvswzwYIjcUQrzFPqHwh0p6omx3WlGgszAKg9eTIJ/4wZXyLVFLgnpQvuljj3XAX56Og oGng== X-Gm-Message-State: AC+VfDxsPgWIMlVqtPEk9LSDf3d9crV2F0GGysn+wJHCfbfOW2QGYTgd u4RFwg8+m2guJxjwhs2J11t7vgRHkEgG4nmZnnE= X-Received: by 2002:a17:90a:8a8d:b0:24e:69e:71f with SMTP id x13-20020a17090a8a8d00b0024e069e071fmr35185215pjn.7.1684230812057; Tue, 16 May 2023 02:53:32 -0700 (PDT) Received: from google.com ([110.11.159.72]) by smtp.gmail.com with ESMTPSA id b30-20020a631b1e000000b0050bd4bb900csm13150378pgb.71.2023.05.16.02.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 02:53:31 -0700 (PDT) Date: Tue, 16 May 2023 18:53:27 +0900 From: Sergey Senozhatsky To: Alexey Romanov Cc: minchan@kernel.org, senozhatsky@chromium.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru Subject: Re: [PATCH v1 1/2] mm/zsmalloc: use ARRAY_SIZE in isolate_zspage() Message-ID: <20230516095327.GA15689@google.com> References: <20230516095029.49036-1-avromanov@sberdevices.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230516095029.49036-1-avromanov@sberdevices.ru> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (23/05/16 12:50), Alexey Romanov wrote: > mm/zsmalloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index 702bc3fd687a..f23c2da55368 100644 > --- a/mm/zsmalloc.c > +++ b/mm/zsmalloc.c > @@ -1888,7 +1888,7 @@ static struct zspage *isolate_zspage(struct size_class *class, bool source) > fg[1] = ZS_ALMOST_EMPTY; > } > > - for (i = 0; i < 2; i++) { > + for (i = 0; i < ARRAY_SIZE(fg); i++) { > zspage = list_first_entry_or_null(&class->fullness_list[fg[i]], > struct zspage, list); > if (zspage) { This patch needs to be dropped. We don't have that function anymore.