mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Gabriele Monaco <gmonaco@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>,
	 linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <davidgow@google.com>,  Rae Moar <rmoar@google.com>,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	 linux-um@lists.infradead.org
Subject: Re: [PATCH] um: kunit: resolve missing prototypes warning
Date: Wed, 04 Sep 2024 15:56:42 +0200	[thread overview]
Message-ID: <942a2aa5fc93f6dc1bc88b3b25e59b044a7a425f.camel@sipsolutions.net> (raw)
In-Reply-To: <20240904135019.200756-1-gmonaco@redhat.com>

On Wed, 2024-09-04 at 15:50 +0200, Gabriele Monaco wrote:
> While building for KUnit with default settings, the build is generating
> the following compilation warnings.
> 
> ```
> $ make ARCH=um O=.kunit --jobs=16
> ../lib/iomap.c:156:5: warning: no previous prototype for
> ‘ioread64_lo_hi’ [-Wmissing-prototypes]
>   156 | u64 ioread64_lo_hi(const void __iomem *addr)
>       |     ^~~~~~~~~~~~~~
> [...]
> ```
> 
> The warning happens because the prototypes are defined in
> `asm-generic/iomap.h` only when `readq` and `writeq` are defined.
> For UM, those function get some default definitions but are currently
> defined _after_ the prototypes for `ioread64*`/`iowrite64*` functions.
> Moving the inclusion of `asm-generic/iomap.h` fixes it.
> 
> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
> ---
>  include/asm-generic/io.h | 8 ++++----

I get that you have this on kunit on ARCH=um, but that makes it neither
a kunit nor a um patch :)

Arnd had originally wanted to fix this another way, but that got
dropped. I don't know if this fix is right, though I can see that it
works. I have the same workaround in my tree, but I'm really not
convinced that it doesn't have side-effects on other architectures.

johannes

  reply	other threads:[~2024-09-04 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 13:50 Gabriele Monaco
2024-09-04 13:56 ` Johannes Berg [this message]
2024-09-04 15:51   ` Gabriele Monaco

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=942a2aa5fc93f6dc1bc88b3b25e59b044a7a425f.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=arnd@arndb.de \
    --cc=brendan.higgins@linux.dev \
    --cc=davidgow@google.com \
    --cc=gmonaco@redhat.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=rmoar@google.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

all inboxes | Powered by JetHome®