Tiger Yang wrote:
> This patch replace kmalloc() with uml_kmalloc() in line.c and
> remove an unused variable.

This driver does not require the wrapping. I'll post a patch to unbreak
uml build in a minute.

Jan

> 
> Signed-off-by: Tiger Yang <tiger.y...@oracle.com>
> ---
>  arch/um/drivers/line.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
> index 64cda95..616a1f3 100644
> --- a/arch/um/drivers/line.c
> +++ b/arch/um/drivers/line.c
> @@ -11,6 +11,7 @@
>  #include "irq_user.h"
>  #include "kern_util.h"
>  #include "os.h"
> +#include "um_malloc.h"
>  
>  #define LINE_BUFSIZE 4096
>  
> @@ -18,7 +19,6 @@ static irqreturn_t line_interrupt(int irq, void *data)
>  {
>       struct chan *chan = data;
>       struct line *line = chan->line;
> -     struct tty_struct *tty;
>  
>       if (line)
>               chan_interrupt(&line->chan_list, &line->task, line->tty, irq);
> @@ -95,7 +95,7 @@ static int buffer_data(struct line *line, const char *buf, 
> int len)
>       int end, room;
>  
>       if (line->buffer == NULL) {
> -             line->buffer = kmalloc(LINE_BUFSIZE, GFP_ATOMIC);
> +             line->buffer = uml_kmalloc(LINE_BUFSIZE, UM_GFP_ATOMIC);
>               if (line->buffer == NULL) {
>                       printk(KERN_ERR "buffer_data - atomic allocation "
>                              "failed\n");
> @@ -782,7 +782,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, 
> struct tty_struct *tty,
>  {
>       struct winch *winch;
>  
> -     winch = kmalloc(sizeof(*winch), GFP_KERNEL);
> +     winch = uml_kmalloc(sizeof(*winch), UM_GFP_KERNEL);
>       if (winch == NULL) {
>               printk(KERN_ERR "register_winch_irq - kmalloc failed\n");
>               goto cleanup;
> @@ -861,7 +861,7 @@ char *add_xterm_umid(char *base)
>               return base;
>  
>       len = strlen(base) + strlen(" ()") + strlen(umid) + 1;
> -     title = kmalloc(len, GFP_KERNEL);
> +     title = uml_kmalloc(len, UM_GFP_KERNEL);
>       if (title == NULL) {
>               printk(KERN_ERR "Failed to allocate buffer for xterm title\n");
>               return base;


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to