From patchwork Mon May 25 20:31:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Jiang X-Patchwork-Id: 11569441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3372E912 for ; Mon, 25 May 2020 20:31:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 010F2206D5 for ; Mon, 25 May 2020 20:31:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="E6EtCHK3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 010F2206D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=cloud.ionos.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1312A8005C; Mon, 25 May 2020 16:31:55 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0E2058E0008; Mon, 25 May 2020 16:31:55 -0400 (EDT) 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 F39318005C; Mon, 25 May 2020 16:31:54 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id D93A68E0008 for ; Mon, 25 May 2020 16:31:54 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9C7A8441C for ; Mon, 25 May 2020 20:31:54 +0000 (UTC) X-FDA: 76856387748.10.eggs26_67eb25521ac63 X-Spam-Summary: 2,0,0,b7a551afcdeb1c6c,d41d8cd98f00b204,guoqing.jiang@cloud.ionos.com,,RULES_HIT:41:355:379:541:800:960:967:973:988:989:1260:1345:1437:1534:1541:1711:1714:1730:1747:1777:1792:2198:2199:2393:2525:2559:2563:2682:2685:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3351:3865:3867:3868:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:5007:6261:6653:9025:10004:11026:11473:11658:11914:12043:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:14096:14181:14384:14394:14721:21080:21444:21451:21627:21811:30054:30070,0,RBL:209.85.218.68:@cloud.ionos.com:.lbl8.mailshell.net-66.201.201.201 62.14.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:80,LUA_SUMMARY:none X-HE-Tag: eggs26_67eb25521ac63 X-Filterd-Recvd-Size: 3689 Received: from mail-ej1-f68.google.com (mail-ej1-f68.google.com [209.85.218.68]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Mon, 25 May 2020 20:31:53 +0000 (UTC) Received: by mail-ej1-f68.google.com with SMTP id a2so21573905ejb.10 for ; Mon, 25 May 2020 13:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id; bh=RdmBZk3wWhWdfLnacS8DUs6RlId0X8/5siZUx0HN8Ng=; b=E6EtCHK3HwZjnoHerbcIjxe44Wozrz2D/brrhHJbbAQmbbDh6Q4BxS8hBiMb/MhDcH 0N9Lqmt+JwQgXPK0hqyZ5S+DmE09cHYF252zw2ynmQV6L9JDZy4kS9Xkmcfc6zj4PeXy 2uGRpMofC8DWSxwfDrE3xPpukIp5+GScVw471V90b19TjAicLvBOKy2vtveU0x4BfyKl 0/sS7krOro164PEO/UHiabl24e7NbIy3ehmVoeDLwhyLhPyjVYcRByT4fY/rqtCuzxUD QG3rm8Tq+JKIU/5Q7CxMZBgweU8hfSwbpIaSnn2nEKJwqKbjrRk4tVJPJHWKnxJ0GzrH Ss6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RdmBZk3wWhWdfLnacS8DUs6RlId0X8/5siZUx0HN8Ng=; b=T0Pew8UXce3Ua6g39M+KRXEmGs1Z0qHCerJbPM14nFXXFy8n6e6IZhFqKFexn4IAiL OnIrxpz8SeT8juj3DpYjC6xTlxzojvjJrcjjNpZoU9rovt5jI8u9jkOEIJ3kOT+GqJf4 gc10Bk7Xr+N8aSZi+OCAH469t7X2Wqkfyrh5e6IXLikUVjwpsel9D4zDW4RU+kZDVdru M3dFKk/R4s0qB539g+EPqpiLxZg48i9btcI6ap4sdwlokKKcLD5RIwAYAwQfVDu7QXaR CjRdKQvDeV8a3p1CnjUI5fx4BoTcoauR+BpjoTYdeRxmNkLz7aHo8SJYXtxipM0qAufL xzyw== X-Gm-Message-State: AOAM530TWmi1a1OG7ZUgxMn07eJR5JvwEIeDchsYVZcKLHsdsAI/3ELq EDkhxFiNyXtFyWFAhC94+gdtsQ== X-Google-Smtp-Source: ABdhPJyWU1kzWG3OXBGnLiZYT9Vi96JvKEJATvbFYfkxB5ca2OLlQ6pldcYkZGl1gmB01Q36RwIhSA== X-Received: by 2002:a17:906:3597:: with SMTP id o23mr19545286ejb.174.1590438712716; Mon, 25 May 2020 13:31:52 -0700 (PDT) Received: from ls00508.pb.local ([2001:1438:4010:2540:a9f3:8576:8bb4:4392]) by smtp.gmail.com with ESMTPSA id s1sm17014881ejh.81.2020.05.25.13.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 13:31:52 -0700 (PDT) From: Guoqing Jiang To: akpm@linux-foundation.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Guoqing Jiang Subject: [PATCH] mm_types.h: change set_page_private to inline function Date: Mon, 25 May 2020 22:31:49 +0200 Message-Id: <20200525203149.18802-1-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 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: Change it to inline function to make callers use the proper argument. And no need for it to be macro per Andrew's comment [1]. [1] https://lore.kernel.org/lkml/20200518221235.1fa32c38e5766113f78e3f0d@linux-foundation.org/ Signed-off-by: Guoqing Jiang --- include/linux/mm_types.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index e88dc5c65c01..64ede5f150dc 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -240,7 +240,11 @@ static inline atomic_t *compound_pincount_ptr(struct page *page) #define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE) #define page_private(page) ((page)->private) -#define set_page_private(page, v) ((page)->private = (v)) + +static inline void set_page_private(struct page *page, unsigned long private) +{ + page->private = private; +} struct page_frag_cache { void * va;