From patchwork Tue Jun 7 10:59:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 12871717 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 875EEC43334 for ; Tue, 7 Jun 2022 11:00:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E62B96B0072; Tue, 7 Jun 2022 07:00:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E11886B0073; Tue, 7 Jun 2022 07:00:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD92E6B0074; Tue, 7 Jun 2022 07:00:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id BDF256B0072 for ; Tue, 7 Jun 2022 07:00:10 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 83AC035474 for ; Tue, 7 Jun 2022 11:00:10 +0000 (UTC) X-FDA: 79551145380.12.EDA01F5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf05.hostedemail.com (Postfix) with ESMTP id 118B610006A for ; Tue, 7 Jun 2022 10:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654599606; 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; bh=m6bVRDhDwqhXUEbC4cBSqv9R/0i33tbMnIdzh+Mzw68=; b=jNPVmkbmv6qGvsJTtjjAJLqyZdJmdpzmG4lkLQXegO6VIAjX3qR2KdxCSl6dN8drHemaOG NCrolURrPx8v8g9LR9zA7GnVFt7gBJpZ+JjY89KtfylWDUV8uFo0Z0OSpIemtTOWsMx2xc YYuaUJLRzyIxbi9UqGhAjMqAFO5ZCq8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-219-VII4NBxnMO2LXC51gicfMg-1; Tue, 07 Jun 2022 07:00:05 -0400 X-MC-Unique: VII4NBxnMO2LXC51gicfMg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 00B1C18A6523; Tue, 7 Jun 2022 11:00:05 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-13-113.pek2.redhat.com [10.72.13.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE4231121315; Tue, 7 Jun 2022 11:00:01 +0000 (UTC) From: Baoquan He To: akpm@linux-foundation.org, urezki@gmail.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, hch@infradead.org, Baoquan He Subject: [PATCH v2 0/4] Cleanup patches of vmalloc Date: Tue, 7 Jun 2022 18:59:54 +0800 Message-Id: <20220607105958.382076-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Stat-Signature: efjkh7dbo3d9wosq4w4upp9ant3gqkgi X-Rspam-User: Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=jNPVmkbm; spf=none (imf05.hostedemail.com: domain of bhe@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 118B610006A X-HE-Tag: 1654599567-195660 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Some cleanup patches found when reading vmalloc code. v1->v2: - In Patch 1, Uladzislau suggested a better way to improve code logic, and the NOTHING_FIT redundant checking issue naturally goes away. - Take off the old patch 5 in v1. Instead convert to use generic ioremap code in arch codes, then rename the left ioremap_page_range(). This should be done in later patches. This is suggested by Christoph. Baoquan He (4): mm/vmalloc: invoke classify_va_fit_type() in adjust_va_to_fit_type() mm/vmalloc: remove the redundant boundary check mm/vmalloc: fix typo in local variable name mm/vmalloc: Add code comment for find_vmap_area_exceed_addr() mm/vmalloc.c | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-)