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;