linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Lorenzo Stoakes <lstoakes@gmail.com>
Subject: linux-next: build warning after merge of the mm tree
Date: Mon, 20 Mar 2023 14:47:21 +1100	[thread overview]
Message-ID: <20230320144721.663280c3@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3472 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (sparc64 defconfig)
produced this warning:

In file included from include/linux/wait.h:11,
                 from include/linux/swait.h:8,
                 from include/linux/completion.h:12,
                 from include/linux/mm_types.h:14,
                 from include/linux/uio.h:10,
                 from include/linux/vmalloc.h:12,
                 from include/asm-generic/io.h:994,
                 from arch/sparc/include/asm/io.h:22,
                 from arch/sparc/vdso/vclock_gettime.c:18:
arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
   18 | register struct task_struct *current asm("g4");
      |                              ^~~~~~~

I guess the immediate cause is commit

  4e29dd9708cb ("mm: vmalloc: convert vread() to vread_iter()")

from the mm that included linux/uio.h into include/linux/vmalloc.h.
Though there may be a deeper old cause that may need addressing in the
longer term.

Indeed, this patch (obviously) makes the warning go away (and
presumably speeds up the build ever so slightly :-)).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 20 Mar 2023 14:02:18 +1100
Subject: [PATCH] mm: vmalloc: fix sparc64 warning

This fixes this warning from a sparc64 defconfig build:

In file included from /home/sfr/next/next/include/linux/wait.h:11,
                 from /home/sfr/next/next/include/linux/swait.h:8,
                 from /home/sfr/next/next/include/linux/completion.h:12,
                 from /home/sfr/next/next/include/linux/mm_types.h:14,
                 from /home/sfr/next/next/include/linux/uio.h:10,
                 from /home/sfr/next/next/include/linux/vmalloc.h:12,
                 from /home/sfr/next/next/include/asm-generic/io.h:994,
                 from /home/sfr/next/next/arch/sparc/include/asm/io.h:22,
                 from /home/sfr/next/next/arch/sparc/vdso/vclock_gettime.c:18:
/home/sfr/next/next/arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
   18 | register struct task_struct *current asm("g4");
      |                              ^~~~~~~

Fixes: 4e29dd9708cb ("mm: vmalloc: convert vread() to vread_iter()")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/vmalloc.h | 2 +-
 mm/vmalloc.c            | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 6beb2ace6a7a..c187c4d9bc33 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -9,12 +9,12 @@
 #include <asm/page.h>		/* pgprot_t */
 #include <linux/rbtree.h>
 #include <linux/overflow.h>
-#include <linux/uio.h>
 
 #include <asm/vmalloc.h>
 
 struct vm_area_struct;		/* vma defining user mapping in mm_types.h */
 struct notifier_block;		/* in notifier.h */
+struct iov_iter;		/* in uio.h */
 
 /* bits in flags of vmalloc's vm_struct below */
 #define VM_IOREMAP		0x00000001	/* ioremap() and friends */
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index f19509a6eef4..6e5647937dab 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -40,6 +40,7 @@
 #include <linux/hugetlb.h>
 #include <linux/sched/mm.h>
 #include <linux/rwsem.h>
+#include <linux/uio.h>
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
 
-- 
2.39.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2023-03-20  3:49 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20  3:47 Stephen Rothwell [this message]
2023-03-23  2:58 ` linux-next: build warning after merge of the mm tree Stephen Rothwell
2023-03-23 19:38   ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2024-05-07  6:26 Stephen Rothwell
2024-04-17  5:18 Stephen Rothwell
2024-04-17 15:57 ` Matthew Wilcox
2024-04-15  5:20 Stephen Rothwell
2024-04-15  5:45 ` Barry Song
2024-03-27 22:13 Stephen Rothwell
2024-03-28  1:59 ` Baoquan He
2024-03-28  4:29   ` Stephen Rothwell
2024-03-25  1:25 Stephen Rothwell
2024-03-26  2:21 ` Suren Baghdasaryan
2024-03-25  1:22 Stephen Rothwell
2024-03-25  8:56 ` David Hildenbrand
2024-03-13  4:07 Stephen Rothwell
2024-03-13  9:00 ` Uwe Kleine-König
2024-03-13 15:22   ` Masahiro Yamada
2024-03-13 21:11     ` Uwe Kleine-König
2024-01-02  5:40 Stephen Rothwell
2024-01-02 12:54 ` Kirill A. Shutemov
2023-12-04  4:54 Stephen Rothwell
2023-12-04 17:03 ` SeongJae Park
2023-11-28  2:33 Stephen Rothwell
2023-10-04  4:46 Stephen Rothwell
2023-09-25 23:27 Stephen Rothwell
2023-09-18  3:18 Stephen Rothwell
2023-09-12  5:20 Stephen Rothwell
2023-06-05  3:10 Stephen Rothwell
2023-06-05 14:57 ` Liam R. Howlett
2023-05-15 23:25 Stephen Rothwell
2023-05-08  1:19 Stephen Rothwell
2023-05-08 21:36 ` Nhat Pham
2023-03-16  1:12 Stephen Rothwell
2023-03-01  0:36 Stephen Rothwell
2023-03-01  0:47 ` Suren Baghdasaryan
2023-03-01  2:29   ` Suren Baghdasaryan
2023-03-01  5:45     ` Stephen Rothwell
2023-01-17  3:51 Stephen Rothwell
2022-12-17 19:22 Stephen Rothwell
2022-11-10  7:36 Stephen Rothwell
2022-11-10  7:33 Stephen Rothwell
2022-11-10 16:27 ` Linus Torvalds
2022-11-10 20:20   ` Randy Dunlap
2022-11-10 20:43     ` Jonathan Corbet
2022-10-26  0:57 Stephen Rothwell
2022-10-26  1:13 ` Sergey Senozhatsky
2022-09-19  9:09 Stephen Rothwell
2022-09-19  9:30 ` Miaohe Lin
2022-07-21  9:55 Stephen Rothwell
2022-07-21 11:11 ` Zach O'Keefe
2022-07-18 10:28 Stephen Rothwell
2022-07-18 22:54 ` Andrew Morton
2022-06-22  5:54 Stephen Rothwell
2022-06-22  7:11 ` Stephen Rothwell
2022-06-22 16:39   ` Mike Kravetz
2022-06-22 18:49     ` Andrew Morton
2022-05-25  5:54 Stephen Rothwell
2022-05-25 10:57 ` Zi Yan
2022-05-25 17:36   ` Andrew Morton
2022-05-12  9:46 Stephen Rothwell
2022-05-12 12:23 ` Johannes Weiner
2022-05-05 21:35 Stephen Rothwell
2022-05-05 21:38 ` Stephen Rothwell
2022-05-05 22:18 ` Matthew Wilcox
2022-04-28  7:44 Stephen Rothwell

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=20230320144721.663280c3@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=lstoakes@gmail.com \
    /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).