All of lore.kernel.org
 help / color / mirror / Atom feed
* [SPAM] [uml-devel] [Patch] UML: Fix inconsistence due to tty_operation change
@ 2008-05-02  6:59 ` WANG Cong
  0 siblings, 0 replies; 6+ messages in thread
From: WANG Cong @ 2008-05-02  6:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: jdike, akpm, user-mode-linux-devel


'put_char' of 'struct tty_operations' has changed from 'void' into 'int'.
This can also shut up comipler warnings.

Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: WANG Cong <wangcong@zeuux.org>

---

diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 10b86e1..5047490 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -191,9 +191,9 @@ void line_flush_chars(struct tty_struct *tty)
  	line_flush_buffer(tty);
  }

-void line_put_char(struct tty_struct *tty, unsigned char ch)
+int line_put_char(struct tty_struct *tty, unsigned char ch)
  {
-	line_write(tty, &ch, sizeof(ch));
+	return line_write(tty, &ch, sizeof(ch));
  }

  int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index 1223f2c..979b73e 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -71,7 +71,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines,
  		      char *init, char **error_out);
  extern int line_write(struct tty_struct *tty, const unsigned char *buf,
  		      int len);
-extern void line_put_char(struct tty_struct *tty, unsigned char ch);
+extern int line_put_char(struct tty_struct *tty, unsigned char ch);
  extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
  extern int line_chars_in_buffer(struct tty_struct *tty);
  extern void line_flush_buffer(struct tty_struct *tty);

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Patch] UML: Fix inconsistence due to tty_operation change
@ 2008-05-02  6:59 ` WANG Cong
  0 siblings, 0 replies; 6+ messages in thread
From: WANG Cong @ 2008-05-02  6:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: jdike, user-mode-linux-devel, akpm


'put_char' of 'struct tty_operations' has changed from 'void' into 'int'.
This can also shut up comipler warnings.

Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: WANG Cong <wangcong@zeuux.org>

---

diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 10b86e1..5047490 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -191,9 +191,9 @@ void line_flush_chars(struct tty_struct *tty)
  	line_flush_buffer(tty);
  }

-void line_put_char(struct tty_struct *tty, unsigned char ch)
+int line_put_char(struct tty_struct *tty, unsigned char ch)
  {
-	line_write(tty, &ch, sizeof(ch));
+	return line_write(tty, &ch, sizeof(ch));
  }

  int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index 1223f2c..979b73e 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -71,7 +71,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines,
  		      char *init, char **error_out);
  extern int line_write(struct tty_struct *tty, const unsigned char *buf,
  		      int len);
-extern void line_put_char(struct tty_struct *tty, unsigned char ch);
+extern int line_put_char(struct tty_struct *tty, unsigned char ch);
  extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
  extern int line_chars_in_buffer(struct tty_struct *tty);
  extern void line_flush_buffer(struct tty_struct *tty);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [uml-devel] [Patch] UML: Fix inconsistence due to tty_operation change
  2008-05-02  6:59 ` WANG Cong
@ 2008-05-02  9:31   ` Adrian Bunk
  -1 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2008-05-02  9:31 UTC (permalink / raw)
  To: WANG Cong; +Cc: akpm, Alan Cox, jdike, linux-kernel, user-mode-linux-devel

[ Alan as tty maintainer added to Cc ]

On Fri, May 02, 2008 at 02:59:46PM +0800, WANG Cong wrote:
>
> 'put_char' of 'struct tty_operations' has changed from 'void' into 'int'.
> This can also shut up comipler warnings.

Not only, this could also be a runtime error.

