LKML Archive on
 help / color / Atom feed
From: Souptick Joarder <>
Subject: [PATCH v2] x86/mm/fault.c: Convert to use vm_fault_t
Date: Thu, 10 Jan 2019 00:07:42 +0530
Message-ID: <20190109183742.GA24326@jordon-HP-15-Notebook-PC> (raw)

Convert to use vm_fault_t type for last argument of do_sigbus().

kbuild reported a warning during testing of final vm_fault_t patch
integrated in mm tree.

[auto build test WARNING on linus/master]
[also build test WARNING on v5.0-rc1 next-20190109]
[if your patch is applied to the wrong git tree, please drop us a note
to help improve the system]

All warnings:

arch/x86/mm/fault.c:1051:39: warning: restricted vm_fault_t degrades to integer
arch/x86/mm/fault.c:1057:29: warning: restricted vm_fault_t degrades to integer
arch/x86/mm/fault.c:1059:29: warning: restricted vm_fault_t degrades to integer
arch/x86/mm/fault.c:1094:62: warning: incorrect type in argument 4 (different base types)
arch/x86/mm/fault.c:1094:62:    expected unsigned int fault
arch/x86/mm/fault.c:1094:62:    got restricted vm_fault_t [usertype] fault

This patch has fixed the warnings.

Signed-off-by: Souptick Joarder <>
v2: updated the change log.

 arch/x86/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 2ff25ad..dea3725 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -1031,7 +1031,7 @@ static inline bool bad_area_access_from_pkeys(unsigned long error_code,
 static void
 do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
-	  unsigned int fault)
+	  vm_fault_t fault)
 	struct task_struct *tsk = current;

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 18:37 Souptick Joarder [this message]
2019-01-09 18:42 ` Andrew Morton

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:

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

  git send-email \
    --in-reply-to=20190109183742.GA24326@jordon-HP-15-Notebook-PC \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git
	git clone --mirror lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone