From nobody Fri Dec 19 15:17:02 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AF811D88BF for ; Wed, 4 Sep 2024 13:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725457855; cv=none; b=IEZp+/+0Q2H0KZwMnct9ii8e0AWytZm60qtBSKD8IgJOKlPPaL8mnF8+x64zW7IkwUsdHowkOcZOCf3EnYbuzyqry8p2tTsIaL5UGJRkqGd3dN2zvZX/FVpkgL9iSmi6ca2K8wm3Yi8lLXEqu/cXPvB7h7XFSn+0xHc1dS5Wv4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725457855; c=relaxed/simple; bh=uWrtz3g6TxgzckFRZ4YDiY+UV6EL+/VQKjQ9NqC5RB8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JqHODjlbTLs6rpMLhT82XgEGK9MwxBb0cBeCC2xrKlUKVjaFvTFIPNUZ5bqICVFsyV6UN5Ryl5aX/Lsaqv7H98dsBYjiKVnrWk9s8yx39qNkkJLcTotmblQhlvIKy2ho3Mt3GNbSpgCaCeeVG96LZ4ehRAOFe9ndyEDhe1dFM3I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ILdZ3wS6; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ILdZ3wS6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725457852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YEl6UcNWySWixJDtk3OBM+nYtD0bKQYmS/w9a5H5Rf8=; b=ILdZ3wS6XTRwCR672zwNKIAsPj+wh0iZFF07AUmot/1Hi4wd8yxEYX4ezvjC4zOAx7QU5V Y2pnwo/k39HdD2ymkVSqheMVYCxYwbE4WmxlakYoY6nAgs8JG35LLO+4GY5N3dRdkjjs36 NLEP+TfWDopGCbTKnyGmRv45AAAnD0Y= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-300-e_9B40lyMieiF8Az2Ti6rw-1; Wed, 04 Sep 2024 09:50:45 -0400 X-MC-Unique: e_9B40lyMieiF8Az2Ti6rw-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3E44A1953945; Wed, 4 Sep 2024 13:50:42 +0000 (UTC) Received: from gmonaco-thinkpadt14gen3.rmtit.com (unknown [10.39.194.141]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6A77E300019A; Wed, 4 Sep 2024 13:50:37 +0000 (UTC) From: Gabriele Monaco To: Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Brendan Higgins , David Gow , Rae Moar , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, Gabriele Monaco Subject: [PATCH] um: kunit: resolve missing prototypes warning Date: Wed, 4 Sep 2024 15:50:19 +0200 Message-ID: <20240904135019.200756-1-gmonaco@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 While building for KUnit with default settings, the build is generating the following compilation warnings. ``` $ make ARCH=3Dum O=3D.kunit --jobs=3D16 ../lib/iomap.c:156:5: warning: no previous prototype for =E2=80=98ioread64_lo_hi=E2=80=99 [-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 --- include/asm-generic/io.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 80de699bf6af..0b02c8e38f20 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -13,10 +13,6 @@ #include #include =20 -#ifdef CONFIG_GENERIC_IOMAP -#include -#endif - #include #include =20 @@ -295,6 +291,10 @@ static inline void writeq(u64 value, volatile void __i= omem *addr) #endif #endif /* CONFIG_64BIT */ =20 +#ifdef CONFIG_GENERIC_IOMAP +#include +#endif + /* * {read,write}{b,w,l,q}_relaxed() are like the regular version, but * are not guaranteed to provide ordering against spinlocks or memory base-commit: 67784a74e258a467225f0e68335df77acd67b7ab --=20 2.46.0