> Cc: Jeff Dike <jdike@addtoit.com>
> Signed-off-by: WANG Cong <wangcong@zeuux.org>
>
> ---
>
> diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
> index 10b86e1..5047490 100644
> --- a/arch/um/drivers/line.c
> +++ b/arch/um/drivers/line.c
> @@ -191,9 +191,9 @@ void line_flush_chars(struct tty_struct *tty)
>  	line_flush_buffer(tty);
>  }
>
> -void line_put_char(struct tty_struct *tty, unsigned char ch)
> +int line_put_char(struct tty_struct *tty, unsigned char ch)
>  {
> -	line_write(tty, &ch, sizeof(ch));
> +	return line_write(tty, &ch, sizeof(ch));
>  }
>
>  int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
> diff --git a/arch/um/include/line.h b/arch/um/include/line.h
> index 1223f2c..979b73e 100644
> --- a/arch/um/include/line.h
> +++ b/arch/um/include/line.h
> @@ -71,7 +71,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines,
>  		      char *init, char **error_out);
>  extern int line_write(struct tty_struct *tty, const unsigned char *buf,
>  		      int len);
> -extern void line_put_char(struct tty_struct *tty, unsigned char ch);
> +extern int line_put_char(struct tty_struct *tty, unsigned char ch);
>  extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
>  extern int line_chars_in_buffer(struct tty_struct *tty);
>  extern void line_flush_buffer(struct tty_struct *tty);

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch] UML: Fix inconsistence due to tty_operation change
@ 2008-05-02  9:31   ` Adrian Bunk
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2008-05-02  9:31 UTC (permalink / raw)
  To: WANG Cong; +Cc: linux-kernel, jdike, user-mode-linux-devel, akpm, Alan Cox

[ Alan as tty maintainer added to Cc ]

On Fri, May 02, 2008 at 02:59:46PM +0800, WANG Cong wrote:
>
> 'put_char' of 'struct tty_operations' has changed from 'void' into 'int'.
> This can also shut up comipler warnings.

Not only, this could also be a runtime error.

> Cc: Jeff Dike <jdike@addtoit.com>
> Signed-off-by: WANG Cong <wangcong@zeuux.org>
>
> ---
>
> diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
> index 10b86e1..5047490 100644
> --- a/arch/um/drivers/line.c
> +++ b/arch/um/drivers/line.c
> @@ -191,9 +191,9 @@ void line_flush_chars(struct tty_struct *tty)
>  	line_flush_buffer(tty);
>  }
>
> -void line_put_char(struct tty_struct *tty, unsigned char ch)
> +int line_put_char(struct tty_struct *tty, unsigned char ch)
>  {
> -	line_write(tty, &ch, sizeof(ch));
> +	return line_write(tty, &ch, sizeof(ch));
>  }
>
>  int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
> diff --git a/arch/um/include/line.h b/arch/um/include/line.h
> index 1223f2c..979b73e 100644
> --- a/arch/um/include/line.h
> +++ b/arch/um/include/line.h
> @@ -71,7 +71,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines,
>  		      char *init, char **error_out);
>  extern int line_write(struct tty_struct *tty, const unsigned char *buf,
>  		      int len);
> -extern void line_put_char(struct tty_struct *tty, unsigned char ch);
> +extern int line_put_char(struct tty_struct *tty, unsigned char ch);
>  extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
>  extern int line_chars_in_buffer(struct tty_struct *tty);
>  extern void line_flush_buffer(struct tty_struct *tty);

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] [Patch] UML: Fix inconsistence due to tty_operation change
  2008-05-02  6:59 ` WANG Cong
@ 2008-05-02 10:12   ` Alan Cox
  -1 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2008-05-02 10:12 UTC (permalink / raw)
  To: WANG Cong; +Cc: akpm, jdike, linux-kernel, user-mode-linux-devel

On Fri, 2 May 2008 14:59:46 +0800 (CST)
WANG Cong <xiyou.wangcong@gmail.com> wrote:

> 
> 'put_char' of 'struct tty_operations' has changed from 'void' into 'int'.
> This can also shut up comipler warnings.
> 
> Cc: Jeff Dike <jdike@addtoit.com>
> Signed-off-by: WANG Cong <wangcong@zeuux.org>

Acked-by: Alan Cox <alan@redhat.com>


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch] UML: Fix inconsistence due to tty_operation change
@ 2008-05-02 10:12   ` Alan Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2008-05-02 10:12 UTC (permalink / raw)
  To: WANG Cong; +Cc: linux-kernel, jdike, user-mode-linux-devel, akpm

On Fri, 2 May 2008 14:59:46 +0800 (CST)
WANG Cong <xiyou.wangcong@gmail.com> wrote:

> 
> 'put_char' of 'struct tty_operations' has changed from 'void' into 'int'.
> This can also shut up comipler warnings.
> 
> Cc: Jeff Dike <jdike@addtoit.com>
> Signed-off-by: WANG Cong <wangcong@zeuux.org>

Acked-by: Alan Cox <alan@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-05-02 10:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02  6:59 [SPAM] [uml-devel] [Patch] UML: Fix inconsistence due to tty_operation change WANG Cong
2008-05-02  6:59 ` WANG Cong
2008-05-02  9:31 ` [uml-devel] " Adrian Bunk
2008-05-02  9:31   ` Adrian Bunk
2008-05-02 10:12 ` [uml-devel] " Alan Cox
2008-05-02 10:12   ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.