linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Jeff Dike <jdike@addtoit.com>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [RESEND PATCH 3/4] um: define set_pte_at() as a static inline function, not a macro
Date: Wed,  3 Apr 2019 10:39:01 +0200	[thread overview]
Message-ID: <20190403083902.3975-4-brgl@bgdev.pl> (raw)
In-Reply-To: <20190403083902.3975-1-brgl@bgdev.pl>

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

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 <bgolaszewski@baylibre.com>
---
 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)
-- 
2.21.0



  parent reply	other threads:[~2019-04-03  8:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  8:38 [RESEND PATCH 0/4] um: build and irq fixes Bartosz Golaszewski
2019-04-03  8:38 ` [RESEND PATCH 1/4] um: remove unused variable Bartosz Golaszewski
2019-04-03  8:39 ` [RESEND PATCH 2/4] um: remove uses of variable length arrays Bartosz Golaszewski
2019-04-03  8:39 ` Bartosz Golaszewski [this message]
2019-04-03  8:39 ` [RESEND PATCH 4/4] um: irq: don't set the chip for all irqs Bartosz Golaszewski
2019-04-03  8:39 ` [RESEND PATCH 0/4] um: build and irq fixes Bartosz Golaszewski
2019-04-03 13:20   ` Anton Ivanov
  -- strict thread matches above, loose matches on Subject: below --
2019-04-11  9:49 Bartosz Golaszewski
2019-04-11  9:49 ` [RESEND PATCH 3/4] um: define set_pte_at() as a static inline function, not a macro Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190403083902.3975-4-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=geert@linux-m68k.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).