From patchwork Wed Jun 2 08:47:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 12293439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84BF1C47083 for ; Wed, 2 Jun 2021 08:48:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0736061026 for ; Wed, 2 Jun 2021 08:48:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0736061026 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8DC786B006C; Wed, 2 Jun 2021 04:47:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88CE86B006E; Wed, 2 Jun 2021 04:47:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DEF06B0070; Wed, 2 Jun 2021 04:47:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0159.hostedemail.com [216.40.44.159]) by kanga.kvack.org (Postfix) with ESMTP id 38BB96B006C for ; Wed, 2 Jun 2021 04:47:59 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B9E22180AD806 for ; Wed, 2 Jun 2021 08:47:58 +0000 (UTC) X-FDA: 78208156236.11.6EAF44E Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2089.outbound.protection.outlook.com [40.107.92.89]) by imf05.hostedemail.com (Postfix) with ESMTP id 25FF7E000245 for ; Wed, 2 Jun 2021 08:47:41 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LEBiPhET14OXOLIQF3ioXK41NkXanxCHsOJZgfZIm2Q5hfYaoS1hzacGrnHjxqscgMNtGe9l2etJanpnpqYAxojRnGsN/z3WsYsbsyz+sBYBDKKpVVfub5lf+DAywsdKFJzdg0KJoQTzkFwjtV49jNimgA66ETcML4EhaC86lvnYdZsqCWP/pX/SvN9AVVYq+aiqKceSQsy6ZaIgAUNi/lM2L2Szn6F4bkxO7HuC4eZrxTR45HuvUh90re4EsmguwAWTJiW1t2zOvkFsjhFKV3PO1enQC5D5e2gVdp8BAsPh/Qiuyq14ZP5PSmIioVg1xQloadQY6BgfEZ/noq8ARg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SM1AeGLPP9rmAZCA8H7refkPrJcT1OVACUSn0U45FPE=; b=B5dwm76qLOEnDDFJo37P1W1WZ3UN9bkpBGq+Qbw65rzQrhYSEqKCEKsNDjvEWZMM3vL2ALQrqdCFmEsM81TY/E9VIqbsbYbBMjvHtlZHWM7f+gFfI1bFA8VDsxcVm4vRqeWr+zc/m+3DqJL6RbMYiTXU34Jyo4RyaJpPzrJzFYL1ELwmx0RZg+kIWmEdLyCDPUQG4+fM7N7+59em/Sbt3fDzBrsrZs+wD1BGE1rRiU64Aw6gsKMKJlY0lkvWC2Xb12exOEDesbdbzE/p/+K7YK+fHCUr+avGEuwUXDozRceQ9buRgxSgvZOSumuoa1JZYVWsE4X345bMUxuMmOLgaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.36) smtp.rcpttodomain=kvack.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SM1AeGLPP9rmAZCA8H7refkPrJcT1OVACUSn0U45FPE=; b=MgrkfyjiWx/iIwJK+1d/bmZI2ybUJm9xkte8MTVrAyUu/fTR9suXmP8upLXq4XqgSfzfIHuQKkCAFXUx+LCJZHjIPpfX80gk2KjGUeGWCD2ZtRbYUNR58KFwhssASSbyp46FP+2bjoQMXEHnh249K5WmtIzg3qZsfZTpC/v6DVZIUGhYMoUhYM+oy2edTlH2bCo3ibaC0OweHMxLBaqsj2c7pBLSzY03vra0Bqzv48wHH5pAaqvchAP4LtFGqTC0/sJm+dChRL3UrQeLJbFxN2V99BaZIIhkq5O++wsg9ft/kuo2tKIWlGQ1Nc51zT6SNnx2kqovB+tVHj2BbmQ5Vg== Received: from DM6PR08CA0030.namprd08.prod.outlook.com (2603:10b6:5:80::43) by CY4PR1201MB2502.namprd12.prod.outlook.com (2603:10b6:903:da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.27; Wed, 2 Jun 2021 08:47:56 +0000 Received: from DM6NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:5:80:cafe::16) by DM6PR08CA0030.outlook.office365.com (2603:10b6:5:80::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Wed, 2 Jun 2021 08:47:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.36) smtp.mailfrom=nvidia.com; kvack.org; dkim=none (message not signed) header.d=none;kvack.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.36 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.36; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.36) by DM6NAM11FT060.mail.protection.outlook.com (10.13.173.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4150.30 via Frontend Transport; Wed, 2 Jun 2021 08:47:56 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Jun 2021 08:47:55 +0000 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Jun 2021 08:47:55 +0000 Received: from r-arch-stor03.mtr.labs.mlnx (172.20.187.5) by mail.nvidia.com (172.20.187.18) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 2 Jun 2021 08:47:53 +0000 From: Max Gurtovoy To: , CC: , , , Max Gurtovoy Subject: [PATCH 1/2] mm,memory_hotplug: align code to fit 80 characters per line Date: Wed, 2 Jun 2021 11:47:51 +0300 Message-ID: <20210602084752.3534-1-mgurtovoy@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22719209-84be-4b12-9d64-08d925a31e1a X-MS-TrafficTypeDiagnostic: CY4PR1201MB2502: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:156; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AoLzi5lzToG4BchglU1vZwyXVMChU8TIpKHp1NOeScjLYCnbKW6fvnQsasGCjtA1Hx2Ok8VA7dosq57WRL8mvdZGmyx8Na1AN+Nt9GRMAVw6xi2VfpB5ZUNnjDSFhabQ/OLPglKND0XoPQspoubNZRwnWgP//lJcRAQiUuMCx3RPUr5p6tB2RHz2gskBJ91YAx6vml2eDkrAw90WHk8721wGGUhhvWFPIhZg7sbntwaHcRUy5rC7AaVwjtCyd/mnPwIFZ772gqxcxKuOc0a0Dvw8e3XQEhhx3q1Z2bZ65SiRzEUhFDWJQIC1BUAxZcebkAFTtuYhOKSqUATa6JyRym2ZsswOSxPpAYty5rBqmCSlB4kkrUULJkO4i8vncYaour4xFFiHtjpJ+zdev9w/XFjO6e+ly0t0BTemPTSvFD5FVrxOHlwALvbn26bvLs2DwJDiu8rYBQWuqg/bGO6zSLl5VfPpfiYt7FzdyVPI9+v8EaLgYXm0YBA5JjE8gxCMR9cNvpiO8fteKxAQMd6Jm73/4DoSAUdm9i21mAGhY/d1r0DQp9IoQ88J4TrkQoNubntFO5tJqZX7BpuOXDUMx0B9byQK4PJwxn43kj6LX44pF+SrGzyoUiFLFJJsA0zo3saSvnZKVl1+TfiucFsvvc+jVKGtrGXEOnAIS13gIwg= X-Forefront-Antispam-Report: CIP:216.228.112.36;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid05.nvidia.com;CAT:NONE;SFS:(4636009)(39860400002)(346002)(136003)(376002)(396003)(36840700001)(46966006)(110136005)(186003)(316002)(36906005)(356005)(5660300002)(54906003)(86362001)(82740400003)(336012)(82310400003)(4744005)(26005)(70206006)(2616005)(2906002)(426003)(4326008)(36860700001)(70586007)(1076003)(83380400001)(478600001)(107886003)(47076005)(7636003)(8936002)(8676002)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2021 08:47:56.2864 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22719209-84be-4b12-9d64-08d925a31e1a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.36];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB2502 X-Rspamd-Queue-Id: 25FF7E000245 Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=Mgrkfyji; dmarc=pass (policy=none) header.from=nvidia.com; spf=none (imf05.hostedemail.com: domain of mgurtovoy@nvidia.com has no SPF policy when checking 40.107.92.89) smtp.mailfrom=mgurtovoy@nvidia.com X-Rspamd-Server: rspam03 X-Stat-Signature: nq8arnd8uiftraah5hc8yk6n7gdyzw63 X-HE-Tag: 1622623661-585719 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: The "if" clause can fit to one line. Also while we're here, fix the end pfn print (use %#lx instead of #%lx). Signed-off-by: Max Gurtovoy Reviewed-by: David Hildenbrand --- mm/memory_hotplug.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 70620d0dd923..8c3b423c1141 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -288,10 +288,9 @@ static int check_pfn_span(unsigned long pfn, unsigned long nr_pages, min_align = PAGES_PER_SUBSECTION; else min_align = PAGES_PER_SECTION; - if (!IS_ALIGNED(pfn, min_align) - || !IS_ALIGNED(nr_pages, min_align)) { - WARN(1, "Misaligned __%s_pages start: %#lx end: #%lx\n", - reason, pfn, pfn + nr_pages - 1); + if (!IS_ALIGNED(pfn, min_align) || !IS_ALIGNED(nr_pages, min_align)) { + WARN(1, "Misaligned __%s_pages start: %#lx end: %#lx\n", + reason, pfn, pfn + nr_pages - 1); return -EINVAL; } return 0; From patchwork Wed Jun 2 08:47:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 12293441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 190DFC47083 for ; Wed, 2 Jun 2021 08:48:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BF40F613D3 for ; Wed, 2 Jun 2021 08:48:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF40F613D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 61DD26B006E; Wed, 2 Jun 2021 04:48:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F99E6B0070; Wed, 2 Jun 2021 04:48:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 420CE6B0071; Wed, 2 Jun 2021 04:48:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0134.hostedemail.com [216.40.44.134]) by kanga.kvack.org (Postfix) with ESMTP id 0DC976B006E for ; Wed, 2 Jun 2021 04:48:02 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9B0C8181AC9C6 for ; Wed, 2 Jun 2021 08:48:01 +0000 (UTC) X-FDA: 78208156362.20.7570E3A Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2065.outbound.protection.outlook.com [40.107.244.65]) by imf07.hostedemail.com (Postfix) with ESMTP id 791C6A00025C for ; Wed, 2 Jun 2021 08:47:47 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S5Fck2Bqj0Oo1W7AjSfp5SZH5+nypH+2/2utGp1jdC2k4zV7rwIHHvBwxGQacYE4pveCM/YoQnhwqSsOd3eQAotsgex2oYYhK9+n8wJIPscwwv4Nl+cd56Onn5J9AKcrwWIe/CTRB47H8ugZnup/ld4TMaFIej7eeO2RrIVOjUCvhHMsmjwj5q+pybIBjX0M7ukHunC6Kfv806lhjCgcGhw6wZ+I34AcBGii3zsT3p68zldetvJz6BLHrPvwVs0WRl2zDpXBpVBK0CdhMHH/b7gGxRJLbfTtaJu1VsJ4nW1OrdNgp8Ta1s9HxlnZ3sHLsJXoEvDORG8nDI/kLjQeOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=unpTT5AzW4kx8Noa2GJKHL0P1eSGGi+4NS7bPEUMWdM=; b=SCzx0UYpqbRyQlFlM3aQaMN14ncHQ7mlEro6aUDb9AET24UnM7wVrT524N7a34tB9clR1t65oWql7yhBlvQ7OXroHMk+Y1fk5sznLXt+5vP3mZKLTrJfJS67dD9IrsAlL/Z4OT8jws8D6LZwFaRj1Bir84PdwMJkg/DfQiqeCCDa7W0cAWqV4UQ8YGxnE1Qt0VcrUjdh7PsmwWM8FFkdLsrr/iJJtnv9pJtWTZCEI0JZwkyQEdjqsypl55pZBwHcZCuF8dWymmBBcBscrz65AS3bWYYh4Tcp3ZE7ajfyBpbbjFd5T9G/0u0sHWA3f4XEB+bmDeZY7CRmFg7MaH07bw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) smtp.rcpttodomain=kvack.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=unpTT5AzW4kx8Noa2GJKHL0P1eSGGi+4NS7bPEUMWdM=; b=SR263X261GT/qRCl53CHXAagdkRs91N4GPz7ze9lxKcd/65/ogJuV8ThNgs+Eac4hFEVsKq+1Z5Avwe+n4bN+mlyi2TenoQa7AwXIPlG4F3UIgZgKzmmrCzU2bBaL/U2SzuZh3F7FJmRULT9NurIYOGkGzBUhucTo31kKcpB+dOlF9RsLVdt1xDEmd5HwdszTTU8UftBD3ZWZGkICxM20Zq4GHcwtYUKvNOze9Mk+akkZK/V7yIp8X5chGTLYKfKdq9wVddC4M8X7Z+0fpn1ivG4++85zwnyjsPqR/svejemhI0grOfmlu6lUqYcV0zBJsgYVTdKdQCwE9GLsp8XQg== Received: from BN8PR03CA0012.namprd03.prod.outlook.com (2603:10b6:408:94::25) by BN8PR12MB3332.namprd12.prod.outlook.com (2603:10b6:408:66::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.26; Wed, 2 Jun 2021 08:47:58 +0000 Received: from BN8NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:408:94:cafe::5) by BN8PR03CA0012.outlook.office365.com (2603:10b6:408:94::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.15 via Frontend Transport; Wed, 2 Jun 2021 08:47:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) smtp.mailfrom=nvidia.com; kvack.org; dkim=none (message not signed) header.d=none;kvack.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by BN8NAM11FT054.mail.protection.outlook.com (10.13.177.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4150.30 via Frontend Transport; Wed, 2 Jun 2021 08:47:58 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Jun 2021 08:47:58 +0000 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Jun 2021 08:47:57 +0000 Received: from r-arch-stor03.mtr.labs.mlnx (172.20.187.5) by mail.nvidia.com (172.20.187.18) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 2 Jun 2021 08:47:56 +0000 From: Max Gurtovoy To: , CC: , , , Max Gurtovoy Subject: [PATCH 2/2] mm,memory_hotplug: print the min alignment in check_pfn_span Date: Wed, 2 Jun 2021 11:47:52 +0300 Message-ID: <20210602084752.3534-2-mgurtovoy@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20210602084752.3534-1-mgurtovoy@nvidia.com> References: <20210602084752.3534-1-mgurtovoy@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0638f399-a647-4c94-693a-08d925a31f6f X-MS-TrafficTypeDiagnostic: BN8PR12MB3332: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:175; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I5iLUjkm1+L6pdO7VnLmYnULH0Ke1KD5qs5heK134Vjf1X2LFOHyJglR9HYM3DxCoseIFk7lZRcAjFJgLVc/d1iBNPKT/XE5yoo1cfq6Ald646qQg6FpNyCIErExuo6pWe0uJYIP8Qw3Obq4yzJ0lXF3XAqL3R3mf3GK56aPy3ZSKVT9tLFM1YBr9Cx7YHQ4SjZVX/vCvPdZxs3cLMvLDzYObTIt495Sm3+N9agfpKwj4dsbRBCfNVYHSvTH4hABb3iALjAOjcqIK5j+x6D6PZn9ACd3AQgMi9wgZjKy7OcqA17B1nTwuDXZkQlW4DeI7TjXZSlAhR8LHuyRPLS8wRDg0YNzqVRRZJ4BVyHXjFCs4A1p2tGdoDvfJ6QIaIY6YOiQjyshrEE0DK9fUqRmoIAX/tMq4GVC7zI+rhSXEuOHGegi9jAkldvNJV+/ay2uHcJM1IgP67p6pZ7+d1eWLk+tqu0cmKInE9tjJdin46j69g64Z4HfnhBO3cSc+P8eN+oRvYGmLE1cFZjxcrxeRyqmTp5fpp74lY6xCFAG7llDIQJKdJYavpJry3pVJuoJBm/KkU9A0IQuq7Z1askJ3DRrg8ahCtEcYRunwBUae0hlEY5hDdfHXznueX0b8hr8iWS4ZClGM1u0EwhH4zv0Ug== X-Forefront-Antispam-Report: CIP:216.228.112.35;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid04.nvidia.com;CAT:NONE;SFS:(4636009)(346002)(39860400002)(376002)(136003)(396003)(36840700001)(46966006)(8676002)(36906005)(4744005)(1076003)(186003)(26005)(426003)(8936002)(7636003)(356005)(82310400003)(5660300002)(70206006)(36756003)(54906003)(83380400001)(70586007)(107886003)(110136005)(86362001)(82740400003)(6666004)(47076005)(478600001)(2906002)(4326008)(336012)(316002)(36860700001)(2616005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2021 08:47:58.5118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0638f399-a647-4c94-693a-08d925a31f6f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.35];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3332 X-Rspamd-Queue-Id: 791C6A00025C Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=SR263X26; spf=none (imf07.hostedemail.com: domain of mgurtovoy@nvidia.com has no SPF policy when checking 40.107.244.65) smtp.mailfrom=mgurtovoy@nvidia.com; dmarc=pass (policy=none) header.from=nvidia.com X-Rspamd-Server: rspam04 X-Stat-Signature: tzfs9sywp74nxt8dqx7cc1cmhzt75hjf X-HE-Tag: 1622623667-352468 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: The warning only prints the start and end pfns. Add min_align to the warning print to add more info regarding the failure. Signed-off-by: Max Gurtovoy Reviewed-by: David Hildenbrand --- mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 8c3b423c1141..9e86e9ee0a10 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -289,8 +289,8 @@ static int check_pfn_span(unsigned long pfn, unsigned long nr_pages, else min_align = PAGES_PER_SECTION; if (!IS_ALIGNED(pfn, min_align) || !IS_ALIGNED(nr_pages, min_align)) { - WARN(1, "Misaligned __%s_pages start: %#lx end: %#lx\n", - reason, pfn, pfn + nr_pages - 1); + WARN(1, "Misaligned __%s_pages min_align: %#lx start: %#lx end: %#lx\n", + reason, min_align, pfn, pfn + nr_pages - 1); return -EINVAL; } return 0;