Skip to contentSkip to conversation

usb/serial/generic: Fix compile error

PATCH In review Javier Martinez Canillas 3 participants 7 messages Apr 11, 2010 – Apr 14, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb/serial/generic: Fix compile error

usb/serial/generic.c gives me a compile error when CONFIG_MAGIC_SYSRQ is not defined.

The problem is that usb_serial_handle_sysrq_char() calls handle_sysrq() that only is defined if CONFIG_MAGIC_SYSRQ is defined.

This patch add an empty handle_sysrq inline function if CONFIG_MAGIC_SYSRQ is not defined and generic.c compiles cleanly.

From 9c484ab9136f25bf55b7664116a5f3b78eae69dc Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Sun, 11 Apr 2010 11:14:22 -0400
Subject: [PATCH] usb/serial/generic: Fix compile error

---
 include/linux/sysrq.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/sysrq.h +5 -0
index 5f2bdef..0b754c1 100644
@@ -53,6 +53,11 @@ int sysrq_toggle_support(int enable_mask);
 
 #else
 
+static inline void handle_sysrq(int key, struct tty_struct *tty)
+{
+
+}
+
 static inline int register_sysrq_key(int key, struct sysrq_key_op *op)
 {
 	return -EINVAL;
Signature · 1 line
1.6.0.4
#1 lore raw

Hi Javier,

Quoted 9 lines · Javier Martinez Canillas

usb/serial/generic.c gives me a compile error when CONFIG_MAGIC_SYSRQ is not defined.

The problem is that usb_serial_handle_sysrq_char() calls handle_sysrq() that only is defined if CONFIG_MAGIC_SYSRQ is defined.

This patch add an empty handle_sysrq inline function if CONFIG_MAGIC_SYSRQ is not defined and generic.c compiles cleanly.

Thanks for the patch. I will fold it into the one where I managed to loose the static inline if you do not mind.

Signature · 1 line
Dmitry
#2 lore raw
In reply to Javier Martinez Canillas
Quoted 5 lines · Dmitry Torokhov

Thanks for the patch. I will fold it into the one where I managed to loose the static inline if you do not mind.

--

I don't mind, it's ok for me.
Thank you very much for the quick answer.

Best regards,

-----------------------------------------
Javier Martínez Canillas
+595 981 88 66 58
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to Javier Martinez Canillas
Quoted 9 lines · On Sun, 11 Apr 2010 20:04:46 -0700 Dmitry Torokhov wrote:

Hi Javier,

Quoted 6 lines · Javier Martinez Canillas

usb/serial/generic.c gives me a compile error when CONFIG_MAGIC_SYSRQ is not defined.

The problem is that usb_serial_handle_sysrq_char() calls handle_sysrq() that only is defined if CONFIG_MAGIC_SYSRQ is defined.

Quoted 6 lines
Quoted 3 lines

This patch add an empty handle_sysrq inline function if CONFIG_MAGIC_SYSRQ is not defined and generic.c compiles cleanly.

Thanks for the patch. I will fold it into the one where I managed to loose the static inline if you do not mind.

can we get this patch into linux-next also, please? It still fails in 2 places when MAGIC_SYSRQ is disabled.

---
~Randy

#4 lore raw
In reply to Javier Martinez Canillas
Quoted 15 lines · Randy Dunlap
Quoted 13 lines · On Sun, 11 Apr 2010 20:04:46 -0700 Dmitry Torokhov wrote:

Hi Javier,

Quoted 9 lines · Javier Martinez Canillas

usb/serial/generic.c gives me a compile error when CONFIG_MAGIC_SYSRQ is not defined.

The problem is that usb_serial_handle_sysrq_char() calls handle_sysrq() that only is defined if CONFIG_MAGIC_SYSRQ is defined.

This patch add an empty handle_sysrq inline function if CONFIG_MAGIC_SYSRQ is not defined and generic.c compiles cleanly.

Quoted 6 lines
Quoted 2 lines

Thanks for the patch. I will fold it into the one where I managed to loose the static inline if you do not mind.

can we get this patch into linux-next also, please? It still fails in 2 places when MAGIC_SYSRQ is disabled.

Should be there...

Signature · 1 line
Dmitry
#5 lore raw
In reply to Javier Martinez Canillas
Quoted 16 lines · On Wed, 14 Apr 2010 08:59:53 -0700 Dmitry Torokhov wrote:
Quoted 15 lines · Randy Dunlap
Quoted 13 lines · On Sun, 11 Apr 2010 20:04:46 -0700 Dmitry Torokhov wrote:

Hi Javier,

Quoted 9 lines · Javier Martinez Canillas

usb/serial/generic.c gives me a compile error when CONFIG_MAGIC_SYSRQ is not defined.

The problem is that usb_serial_handle_sysrq_char() calls handle_sysrq() that only is defined if CONFIG_MAGIC_SYSRQ is defined.

This patch add an empty handle_sysrq inline function if CONFIG_MAGIC_SYSRQ is not defined and generic.c compiles cleanly.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Thanks for the patch. I will fold it into the one where I managed to loose the static inline if you do not mind.

can we get this patch into linux-next also, please? It still fails in 2 places when MAGIC_SYSRQ is disabled.

Should be there...

It's not in linux-next-20100414.

---
~Randy

#6 lore raw
In reply to Javier Martinez Canillas
Quoted 21 lines · Randy Dunlap
Quoted 19 lines · On Wed, 14 Apr 2010 08:59:53 -0700 Dmitry Torokhov wrote:
Quoted 18 lines · Randy Dunlap
Quoted 15 lines · On Sun, 11 Apr 2010 20:04:46 -0700 Dmitry Torokhov wrote:

Hi Javier,

Quoted 9 lines · Javier Martinez Canillas

usb/serial/generic.c gives me a compile error when CONFIG_MAGIC_SYSRQ is not defined.

The problem is that usb_serial_handle_sysrq_char() calls handle_sysrq() that only is defined if CONFIG_MAGIC_SYSRQ is defined.

This patch add an empty handle_sysrq inline function if CONFIG_MAGIC_SYSRQ is not defined and generic.c compiles cleanly.

Thanks for the patch. I will fold it into the one where I managed to loose the static inline if you do not mind.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

can we get this patch into linux-next also, please? It still fails in 2 places when MAGIC_SYSRQ is disabled.

Should be there...

It's not in linux-next-20100414.

I see it in by 'next' branch, let's see if it shows up in the next next.

Signature · 1 line
Dmitry