From: Jan Kiszka <jan.kiszka@web.de>
To: Tiger Yang <tiger.yang@oracle.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH 1/1] uml: replace kmalloc() in line.c
Date: Sun, 18 Apr 2010 18:34:56 +0200 [thread overview]
Message-ID: <4BCB34B0.4040209@web.de> (raw)
In-Reply-To: <1271406939-26394-1-git-send-email-tiger.yang@oracle.com>
[-- Attachment #1.1: Type: text/plain, Size: 2059 bytes --]
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.yang@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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
------------------------------------------------------------------------------
Download Intel® 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
[-- Attachment #3: Type: text/plain, Size: 194 bytes --]
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
prev parent reply other threads:[~2010-04-18 16:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 8:35 [uml-devel] [PATCH 1/1] uml: replace kmalloc() in line.c Tiger Yang
2010-04-18 16:34 ` Jan Kiszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BCB34B0.4040209@web.de \
--to=jan.kiszka@web.de \
--cc=tiger.yang@oracle.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.