Accepting request 828206 from home:bfrogers:branches:Virtualization

Fix compilation errors seen with pre-release gcc 11
Add a "Split-Provides" mechanism for the subpackages split off in v5.1.0

OBS-URL: https://build.opensuse.org/request/show/828206
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=561
This commit is contained in:
Bruce Rogers 2020-08-20 14:03:10 +00:00 committed by Git OBS Bridge
parent 607fbaf071
commit 7f9c57ac07
11 changed files with 280 additions and 112 deletions

View File

@ -0,0 +1,55 @@
From: Bruce Rogers <brogers@suse.com>
Date: Thu, 13 Aug 2020 13:07:56 -0600
Subject: Revert "qht: constify qht_statistics_init"
This reverts commit 6579f10779b5b5ed2e978e7b8cae7bcbf8665254.
This change partially addresses https://bugs.launchpad.net/qemu/+bug/1886155
where a pre-release gcc 11 warns about const qualifier abuse.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
include/qemu/qht.h | 2 +-
util/qht.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/qemu/qht.h b/include/qemu/qht.h
index 758c7ac6c89978ee762e9d946584..2e2d6bca932c83bea993850b60f8 100644
--- a/include/qemu/qht.h
+++ b/include/qemu/qht.h
@@ -211,7 +211,7 @@ void qht_iter_remove(struct qht *ht, qht_iter_bool_func_t func, void *userp);
* When done with @stats, pass the struct to qht_statistics_destroy().
* Failing to do this will leak memory.
*/
-void qht_statistics_init(const struct qht *ht, struct qht_stats *stats);
+void qht_statistics_init(struct qht *ht, struct qht_stats *stats);
/**
* qht_statistics_destroy - Destroy a &struct qht_stats
diff --git a/util/qht.c b/util/qht.c
index 67e5d5b9163f5f33e41f76a7cd26..a5a332d98998209875a47ebfdeee 100644
--- a/util/qht.c
+++ b/util/qht.c
@@ -900,9 +900,9 @@ bool qht_resize(struct qht *ht, size_t n_elems)
}
/* pass @stats to qht_statistics_destroy() when done */
-void qht_statistics_init(const struct qht *ht, struct qht_stats *stats)
+void qht_statistics_init(struct qht *ht, struct qht_stats *stats)
{
- const struct qht_map *map;
+ struct qht_map *map;
int i;
map = atomic_rcu_read(&ht->map);
@@ -919,8 +919,8 @@ void qht_statistics_init(const struct qht *ht, struct qht_stats *stats)
stats->head_buckets = map->n_buckets;
for (i = 0; i < map->n_buckets; i++) {
- const struct qht_bucket *head = &map->buckets[i];
- const struct qht_bucket *b;
+ struct qht_bucket *head = &map->buckets[i];
+ struct qht_bucket *b;
unsigned int version;
size_t buckets;
size_t entries;

View File

@ -1,107 +0,0 @@
From: Bruce Rogers <brogers@suse.com>
Date: Tue, 18 Aug 2020 11:12:28 -0600
Subject: atomic.h: change method for removing C qualifier
gcc 11 is reporting warnings with the current method used to strip
qualifiers (eg const) from the variables used in some atomic functions.
In this case it's for calls from util/qht.c. Switch to using __auto_type
initialization from a 0 cast to the intended type. It appears that a const
qualifier is automatically stripped from the type when done this way,
which is what we're aiming for here.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
include/qemu/atomic.h | 52 +++++--------------------------------------
1 file changed, 6 insertions(+), 46 deletions(-)
diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index ff72db51154ca9aeab8e46cfb548..fa01ac85eb4d82e2e6432559ab2e 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -18,48 +18,6 @@
/* Compiler barrier */
#define barrier() ({ asm volatile("" ::: "memory"); (void)0; })
-/* The variable that receives the old value of an atomically-accessed
- * variable must be non-qualified, because atomic builtins return values
- * through a pointer-type argument as in __atomic_load(&var, &old, MODEL).
- *
- * This macro has to handle types smaller than int manually, because of
- * implicit promotion. int and larger types, as well as pointers, can be
- * converted to a non-qualified type just by applying a binary operator.
- */
-#define typeof_strip_qual(expr) \
- typeof( \
- __builtin_choose_expr( \
- __builtin_types_compatible_p(typeof(expr), bool) || \
- __builtin_types_compatible_p(typeof(expr), const bool) || \
- __builtin_types_compatible_p(typeof(expr), volatile bool) || \
- __builtin_types_compatible_p(typeof(expr), const volatile bool), \
- (bool)1, \
- __builtin_choose_expr( \
- __builtin_types_compatible_p(typeof(expr), signed char) || \
- __builtin_types_compatible_p(typeof(expr), const signed char) || \
- __builtin_types_compatible_p(typeof(expr), volatile signed char) || \
- __builtin_types_compatible_p(typeof(expr), const volatile signed char), \
- (signed char)1, \
- __builtin_choose_expr( \
- __builtin_types_compatible_p(typeof(expr), unsigned char) || \
- __builtin_types_compatible_p(typeof(expr), const unsigned char) || \
- __builtin_types_compatible_p(typeof(expr), volatile unsigned char) || \
- __builtin_types_compatible_p(typeof(expr), const volatile unsigned char), \
- (unsigned char)1, \
- __builtin_choose_expr( \
- __builtin_types_compatible_p(typeof(expr), signed short) || \
- __builtin_types_compatible_p(typeof(expr), const signed short) || \
- __builtin_types_compatible_p(typeof(expr), volatile signed short) || \
- __builtin_types_compatible_p(typeof(expr), const volatile signed short), \
- (signed short)1, \
- __builtin_choose_expr( \
- __builtin_types_compatible_p(typeof(expr), unsigned short) || \
- __builtin_types_compatible_p(typeof(expr), const unsigned short) || \
- __builtin_types_compatible_p(typeof(expr), volatile unsigned short) || \
- __builtin_types_compatible_p(typeof(expr), const volatile unsigned short), \
- (unsigned short)1, \
- (expr)+0))))))
-
#ifdef __ATOMIC_RELAXED
/* For C11 atomic ops */
@@ -157,7 +115,7 @@
#define atomic_rcu_read(ptr) \
({ \
QEMU_BUILD_BUG_ON(sizeof(*ptr) > ATOMIC_REG_SIZE); \
- typeof_strip_qual(*ptr) _val; \
+ __auto_type _val = (typeof(*ptr))0; \
atomic_rcu_read__nocheck(ptr, &_val); \
_val; \
})
@@ -170,7 +128,7 @@
#define atomic_load_acquire(ptr) \
({ \
QEMU_BUILD_BUG_ON(sizeof(*ptr) > ATOMIC_REG_SIZE); \
- typeof_strip_qual(*ptr) _val; \
+ __auto_type _val = (typeof(*ptr))0; \
__atomic_load(ptr, &_val, __ATOMIC_ACQUIRE); \
_val; \
})
@@ -194,7 +152,8 @@
/* Returns the eventual value, failed or not */
#define atomic_cmpxchg__nocheck(ptr, old, new) ({ \
- typeof_strip_qual(*ptr) _old = (old); \
+ __auto_type _old = (typeof(*ptr))0; \
+ _old = (old); \
(void)__atomic_compare_exchange_n(ptr, &_old, new, false, \
__ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); \
_old; \
@@ -461,7 +420,8 @@
#endif
#define atomic_fetch_inc_nonzero(ptr) ({ \
- typeof_strip_qual(*ptr) _oldn = atomic_read(ptr); \
+ __auto_type _oldn = (typeof(*ptr))0; \
+ _oldn = atomic_read(ptr); \
while (_oldn && atomic_cmpxchg(ptr, _oldn, _oldn + 1) != _oldn) { \
_oldn = atomic_read(ptr); \
} \

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2b76e56ef2c95a006d8deed85abf08d323980a872b4102ea42f12f5de6ef006e
size 34892
oid sha256:4005d41755ab814b7f88da9452909fa6133c3ecaa71dff6d060aa50c3b6de2d7
size 34956

31
qemu-ga-ref.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title></title>
<meta name="generator" content="LibreOffice 7.0.0.3 (Linux)"/>
<meta name="created" content="2020-08-19T17:43:30.234250115"/>
<meta name="changed" content="2020-08-19T17:47:24.726661339"/>
<style type="text/css">
@page { size: 8.5in 11in; margin: 0.79in }
p { margin-bottom: 0.1in; line-height: 115%; background: transparent }
</style>
</head>
<body lang="en-US" link="#000080" vlink="#800000" dir="ltr"><p style="margin-bottom: 0in; line-height: 100%">
If you are looking for the QEMU Guest Agent protocol reference, see:</p>
<p style="margin-bottom: 0in; line-height: 100%">/usr/share/doc/packages/qemu/interop/qemu-ga-ref.html</p>
<p style="margin-bottom: 0in; line-height: 100%"><br/>
</p>
<p style="margin-bottom: 0in; line-height: 100%">The file you are
reading is now provided simply to support a packaging</p>
<p style="margin-bottom: 0in; line-height: 100%">&quot;Split-Provides&quot;,
in order to maintain prior-release functionality. The</p>
<p style="margin-bottom: 0in; line-height: 100%">new package has
split that functionality into another package which may</p>
<p style="margin-bottom: 0in; line-height: 100%">be optional going
forward. If you find the package providing this file</p>
<p style="margin-bottom: 0in; line-height: 100%">is not needed, you
may uninstall it.</p>
</body>
</html>

8
qemu-ga-ref.txt Normal file
View File

@ -0,0 +1,8 @@
If you are looking for the QEMU Guest Agent protocol reference, see:
/usr/share/doc/packages/qemu/interop/qemu-ga-ref.txt
The file you are reading is now provided simply to support a packaging
"Split-Provides", in order to maintain prior-release functionality. The
new package has split that functionality into another package which may
be optional going forward. If you find the package providing this file
is not needed, you may uninstall it.

31
qemu-qmp-ref.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title></title>
<meta name="generator" content="LibreOffice 7.0.0.3 (Linux)"/>
<meta name="created" content="2020-08-19T17:49:34.681944218"/>
<meta name="changed" content="2020-08-19T17:50:19.834682696"/>
<style type="text/css">
@page { size: 8.5in 11in; margin: 0.79in }
p { margin-bottom: 0.1in; line-height: 115%; background: transparent }
</style>
</head>
<body lang="en-US" link="#000080" vlink="#800000" dir="ltr"><p style="margin-bottom: 0in; line-height: 100%">
If you are looking for the QEMU QMP reference, see:</p>
<p style="margin-bottom: 0in; line-height: 100%">/usr/share/doc/packages/qemu/interop/qemu-qmp-ref.html</p>
<p style="margin-bottom: 0in; line-height: 100%"><br/>
</p>
<p style="margin-bottom: 0in; line-height: 100%">The file you are
reading is now provided simply to support a packaging</p>
<p style="margin-bottom: 0in; line-height: 100%">&quot;Split-Provides&quot;,
in order to maintain prior-release functionality. The</p>
<p style="margin-bottom: 0in; line-height: 100%">new package has
split that functionality into another package which may</p>
<p style="margin-bottom: 0in; line-height: 100%">be optional going
forward. If you find the package providing this file</p>
<p style="margin-bottom: 0in; line-height: 100%">is not needed, you
may uninstall it.</p>
</body>
</html>

8
qemu-qmp-ref.txt Normal file
View File

@ -0,0 +1,8 @@
If you are looking for the QEMU QMP reference, see:
/usr/share/doc/packages/qemu/interop/qemu-qmp-ref.txt
The file you are reading is now provided simply to support a packaging
"Split-Provides", in order to maintain prior-release functionality. The
new package has split that functionality into another package which may
be optional going forward. If you find the package providing this file
is not needed, you may uninstall it.

View File

@ -1,10 +1,23 @@
-------------------------------------------------------------------
Tue Aug 18 20:28:18 UTC 2020 - Bruce Rogers <brogers@suse.com>
Thu Aug 20 13:19:12 UTC 2020 - Bruce Rogers <brogers@suse.com>
- Fix compilation errors seen with pre-release gcc 11
atomic.h-change-method-for-removing-C-qu.patch
qht-Revert-some-constification-in-qht.c.patch
Revert-qht-constify-qht_statistics_init.patch
help-compiler-out-by-initializing-array.patch
s390x-Fix-stringop-truncation-issue-repo.patch
- Add Split-Provides mechanism, using doc files which were moved
in v5.1.0. This allows for the new subpackages to be selected for
install when the v5.0.0 qemu is updated. These new subpackages are
not marked as "Required" by any packages, in an effort to reduce
the dependencies of the core qemu components (boo#1175320)
v5.0.0 qemu file mapping is provided as follows:
subpackage continuity file provided (files are dummies)
========== ============================================
qemu-chardev-baum /usr/share/doc/packages/qemu/qemu-ga-ref.html
qemu-hw-display-qxl /usr/share/doc/packages/qemu/qemu-ga-ref.txt
qemu-hw-usb-redirect /usr/share/doc/packages/qemu/qemu-qmp-ref.html
qemu-hw-usb-smartcard /usr/share/doc/packages/qemu/qemu-qmp-ref.txt
-------------------------------------------------------------------
Tue Aug 18 15:29:41 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -125,6 +125,10 @@ Source13: supported.s390.txt
Source14: 50-seabios-256k.json
Source15: 60-seabios-128k.json
Source200: qemu-rpmlintrc
Source201: qemu-ga-ref.html
Source202: qemu-ga-ref.txt
Source203: qemu-qmp-ref.html
Source204: qemu-qmp-ref.txt
Source300: bundles.tar.xz
Source301: update_git.sh
Source302: config.sh
@ -177,7 +181,8 @@ Patch00040: roms-Makefile-enable-cross-compile-for-b.patch
Patch00041: configure-remove-pkgversion-from-CONFIG_.patch
Patch00042: docs-add-SUSE-support-statements-to-html.patch
Patch00043: s390x-Fix-stringop-truncation-issue-repo.patch
Patch00044: atomic.h-change-method-for-removing-C-qu.patch
Patch00044: Revert-qht-constify-qht_statistics_init.patch
Patch00045: qht-Revert-some-constification-in-qht.c.patch
# Patches applied in roms/seabios/:
Patch01000: seabios-use-python2-explicitly-as-needed.patch
Patch01001: seabios-switch-to-python3-as-needed.patch
@ -726,6 +731,7 @@ Summary: Baum braille chardev support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-ga-ref.html
%{qemu_module_conflicts}
%description chardev-baum
@ -736,6 +742,7 @@ Summary: QXL display support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-ga-ref.txt
%{qemu_module_conflicts}
%description hw-display-qxl
@ -746,17 +753,21 @@ Summary: USB redirection support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-qmp-ref.html
%{qemu_module_conflicts}
%description hw-usb-redirect
This package contains a module for USB redirection support.
%if 0%{?is_opensuse}
%package hw-usb-smartcard
Summary: USB smartcard support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-qmp-ref.txt
%{qemu_module_conflicts}
%endif
%description hw-usb-smartcard
This package contains a modules for USB smartcard support.
@ -994,6 +1005,7 @@ This package provides a service file for starting and stopping KSM.
%endif
%patch00043 -p1
%patch00044 -p1
%patch00045 -p1
%patch01000 -p1
%patch01001 -p1
%patch01002 -p1
@ -1678,6 +1690,10 @@ install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%ifarch s390x
install -D -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/modules-load.d/kvm.conf
%endif
install -D -m 0644 %{SOURCE201} %{buildroot}%_docdir/%name/qemu-ga-ref.html
install -D -m 0644 %{SOURCE202} %{buildroot}%_docdir/%name/qemu-ga-ref.txt
install -D -m 0644 %{SOURCE203} %{buildroot}%_docdir/%name/qemu-qmp-ref.html
install -D -m 0644 %{SOURCE204} %{buildroot}%_docdir/%name/qemu-qmp-ref.txt
%fdupes -s %{buildroot}
# ========================================================================
@ -2092,24 +2108,32 @@ fi
%files chardev-baum
%defattr(-, root, root)
%dir %_docdir/%name
%dir %_libdir/%name
%_libdir/%name/chardev-baum.so
%_docdir/%name/qemu-ga-ref.html
%files hw-display-qxl
%defattr(-, root, root)
%dir %_docdir/%name
%dir %_libdir/%name
%_libdir/%name/hw-display-qxl.so
%_docdir/%name/qemu-ga-ref.txt
%files hw-usb-redirect
%defattr(-, root, root)
%dir %_docdir/%name
%dir %_libdir/%name
%_libdir/%name/hw-usb-redirect.so
%_docdir/%name/qemu-qmp-ref.html
%if 0%{?is_opensuse}
%files hw-usb-smartcard
%defattr(-, root, root)
%dir %_docdir/%name
%dir %_libdir/%name
%_libdir/%name/hw-usb-smartcard.so
%_docdir/%name/qemu-qmp-ref.txt
%endif
%files ui-curses

View File

@ -122,6 +122,10 @@ Source13: supported.s390.txt
Source14: 50-seabios-256k.json
Source15: 60-seabios-128k.json
Source200: qemu-rpmlintrc
Source201: qemu-ga-ref.html
Source202: qemu-ga-ref.txt
Source203: qemu-qmp-ref.html
Source204: qemu-qmp-ref.txt
Source300: bundles.tar.xz
Source301: update_git.sh
Source302: config.sh
@ -656,6 +660,7 @@ Summary: Baum braille chardev support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-ga-ref.html
%{qemu_module_conflicts}
%description chardev-baum
@ -666,6 +671,7 @@ Summary: QXL display support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-ga-ref.txt
%{qemu_module_conflicts}
%description hw-display-qxl
@ -676,17 +682,21 @@ Summary: USB redirection support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-qmp-ref.html
%{qemu_module_conflicts}
%description hw-usb-redirect
This package contains a module for USB redirection support.
%if 0%{?is_opensuse}
%package hw-usb-smartcard
Summary: USB smartcard support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-qmp-ref.txt
%{qemu_module_conflicts}
%endif
%description hw-usb-smartcard
This package contains a modules for USB smartcard support.
@ -1537,6 +1547,10 @@ install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%ifarch s390x
install -D -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/modules-load.d/kvm.conf
%endif
install -D -m 0644 %{SOURCE201} %{buildroot}%_docdir/%name/qemu-ga-ref.html
install -D -m 0644 %{SOURCE202} %{buildroot}%_docdir/%name/qemu-ga-ref.txt
install -D -m 0644 %{SOURCE203} %{buildroot}%_docdir/%name/qemu-qmp-ref.html
install -D -m 0644 %{SOURCE204} %{buildroot}%_docdir/%name/qemu-qmp-ref.txt
%fdupes -s %{buildroot}
# ========================================================================
@ -1951,24 +1965,32 @@ fi
%files chardev-baum
%defattr(-, root, root)
%dir %_docdir/%name
%dir %_libdir/%name
%_libdir/%name/chardev-baum.so
%_docdir/%name/qemu-ga-ref.html
%files hw-display-qxl
%defattr(-, root, root)
%dir %_docdir/%name
%dir %_libdir/%name
%_libdir/%name/hw-display-qxl.so
%_docdir/%name/qemu-ga-ref.txt
%files hw-usb-redirect
%defattr(-, root, root)
%dir %_docdir/%name
%dir %_libdir/%name
%_libdir/%name/hw-usb-redirect.so
%_docdir/%name/qemu-qmp-ref.html
%if 0%{?is_opensuse}
%files hw-usb-smartcard
%defattr(-, root, root)
%dir %_docdir/%name
%dir %_libdir/%name
%_libdir/%name/hw-usb-smartcard.so
%_docdir/%name/qemu-qmp-ref.txt
%endif
%files ui-curses

View File

@ -0,0 +1,83 @@
From: Bruce Rogers <brogers@suse.com>
Date: Thu, 13 Aug 2020 13:16:13 -0600
Subject: qht: Revert some constification in qht.c
This change partially addresses https://bugs.launchpad.net/qemu/+bug/1886155
where a pre-release gcc 11 warns about const qualifier abuse.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
include/qemu/qht.h | 4 ++--
util/qht.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/qemu/qht.h b/include/qemu/qht.h
index 2e2d6bca932c83bea993850b60f8..6484837487b012cbfc63b6c6e39e 100644
--- a/include/qemu/qht.h
+++ b/include/qemu/qht.h
@@ -104,7 +104,7 @@ bool qht_insert(struct qht *ht, void *p, uint32_t hash, void **existing);
* Returns the corresponding pointer when a match is found.
* Returns NULL otherwise.
*/
-void *qht_lookup_custom(const struct qht *ht, const void *userp, uint32_t hash,
+void *qht_lookup_custom(struct qht *ht, const void *userp, uint32_t hash,
qht_lookup_func_t func);
/**
@@ -115,7 +115,7 @@ void *qht_lookup_custom(const struct qht *ht, const void *userp, uint32_t hash,
*
* Calls qht_lookup_custom() using @ht's default comparison function.
*/
-void *qht_lookup(const struct qht *ht, const void *userp, uint32_t hash);
+void *qht_lookup(struct qht *ht, const void *userp, uint32_t hash);
/**
* qht_remove - remove a pointer from the hash table
diff --git a/util/qht.c b/util/qht.c
index a5a332d98998209875a47ebfdeee..9515bf7506d351230739e1bdb588 100644
--- a/util/qht.c
+++ b/util/qht.c
@@ -484,10 +484,10 @@ bool qht_reset_size(struct qht *ht, size_t n_elems)
}
static inline
-void *qht_do_lookup(const struct qht_bucket *head, qht_lookup_func_t func,
+void *qht_do_lookup(struct qht_bucket *head, qht_lookup_func_t func,
const void *userp, uint32_t hash)
{
- const struct qht_bucket *b = head;
+ struct qht_bucket *b = head;
int i;
do {
@@ -511,7 +511,7 @@ void *qht_do_lookup(const struct qht_bucket *head, qht_lookup_func_t func,
}
static __attribute__((noinline))
-void *qht_lookup__slowpath(const struct qht_bucket *b, qht_lookup_func_t func,
+void *qht_lookup__slowpath(struct qht_bucket *b, qht_lookup_func_t func,
const void *userp, uint32_t hash)
{
unsigned int version;
@@ -524,10 +524,10 @@ void *qht_lookup__slowpath(const struct qht_bucket *b, qht_lookup_func_t func,
return ret;
}
-void *qht_lookup_custom(const struct qht *ht, const void *userp, uint32_t hash,
+void *qht_lookup_custom(struct qht *ht, const void *userp, uint32_t hash,
qht_lookup_func_t func)
{
- const struct qht_bucket *b;
+ struct qht_bucket *b;
const struct qht_map *map;
unsigned int version;
void *ret;
@@ -547,7 +547,7 @@ void *qht_lookup_custom(const struct qht *ht, const void *userp, uint32_t hash,
return qht_lookup__slowpath(b, func, userp, hash);
}
-void *qht_lookup(const struct qht *ht, const void *userp, uint32_t hash)
+void *qht_lookup(struct qht *ht, const void *userp, uint32_t hash)
{
return qht_lookup_custom(ht, userp, hash, ht->cmp);
}