Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2780318rwd; Mon, 22 May 2023 04:22:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6D7ibE1A/MSr02LggiYYp09yYoV4PBocqcQWdGZKGwfrbLsJ1vtrJj0NS9A2F81BtO9uCe X-Received: by 2002:a05:6a21:998f:b0:10a:c0cb:43ea with SMTP id ve15-20020a056a21998f00b0010ac0cb43eamr9087054pzb.49.1684754575099; Mon, 22 May 2023 04:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684754575; cv=none; d=google.com; s=arc-20160816; b=mGNb33QD0+1rSC+UOqKZd1BNsLSZwqI3eV9dfuPSqn7VVxBpN/p43gKYKZD+PejPlh MCSGcVsReu1FBpfGIgNW1q1CdoE9Di9j+VkpAPoY0BAB5j/I8IMi8dIxwlExtgYmRrtV 00gCb9/07ZrahHctqXqjGgVNQWMDvSv7/hkE4a4c/Vrcuta5CUSGyy8sY3uU613Nc8Du wQ5Txjyo6YU2ZpO4e9blXpm6VyhBH0TfI+6GLqlmei9vASFRzZkrL7XNRNRXr9a/lEQm o+KRXGS2X5Q5J2lyh6xJezUmxMrKtkDUU6amSrb9hJ/9ZNLkKJ9UeINAuk5BBvNgUoi0 hplw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AqE7n0km0cT3SoKgXn9+9ffSGk68u7ZexKpVeyjeuP0=; b=qLv8+H/YOM4fYAesmEKXIf9zEkyyrGfRBAlSrgBpK0BhicjZ2vOKFbVwiUkFvS5m3I N8GRgmqfdX7waxUQ9uE9dId5QHwmShleggr29mfWCygPhu7OFxyRT/qGE9ywD4SQzbZY yvAxgDgleNrnKaRO59bDl4if5lSqY9SIcrfY3TMZ1j9yBilUtEkU2ZFx8w3wWtHIfx+T wwHxAQX2F4mwuJQLSVRC9TTxRvf/wVymenkC5TWNYE/FJQLAgtN4dIAG11glTjDySQg5 vWinyDOpW5nO4C3+UISWxt+S7zDZhHoZ95dl5aA6Q9A2IcKFMtKAQtAZ5pkQ7OgZwPyh uikQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=UI0Yt0lW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j190-20020a636ec7000000b00534769ac796si4817383pgc.495.2023.05.22.04.22.41; Mon, 22 May 2023 04:22:55 -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=@gmail.com header.s=20221208 header.b=UI0Yt0lW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233216AbjEVLOj (ORCPT + 99 others); Mon, 22 May 2023 07:14:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232442AbjEVLN4 (ORCPT ); Mon, 22 May 2023 07:13:56 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49A3340E8 for ; Mon, 22 May 2023 04:08:55 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-96f7377c86aso590975466b.1 for ; Mon, 22 May 2023 04:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684753733; x=1687345733; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AqE7n0km0cT3SoKgXn9+9ffSGk68u7ZexKpVeyjeuP0=; b=UI0Yt0lWDXh9ljMMkPAajAGV57h0505ib1ttO6nC+S6/ox2EoI9VGZd7+i0KyUT3Iz UrOeQv6HeCqlYMLmrO9xLceNit+eAAhp+ayorSX9GWMqWetCfy65fNLgsBYIBMUhhJ2L U75zeNwLejw8wEtPfmFV0nYxaTwgfXdcMVWerdFeHWF2BfssxPxEikaABdcefX8aVmFB OzcafrJAiZhR3U1i8vQurAWGDU7VgmaPUGDQ2nyXctKGB+RLSHtg6lFIAG/yBViPwShe HnTgtWcZBRbZXXW3R63z1IHpNcsR0E7wzcXRYrATiECZ/KAKp4PAjxmjbmz2ChABim6V aqqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684753733; x=1687345733; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AqE7n0km0cT3SoKgXn9+9ffSGk68u7ZexKpVeyjeuP0=; b=FmKUQSv/MjcYtCNoiHTuepGu3R8lTdL7NCEDNARzsccux8cUpsUKUO0gGbw2xAM2VG EnJskQzntNvpghe1aFBIUnPymWi9pM44dTNPg3qRJqMxPLrOdIuUm+oPaa++Rfrj7DK2 6Bsqw9C6dX4tOdt7oFJfL+pZZKgzsYdKtL7m+fBh4JjHu94i/lDyiLOGrW/Uc3bmXgaD sLp1bUga3EHITkbwgtfiiPLvtmBbPbIL00dYMj3yhAgQM/0sXLzItYxt70GHzADwKZSk 95JLoi8AO3NYYMt66t3oxRO/lnruNWNvv36e9uxfs0Z6J4sDnEhw37qFs7RMvbAGQC/o cHtQ== X-Gm-Message-State: AC+VfDz/REzDP87GihVnDMULruGiFuQLcEbc+obyOMGVJhnMQHMlsXD/ C+dYwoiSwCahUgCCTEebcbc= X-Received: by 2002:a17:907:2d23:b0:96a:928c:d382 with SMTP id gs35-20020a1709072d2300b0096a928cd382mr10346599ejc.48.1684753733572; Mon, 22 May 2023 04:08:53 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id lx19-20020a170906af1300b0094f07545d40sm2949453ejb.220.2023.05.22.04.08.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 04:08:53 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: linux-mm@kvack.org, Andrew Morton Cc: LKML , Baoquan He , Lorenzo Stoakes , Christoph Hellwig , Matthew Wilcox , "Liam R . Howlett" , Dave Chinner , "Paul E . McKenney" , Joel Fernandes , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH 2/9] mm: vmalloc: Rename adjust_va_to_fit_type() function Date: Mon, 22 May 2023 13:08:42 +0200 Message-Id: <20230522110849.2921-3-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230522110849.2921-1-urezki@gmail.com> References: <20230522110849.2921-1-urezki@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 This patch renames the adjust_va_to_fit_type() function to a shorter variant and more expressive. A new name is va_clip(). There is no a functional change as a result of this patch. Signed-off-by: Uladzislau Rezki (Sony) --- mm/vmalloc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 409285b68a67..5f900efec6a9 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1383,9 +1383,9 @@ classify_va_fit_type(struct vmap_area *va, } static __always_inline int -adjust_va_to_fit_type(struct rb_root *root, struct list_head *head, - struct vmap_area *va, unsigned long nva_start_addr, - unsigned long size) +va_clip(struct rb_root *root, struct list_head *head, + struct vmap_area *va, unsigned long nva_start_addr, + unsigned long size) { struct vmap_area *lva = NULL; enum fit_type type = classify_va_fit_type(va, nva_start_addr, size); @@ -1501,7 +1501,7 @@ va_alloc(struct vmap_area *va, return vend; /* Update the free vmap_area. */ - ret = adjust_va_to_fit_type(root, head, va, nva_start_addr, size); + ret = va_clip(root, head, va, nva_start_addr, size); if (WARN_ON_ONCE(ret)) return vend; @@ -3979,9 +3979,8 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, /* It is a BUG(), but trigger recovery instead. */ goto recovery; - ret = adjust_va_to_fit_type(&free_vmap_area_root, - &free_vmap_area_list, - va, start, size); + ret = va_clip(&free_vmap_area_root, + &free_vmap_area_list, va, start, size); if (WARN_ON_ONCE(unlikely(ret))) /* It is a BUG(), but trigger recovery instead. */ goto recovery; -- 2.30.2