From patchwork Mon May 16 03:00:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FanJun Kong X-Patchwork-Id: 12850215 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 C90C1C433EF for ; Mon, 16 May 2022 03:09:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4ECE78D0001; Sun, 15 May 2022 23:09:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 49C6C6B007B; Sun, 15 May 2022 23:09:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33CE78D0001; Sun, 15 May 2022 23:09:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2162F6B0075 for ; Sun, 15 May 2022 23:09:06 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7EF69334C3 for ; Mon, 16 May 2022 03:09:05 +0000 (UTC) X-FDA: 79470124650.24.90CE91C Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by imf01.hostedemail.com (Postfix) with ESMTP id CB31A400C3 for ; Mon, 16 May 2022 03:08:50 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id n18so13222039plg.5 for ; Sun, 15 May 2022 20:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LeS293Xoyn/IdDJSLF6A/QhWhktSea8yiSvRbWcIXpo=; b=RYy4hmQC7F0YhLYyxhwtQGpFqj6NiybxZ5pHdp3xv5VfOxxeeDSRxpzf4sI5ZYk9/m jZ25mHuBePqFjQmP4iv2+uWQ1PJ+jnFVZp5xU2cZ1v6xPeSzDpNnwNPGmmAfC1Oy3k5v f5Inm+r8lRECqbOXN43fV9ytzbhLmBlRD5bqZtRcvNTm8EJthYXmQzay9KqiVxkJ1OFd vp/NW5SN2aY9OFQ5Y1KcT0Tk5f1It+ucfcfKjZg+Uo2Dkz0s4mS/36ysqFw8b6fNFlRh ZJlUAbGYyH6I2Y2/EeLZbH+TI9AMR45YxZAg1ziZ6wq2tV52zqAHnLqhZkuXqc1IWdON 4pcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LeS293Xoyn/IdDJSLF6A/QhWhktSea8yiSvRbWcIXpo=; b=Tm9G9ag3EcUnepITDOx9FIna17MwPDFrwLOPaDD0W4yqDVL+QQp9O0uwcQdmv7PloW pQ7ty+ZsxSGGU3haQx4L/Trellp8mJiBxsB05PpL3+B8VMtNoXqNRT+arEOH3b5VoObD L64+Uaz5rCGHXFKuMjxG0GKhOJ+mR1iupnLHkcMJYBHk2WO66TMecfuFlY3MpW7RghHb e4F1u7/YCKElNs36rYzbIpL7/AE2j7fNIUQF61mWhc/67+cBbx/EhmSs9Qp0J8nCDAQ5 KamBSQ4v2yI+/BACleRDa1u9rXvEAYvUCPtVUMOYw41KnayrGaUBWjygwoNN7+sIwZsR YxnQ== X-Gm-Message-State: AOAM531uyYDJ7iw0mlXAhOGOKqrxK5pDZZ0ioZKMAiK5t7WOcQ6/Hu4/ HgKtR5ILqsKncl66bPCNP2e2OGIn8g0YP/qjpAEtEA== X-Google-Smtp-Source: ABdhPJw0i44O3ltUZTj8glVC8asPuQYo/hnz7aP/vNjjGYNJJG/q1ZpDxwNRT2xDUR91PX/rB0osRA== X-Received: by 2002:a17:90b:795:b0:1df:10a3:84e3 with SMTP id l21-20020a17090b079500b001df10a384e3mr10482308pjz.197.1652670543929; Sun, 15 May 2022 20:09:03 -0700 (PDT) Received: from localhost (014136220210.static.ctinets.com. [14.136.220.210]) by smtp.gmail.com with ESMTPSA id h125-20020a62de83000000b0050dc7628173sm5650872pfg.77.2022.05.15.20.09.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 20:09:03 -0700 (PDT) From: bh1scw@gmail.com To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Fanjun Kong , Muchun Song Subject: [PATCH] mm/page_owner.c: Add missing __initdata attribute Date: Mon, 16 May 2022 11:00:42 +0800 Message-Id: <20220516030039.1487005-1-bh1scw@gmail.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: CB31A400C3 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RYy4hmQC; spf=pass (imf01.hostedemail.com: domain of bh1scw@gmail.com designates 209.85.214.172 as permitted sender) smtp.mailfrom=bh1scw@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Stat-Signature: u4mgc5cndfqoy986dgcx4j95ah3uxk38 X-HE-Tag: 1652670530-35356 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: From: Fanjun Kong This patch fix two issues: 1. Add __initdata attribute according to include/linux/init.h: > For initialized data: > You should insert __initdata between the variable name and equal > sign followed by value 2. Fix below error reported by checkpatch.pl: ERROR: do not initialise statics to false Special thanks to Muchun Song :) Suggested-by: Muchun Song Signed-off-by: Fanjun Kong Reviewed-by: Muchun Song --- mm/page_owner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index 9185ff4eacb6..e4c6f3f1695b 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -34,7 +34,7 @@ struct page_owner { pid_t tgid; }; -static bool page_owner_enabled = false; +static bool page_owner_enabled __initdata; DEFINE_STATIC_KEY_FALSE(page_owner_inited); static depot_stack_handle_t dummy_handle;