Displaying 20 results from an estimated 140 matches for "__maybe_unused".
2017 Jul 25
2
[PATCH net-next] virtio-net: mark PM functions as __maybe_unused
...t virtio_device *vdev)
drivers/net/virtio_net.c:1859:13: error: 'virtnet_freeze_down' defined but not used [-Werror=unused-function]
static void virtnet_freeze_down(struct virtio_device *vdev)
A more robust way to do this is to remove the #ifdef around the callers
and instead mark them as __maybe_unused. The compiler will now just
silently drop the unused code.
Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set")
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
drivers/net/virtio_net.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers...
2017 Jul 25
2
[PATCH net-next] virtio-net: mark PM functions as __maybe_unused
...t virtio_device *vdev)
drivers/net/virtio_net.c:1859:13: error: 'virtnet_freeze_down' defined but not used [-Werror=unused-function]
static void virtnet_freeze_down(struct virtio_device *vdev)
A more robust way to do this is to remove the #ifdef around the callers
and instead mark them as __maybe_unused. The compiler will now just
silently drop the unused code.
Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set")
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
drivers/net/virtio_net.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers...
2016 May 18
0
[PATCH 4/5] drm: exynos: mark pm functions as __maybe_unused
...ates' defined but not used [-Werror=unused-function]
static int hdmi_clk_enable_gates(struct hdmi_context *hdata)
The problem is that the PM functions themselves are inside of
an #ifdef, but some functions they call are not.
This patch removes the #ifdef and instead marks the PM functions
as __maybe_unused, which is a more reliable way to get it right.
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Fixes: 9be7e9898444 ("drm/exynos/hdmi: clock code re-factoring")
---
drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/driver...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...- a/arch/x86/kernel/paravirt_patch_32.c
+++ b/arch/x86/kernel/paravirt_patch_32.c
@@ -34,14 +34,16 @@ extern bool pv_is_native_vcpu_is_preempted(void);
unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
{
- const unsigned char *start, *end;
+ const unsigned char *start __maybe_unused, *end __maybe_unused;
unsigned ret;
#define PATCH_SITE(ops, x) \
case PARAVIRT_PATCH(ops.x): \
start = start_##ops##_##x; \
end = end_##ops##_##x; \
- goto patch_site
+ \
+ return paravirt_patch_insns(ibuf, len, start, end);
+
switch (type) {
#ifdef CONFIG_PAR...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...- a/arch/x86/kernel/paravirt_patch_32.c
+++ b/arch/x86/kernel/paravirt_patch_32.c
@@ -34,14 +34,16 @@ extern bool pv_is_native_vcpu_is_preempted(void);
unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
{
- const unsigned char *start, *end;
+ const unsigned char *start __maybe_unused, *end __maybe_unused;
unsigned ret;
#define PATCH_SITE(ops, x) \
case PARAVIRT_PATCH(ops.x): \
start = start_##ops##_##x; \
end = end_##ops##_##x; \
- goto patch_site
+ \
+ return paravirt_patch_insns(ibuf, len, start, end);
+
switch (type) {
#ifdef CONFIG_PAR...
2018 Nov 05
2
[Bug 1289] New: iptables build fails with kernel 4.20-rc1 - gnu_inline attributes
...alternates/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel-next/iptables-1.8.1/libiptc/libip6tc.c:30:
/home/neil/projects/scratch/alternates/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel-next/linux-4.20-rc1/include/linux/compiler_types.h:199:2:
warning: redundant redeclaration of '__maybe_unused' [-Wredundant-decls]
__maybe_unused notrace
^~~~~~~~~~~~~~
/home/neil/projects/scratch/alternates/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel-next/iptables-1.8.1/libiptc/libiptc.c:268:8:
note: in expansion of macro 'inline'
static inline unsigned int
^~~~~~
/home/...
2020 Apr 28
0
[PATCH v3 40/75] x86/sev-es: Compile early handler code into kernel image
From: Joerg Roedel <jroedel at suse.de>
Setup sev-es.c and include the code from the
pre-decompression stage to also build it into the image of the running
kernel. Temporarily add __maybe_unused annotations to avoid build
warnings until the functions get used.
Signed-off-by: Joerg Roedel <jroedel at suse.de>
---
arch/x86/kernel/Makefile | 1 +
arch/x86/kernel/sev-es-shared.c | 21 ++--
arch/x86/kernel/sev-es.c | 163 ++++++++++++++++++++++++++++++++
3 files changed...
2020 Apr 28
0
[PATCH v3 42/75] x86/sev-es: Setup GHCB based boot #VC handler
...gs, trapnr);
}
diff --git a/arch/x86/kernel/sev-es-shared.c b/arch/x86/kernel/sev-es-shared.c
index 5703f9b17e70..3d2299fb5e3f 100644
--- a/arch/x86/kernel/sev-es-shared.c
+++ b/arch/x86/kernel/sev-es-shared.c
@@ -9,7 +9,7 @@
* and is included directly into both code-bases.
*/
-static void __maybe_unused sev_es_terminate(unsigned int reason)
+static void sev_es_terminate(unsigned int reason)
{
u64 val = GHCB_SEV_TERMINATE;
@@ -27,7 +27,7 @@ static void __maybe_unused sev_es_terminate(unsigned int reason)
asm volatile("hlt\n" : : : "memory");
}
-static bool __maybe_unu...
2018 Sep 07
2
[PATCH] x86/paravirt: Get rid of patch_site label
...addr, unsigned len)
if (pv_is_native_vcpu_is_preempted()) {
start = start_lock_vcpu_is_preempted;
end = end_lock_vcpu_is_preempted;
- goto patch_site;
+
+ return paravirt_patch_insns(ibuf, len, start, end);
}
goto patch_default;
#endif
@@ -86,7 +87,6 @@ patch_default: __maybe_unused
ret = paravirt_patch_default(type, ibuf, addr, len);
break;
-patch_site:
ret = paravirt_patch_insns(ibuf, len, start, end);
break;
}
--
2.17.0.582.gccdcbd54c
2018 Sep 07
2
[PATCH] x86/paravirt: Get rid of patch_site label
...addr, unsigned len)
if (pv_is_native_vcpu_is_preempted()) {
start = start_lock_vcpu_is_preempted;
end = end_lock_vcpu_is_preempted;
- goto patch_site;
+
+ return paravirt_patch_insns(ibuf, len, start, end);
}
goto patch_default;
#endif
@@ -86,7 +87,6 @@ patch_default: __maybe_unused
ret = paravirt_patch_default(type, ibuf, addr, len);
break;
-patch_site:
ret = paravirt_patch_insns(ibuf, len, start, end);
break;
}
--
2.17.0.582.gccdcbd54c
2018 Sep 08
0
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...32.c
> +++ b/arch/x86/kernel/paravirt_patch_32.c
> @@ -34,14 +34,16 @@ extern bool pv_is_native_vcpu_is_preempted(void);
>
> unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
> {
> - const unsigned char *start, *end;
> + const unsigned char *start __maybe_unused, *end __maybe_unused;
> unsigned ret;
>
> #define PATCH_SITE(ops, x) \
> case PARAVIRT_PATCH(ops.x): \
> start = start_##ops##_##x; \
> end = end_##ops##_##x; \
> - goto patch_site
> + \
> + return paravirt_patch_insns(ibuf, len, start,...
2020 Sep 07
0
[PATCH v7 40/72] x86/sev-es: Setup GHCB based boot #VC handler
...n-kernel unwinder
diff --git a/arch/x86/kernel/sev-es-shared.c b/arch/x86/kernel/sev-es-shared.c
index 18619279a46f..aa77f2eb8d88 100644
--- a/arch/x86/kernel/sev-es-shared.c
+++ b/arch/x86/kernel/sev-es-shared.c
@@ -9,7 +9,7 @@
* and is included directly into both code-bases.
*/
-static void __maybe_unused sev_es_terminate(unsigned int reason)
+static void sev_es_terminate(unsigned int reason)
{
u64 val = GHCB_SEV_TERMINATE;
@@ -27,7 +27,7 @@ static void __maybe_unused sev_es_terminate(unsigned int reason)
asm volatile("hlt\n" : : : "memory");
}
-static bool __maybe_unu...
2019 Mar 06
1
[PATCH] vhost: silence an unused-variable warning
...an empty macro that does not evaluate its size argument,
which in turn produces an unused-variable warning:
drivers/vhost/vhost.c:1191:9: error: unused variable 's' [-Werror,-Wunused-variable]
size_t s = vhost_has_feature(vq, VIRTIO_RING_F_EVENT_IDX) ? 2 : 0;
Mark the variable as __maybe_unused to shut up that warning.
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
drivers/vhost/vhost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index a2e5dc7716e2..5ace833de746 100644
--- a/drivers/vhost/vhost.c
+++ b/driv...
2016 Dec 16
2
[PATCH] x86/paravirt: hide unused patch_default label
A bugfix introduced a harmless warning:
arch/x86/kernel/paravirt_patch_32.c: In function 'native_patch':
arch/x86/kernel/paravirt_patch_32.c:71:1: error: label 'patch_default' defined but not used [-Werror=unused-label]
This puts it in the same #ifdef as its caller.
Fixes: 45dbea5f55c0 ("x86/paravirt: Fix native_patch()")
Signed-off-by: Arnd Bergmann <arnd at
2016 Dec 16
2
[PATCH] x86/paravirt: hide unused patch_default label
A bugfix introduced a harmless warning:
arch/x86/kernel/paravirt_patch_32.c: In function 'native_patch':
arch/x86/kernel/paravirt_patch_32.c:71:1: error: label 'patch_default' defined but not used [-Werror=unused-label]
This puts it in the same #ifdef as its caller.
Fixes: 45dbea5f55c0 ("x86/paravirt: Fix native_patch()")
Signed-off-by: Arnd Bergmann <arnd at
2019 Nov 08
0
[PATCH 01/13] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h
...p, void *res, int size)
-{
- __READ_ONCE_SIZE;
-}
-
-#ifdef CONFIG_KASAN
-/*
- * We can't declare function 'inline' because __no_sanitize_address confilcts
- * with inlining. Attempt to inline it may cause a build failure.
- * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
- * '__maybe_unused' allows us to avoid defined-but-not-used warnings.
- */
-# define __no_kasan_or_inline __no_sanitize_address notrace __maybe_unused
-#else
-# define __no_kasan_or_inline __always_inline
-#endif
-
-static __no_kasan_or_inline
-void __read_once_size_nocheck(const volatile void *p, void *res, int...
2010 Apr 05
3
A clocksource driver for HyperV
I am attaching a clocksource driver for HyperV.
Signed-off-by: K. Y. Srinivasan <ksrinivasan at novell.com>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hyperv_clocksource.patch
Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20100405/80968881/attachment-0001.txt
2010 Apr 05
3
A clocksource driver for HyperV
I am attaching a clocksource driver for HyperV.
Signed-off-by: K. Y. Srinivasan <ksrinivasan at novell.com>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hyperv_clocksource.patch
Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20100405/80968881/attachment-0001.txt
2016 Dec 16
0
[PATCH] x86/paravirt: hide unused patch_default label
...atch_32.c b/arch/x86/kernel/paravirt_patch_32.c
index d33ef165b1f8..553acbbb4d32 100644
--- a/arch/x86/kernel/paravirt_patch_32.c
+++ b/arch/x86/kernel/paravirt_patch_32.c
@@ -68,7 +68,7 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
#endif
default:
-patch_default:
+patch_default: __maybe_unused
ret = paravirt_patch_default(type, clobbers, ibuf, addr, len);
break;
diff --git a/arch/x86/kernel/paravirt_patch_64.c b/arch/x86/kernel/paravirt_patch_64.c
index f4fcf26c9fce..11aaf1eaa0e4 100644
--- a/arch/x86/kernel/paravirt_patch_64.c
+++ b/arch/x86/kernel/paravirt_patch_64.c
@@ -80,7 +...
2010 May 19
1
Staging: hv: fix hv_utils module to properly autoload
...linux/reboot.h>
+#include <linux/dmi.h>
+#include <linux/pci.h>
#include "logging.h"
#include "osd.h"
@@ -251,10 +253,36 @@ static void heartbeat_onchannelcallback(
DPRINT_EXIT(VMBUS);
}
+static const struct pci_device_id __initconst
+hv_utils_pci_table[] __maybe_unused = {
+ { PCI_DEVICE(0x1414, 0x5353) }, /* Hyper-V emulated VGA controller */
+ { 0 }
+};
+MODULE_DEVICE_TABLE(pci, hv_utils_pci_table);
+
+
+static const struct dmi_system_id __initconst
+hv_utils_dmi_table[] __maybe_unused = {
+ {
+ .ident = "Hyper-V",
+ .matches = {
+ DMI_MATCH(DMI_...