From patchwork Wed Mar 13 10:14:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 1055995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QwhctMmr"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="Pfr7fCud"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44K7H13sWCz9s3l for ; Wed, 13 Mar 2019 21:23:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4KVt1QWZ5ThLxYTB2yaZDWu3HTD6s2mG1HwkgX6AMQg=; b=QwhctMmr4/QqTp c5WiCWVKl5/8/xRrE0tTYmJdn5Xr53D4L2wDlYO4EOVSwdo0Vk4Qur5PsKek1fO2kxuHGIrw/cSIz r2cUNHbl2sqP0xhz09nuJyDaxWVoH5u2pk96Mq2jYMh7c62sX/rXBu6TA+bYTBCdGxOBDR3gTq570 FBm8WAsZqzLILBFBioUqWyz05cCyK1g02RI8iAs9ERyoNumXQN9I2YgtGJR5Hj3qflJdeiA8DcVrU m+vIgWRMFCAs76J7+YVlBrjqhJasxnhlV5IlsEb/IJ0zw5PHok5VRur5+ULtDVK1gfz8y6rcDojA3 +LnIF6AB5zbpL9ydrC/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4137-0002Se-6C; Wed, 13 Mar 2019 10:23:49 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h40uL-00086G-AS for linux-um@lists.infradead.org; Wed, 13 Mar 2019 10:14:47 +0000 Received: by mail-wm1-x341.google.com with SMTP id a188so1212038wmf.3 for ; Wed, 13 Mar 2019 03:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9AfYvZQ5c2FbUaV3jJlOcrjAVrValcJyPlFZlo9KQJI=; b=Pfr7fCud/iXp1o6WYd+Ln+UTWknMQR+9rSIjBN6ZHIWsqKGZ7Ud28FeTRPolTof3Xz c7pvGD5yffZegaPlakJQBGfGUK4NjFlSCQJlgQvmQWX6JfC/8S/QBE7wSHlLrQ0eXasK +Wm/t6gqIGI263B+yaGwewLdxZi8ZXpfSszDCGEAsKMXET3kF39OnHRiHShGYGz24PYh WpCS9M4YAaRqDi4MEOXkB8u3LBfd2PSa971kuFGDP2oV7tcIPMIosQQ6IRyrNfe5YF2i lwU5hyzRe+73sQ6QElArd8YVh8P1glJ525bUKcDhtdjW5zhvXj4tyy8F+81qDmTVrvEP I5ew== 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:mime-version :content-transfer-encoding; bh=9AfYvZQ5c2FbUaV3jJlOcrjAVrValcJyPlFZlo9KQJI=; b=c94fCNK8NYvSPJGNstLPEw17kfjVp3uMQpBfhyu8AOlK+r7IcI7Cdy3Melbx7IP0++ mxBpeI3vpbSM5FX1cP/9GvxZUl/QS6ESLwtTtp5yiR9uL+uzugVLyLMFp8X50JoqHv6c OtHK+AOnMtTRI5owbw27f9izatkSNdhMxYehgDS8lApEZ+fieNmV2sgDOMlAYWqbDwKw PpmJEo8gitQD6GH1JdxlQL4CA127/wMGnnA7rYscc205KXhDBm8W1KPnKj3WPk9iEGmU N/jm+Ovw+9U8KJ3h09ip1VlGzrTWVrcOHEvdcFbqR+oHrzOYbqduHrLjlTWgCyM8hGri eiGQ== X-Gm-Message-State: APjAAAXHRpiankYiAGUBZ7RSjkbgcUwR3Wmn3j7I3PgOlEPo2hlENjyG rBkrwUyJRlXWg7VI6htdpBBnNg== X-Google-Smtp-Source: APXvYqyMDcS52LyKgR/xDz2doX9Gvp7JPtKQFvMgr6trrpPNKVA6m+gu0HR2+/iXzyv9SVQHUqHzEw== X-Received: by 2002:a1c:dc85:: with SMTP id t127mr1576720wmg.136.1552472082209; Wed, 13 Mar 2019 03:14:42 -0700 (PDT) Received: from localhost.localdomain (aputeaux-684-1-27-140.w90-86.abo.wanadoo.fr. [90.86.252.140]) by smtp.gmail.com with ESMTPSA id d5sm4702439wrx.12.2019.03.13.03.14.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 03:14:41 -0700 (PDT) From: Bartosz Golaszewski To: Jeff Dike , Richard Weinberger , Anton Ivanov Subject: [PATCH] um: define set_pte_at() as a static inline function, not a macro Date: Wed, 13 Mar 2019 11:14:39 +0100 Message-Id: <20190313101439.7092-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_031445_480098_CE87F5C7 X-CRM114-Status: UNSURE ( 7.53 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Bartosz Golaszewski When defined as macro, the mm argument is unused and subsequently the variable passed as mm is considered unused by the compiler. This fixes a build warning. Signed-off-by: Bartosz Golaszewski Reviewed-by: Geert Uytterhoeven Reviewed-by: Anton Ivanov Acked-by: Anton Ivanov --- arch/um/include/asm/pgtable.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h index 9c04562310b3..b377df76cc28 100644 --- a/arch/um/include/asm/pgtable.h +++ b/arch/um/include/asm/pgtable.h @@ -263,7 +263,12 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval) *pteptr = pte_mknewpage(*pteptr); if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); } -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) + +static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *pteptr, pte_t pteval) +{ + set_pte(pteptr, pteval); +} #define __HAVE_ARCH_PTE_SAME static inline int pte_same(pte_t pte_a, pte_t pte_b)