From patchwork Sat Nov 24 09:05:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 10696489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0DCA1750 for ; Sat, 24 Nov 2018 09:05:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C779C29B69 for ; Sat, 24 Nov 2018 09:05:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAF0C29834; Sat, 24 Nov 2018 09:05:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5231629834 for ; Sat, 24 Nov 2018 09:05:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 62A0E6B35B9; Sat, 24 Nov 2018 04:05:13 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5B2466B35BA; Sat, 24 Nov 2018 04:05:13 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47C076B35BB; Sat, 24 Nov 2018 04:05:13 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by kanga.kvack.org (Postfix) with ESMTP id E21386B35B9 for ; Sat, 24 Nov 2018 04:05:12 -0500 (EST) Received: by mail-wr1-f70.google.com with SMTP id d11so11465615wrw.4 for ; Sat, 24 Nov 2018 01:05:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:date:from:to:cc:subject :message-id:mime-version:content-disposition:user-agent; bh=kUEz9C1MmNtGGtv8tNklKlEeqsQt9cfoF1aWvJSrtuE=; b=C0e/KCM1igsxs/H7RMd3STuUBdTMwpkiQ4iXUhWKckmrBsjYtD3S8P9Iw2cZ97sp8f C7gO1R+4fTSKKvmXnoNR8oMcC7Gk3S3AJHmt3Y+hKnGNxhGZoNT3SmUqVV6U8gLBcan+ CojjY53s6ewELrcL2ivKYAd9dJ8Up2tvPm64ssMQNumIEwvsvRDtANkb12hCEgkTzjbd JG9par8iZ/hH6MOkGM59E27gR4UFP2U7O7KkGWUS1rZ4R6/eQxXj4BnWkFrMdpEloW2z nNpQAgzJ5TZSy9ZPMJ+nxKOjB7xsltZrMw2YL0HXchpFx0DbeSh5MT/O4B1uWkBp3r/S 0fWA== X-Gm-Message-State: AA+aEWa8RIJ/u/2eGDqx3zjLkVqTKXCbVIK3WC9ok2/Lv6y4ZL7yNoQ+ PMyqnyTG/YwUXHlCrepqzBSCVsncSDmN3hDNrqZKBLL2Dns4XpgBknj3xs3Lycan49bASorSTUs nzB982JZOQtGfPivdi0krAR36PAMIFWmgM/Nc55K3tBL/5KUzu37RADcQPsbrs0de7Jz8JoM2st 9EyCiJZUfvB+zudrNxg/ZBUwd7NU79dQrPlhQC4gl/AiemFFqQdb6ydMxg0Str+RSc2Un5UmG3e Clw91G7CvRFwkxZoy1yjlJTDv67rMYhwcVicWmpFqzzFPIg08uzM2y8oD2aTNRQ58LaDiJ2cuEL 9/3PgVwNbZp26wriTT9qzpcd+c2bNHYO7b2FFxkmud+clpuxNbS1IA+xCXa/W24G/V8uRBZQ1Ch I X-Received: by 2002:a7b:c255:: with SMTP id b21mr2619294wmj.6.1543050312396; Sat, 24 Nov 2018 01:05:12 -0800 (PST) X-Received: by 2002:a7b:c255:: with SMTP id b21mr2619243wmj.6.1543050311556; Sat, 24 Nov 2018 01:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543050311; cv=none; d=google.com; s=arc-20160816; b=KqG/t7nQEDQ/VwWR3GnGxzDyMy4bSoSowof1k+AsvlrHJJZCZD9TcAU2QXBX+bLfzl CtnW0TReTk5+gpq2Ui+tUJWfmm4Wxk3aUFVejXimRHo956XNdbvVllXV1MEGiUCydtGC 5k9FwDBWW+LJlTmSIHHDQTob37SGWebMEWOhfZxT7kp7WUU8zwMNzeKNAKvlb7V2DLZy M0BNjjWPM9Fxi/kIg/oQ/+9f7rX22xx4m4LBFPjTjhxvDh+nU3XtCYDVoAJ3MbO+ATCf iG5y5piv2QmsGkL/8KqCZwzOgdXIiDGVCu9dXrdJlJ4PH67/Oc+tWm+HIxdwb0/rUCHL 02CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:content-disposition:mime-version:message-id:subject:cc :to:from:date:dkim-signature; bh=kUEz9C1MmNtGGtv8tNklKlEeqsQt9cfoF1aWvJSrtuE=; b=rhrDRpaWnFG5+4o75+ZXB/suvksRvchK+R5eYsWWohC7yvU1AQtWhaGciOdUJiMVXr 8mKJLNyy4zlpL7ZS4Wi1bG2Lr3e/sOO6BVNrJpWagz96iNK09gRybILRpRvmvvPI42d4 h8xZ3Ly1NKXzBYJOn24h98VunOyUefqeu5P+ic/yYz1YOl7f1HOlFzaCP59kBzatTonJ RhAjFffHFIuksi9aU+8do9snNE9I8UTOi16xYXPcuxjDk7kuPhgB69zI1li/qDkrs2s8 pvQfGXsCfV46vByYnOmreGBTAhKavJWSN/A0goYprXCHMajbfrIfAoCwdkb6bbZ6O6al b4aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nyzrv2hi; spf=pass (google.com: domain of adobriyan@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=adobriyan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id v1sor13102598wro.44.2018.11.24.01.05.11 for (Google Transport Security); Sat, 24 Nov 2018 01:05:11 -0800 (PST) Received-SPF: pass (google.com: domain of adobriyan@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nyzrv2hi; spf=pass (google.com: domain of adobriyan@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=adobriyan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=kUEz9C1MmNtGGtv8tNklKlEeqsQt9cfoF1aWvJSrtuE=; b=nyzrv2hiAW6Z9RwkJa/F1iWtcPwESBDHNH+IDu9UdGr9zNsGlde6+rL+CQI8FlwUP1 ZWZ1htfhzv/mnZfTL5HZCqFDUjWwivGZNYQdvDXJr//WXio87I2iXvQ3wdJwUIIAaAQO ytiOt+ix8vbBUZWKeEjthD//H/6NDNdieq+nAAdLyb0hhd1Gk/WFMPNIDwOEHHorKkP1 C4FliHwaem816sa96ZgR63hoXwSSEfUz3JzcWkkDGVAHSDvNiFCLAa7dDBhN3OaxLC2B uxd0qViliupVf4QnRq6Q7sxMuKyuuKLljBN2FqOgQki5oWO0oJO89RZBXimhNeLybydt LTPw== X-Google-Smtp-Source: AFSGD/XLraVrEqSphupobZXEPRP0aEA4hjx8/0Y67TDMj13k1ladOTr6NgqgFJ0Lbsc1t5q6Q2QZbA== X-Received: by 2002:adf:efd1:: with SMTP id i17mr3024784wrp.200.1543050311193; Sat, 24 Nov 2018 01:05:11 -0800 (PST) Received: from avx2 (nat-minsk-pool-46-53-201-92.telecom.by. [46.53.201.92]) by smtp.gmail.com with ESMTPSA id a204sm11279536wmh.23.2018.11.24.01.05.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Nov 2018 01:05:10 -0800 (PST) Date: Sat, 24 Nov 2018 12:05:08 +0300 From: Alexey Dobriyan To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, vbabka@suse.cz Subject: [PATCH] mm: make "migrate_reason_names[]" const char * Message-ID: <20181124090508.GB10877@avx2> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: X-Virus-Scanned: ClamAV using ClamSMTP Those strings are immutable as well. Signed-off-by: Alexey Dobriyan Acked-by: Vlastimil Babka Reviewed-by: David Hildenbrand --- include/linux/migrate.h | 2 +- mm/debug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/include/linux/migrate.h +++ b/include/linux/migrate.h @@ -29,7 +29,7 @@ enum migrate_reason { }; /* In mm/debug.c; also keep sync with include/trace/events/migrate.h */ -extern char *migrate_reason_names[MR_TYPES]; +extern const char *migrate_reason_names[MR_TYPES]; static inline struct page *new_page_nodemask(struct page *page, int preferred_nid, nodemask_t *nodemask) --- a/mm/debug.c +++ b/mm/debug.c @@ -17,7 +17,7 @@ #include "internal.h" -char *migrate_reason_names[MR_TYPES] = { +const char *migrate_reason_names[MR_TYPES] = { "compaction", "memory_failure", "memory_hotplug",