From: Tiger Yang <tiger.yang@oracle.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH 1/1] uml: replace kmalloc() in line.c
Date: Fri, 16 Apr 2010 16:35:39 +0800 [thread overview]
Message-ID: <1271406939-26394-1-git-send-email-tiger.yang@oracle.com> (raw)
In-Reply-To: <>
This patch replace kmalloc() with uml_kmalloc() in line.c and
remove an unused variable.
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;
--
1.5.4.3
------------------------------------------------------------------------------
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
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next reply other threads:[~2010-04-16 8:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 8:35 Tiger Yang [this message]
2010-04-18 16:34 ` [uml-devel] [PATCH 1/1] uml: replace kmalloc() in line.c Jan Kiszka
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=1271406939-26394-1-git-send-email-tiger.yang@oracle.com \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox