All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: Jaya Kumar <jayalk@intworks.biz>,
	Paul Mundt <lethal@linux-sh.org>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Jiri Kosina <trivial@kernel.org>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	xen-devel@lists.xensource.com,
	virtualization@lists.linux-foundation.org
Subject: [TRIVIAL PATCH V2 next 12/15] video: Convert vmalloc/memset to
Date: Sat, 28 May 2011 18:13:33 +0000	[thread overview]
Message-ID: <1306606413.20336.9.camel@Joe-Laptop> (raw)
In-Reply-To: <201105281948.12941.heiko@sntech.de>

Signed-off-by: Joe Perches <joe@perches.com>
---
Heiko Stübner <heiko@sntech.de> pointed out I can't type...
s/vmalloc/vmalloc/ doesn't do much.

 drivers/video/arcfb.c        |    5 ++---
 drivers/video/broadsheetfb.c |    4 +---
 drivers/video/hecubafb.c     |    5 ++---
 drivers/video/metronomefb.c  |    4 +---
 drivers/video/xen-fbfront.c  |    3 +--
 5 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index 3ec4923..86573e2 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -515,11 +515,10 @@ static int __devinit arcfb_probe(struct platform_device *dev)
 
 	/* We need a flat backing store for the Arc's
 	   less-flat actual paged framebuffer */
-	if (!(videomemory = vmalloc(videomemorysize)))
+	videomemory = vzalloc(videomemorysize);
+	if (!videomemory)
 		return retval;
 
-	memset(videomemory, 0, videomemorysize);
-
 	info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
 	if (!info)
 		goto err;
diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c
index ebda687..377dde3 100644
--- a/drivers/video/broadsheetfb.c
+++ b/drivers/video/broadsheetfb.c
@@ -1101,12 +1101,10 @@ static int __devinit broadsheetfb_probe(struct platform_device *dev)
 
 	videomemorysize = roundup((dpyw*dpyh), PAGE_SIZE);
 
-	videomemory = vmalloc(videomemorysize);
+	videomemory = vzalloc(videomemorysize);
 	if (!videomemory)
 		goto err_fb_rel;
 
-	memset(videomemory, 0, videomemorysize);
-
 	info->screen_base = (char *)videomemory;
 	info->fbops = &broadsheetfb_ops;
 
diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c
index 1b94643..fbef15f 100644
--- a/drivers/video/hecubafb.c
+++ b/drivers/video/hecubafb.c
@@ -231,11 +231,10 @@ static int __devinit hecubafb_probe(struct platform_device *dev)
 
 	videomemorysize = (DPY_W*DPY_H)/8;
 
-	if (!(videomemory = vmalloc(videomemorysize)))
+	videomemory = vzalloc(videomemorysize);
+	if (!videomemory)
 		return retval;
 
-	memset(videomemory, 0, videomemorysize);
-
 	info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev);
 	if (!info)
 		goto err_fballoc;
diff --git a/drivers/video/metronomefb.c b/drivers/video/metronomefb.c
index ed64edf..97d45e5 100644
--- a/drivers/video/metronomefb.c
+++ b/drivers/video/metronomefb.c
@@ -628,12 +628,10 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
 	/* we need to add a spare page because our csum caching scheme walks
 	 * to the end of the page */
 	videomemorysize = PAGE_SIZE + (fw * fh);
-	videomemory = vmalloc(videomemorysize);
+	videomemory = vzalloc(videomemorysize);
 	if (!videomemory)
 		goto err_fb_rel;
 
-	memset(videomemory, 0, videomemorysize);
-
 	info->screen_base = (char __force __iomem *)videomemory;
 	info->fbops = &metronomefb_ops;
 
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c
index a20218c..beac52f 100644
--- a/drivers/video/xen-fbfront.c
+++ b/drivers/video/xen-fbfront.c
@@ -395,10 +395,9 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
 	spin_lock_init(&info->dirty_lock);
 	spin_lock_init(&info->resize_lock);
 
-	info->fb = vmalloc(fb_size);
+	info->fb = vzalloc(fb_size);
 	if (info->fb = NULL)
 		goto error_nomem;
-	memset(info->fb, 0, fb_size);
 
 	info->nr_pages = (fb_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
 
-- 



WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: Jaya Kumar <jayalk@intworks.biz>,
	Paul Mundt <lethal@linux-sh.org>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Jiri Kosina <trivial@kernel.org>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	xen-devel@lists.xensource.com,
	virtualization@lists.linux-foundation.org
Subject: [TRIVIAL PATCH V2 next 12/15] video: Convert vmalloc/memset to vzalloc
Date: Sat, 28 May 2011 11:13:33 -0700	[thread overview]
Message-ID: <1306606413.20336.9.camel@Joe-Laptop> (raw)
In-Reply-To: <201105281948.12941.heiko@sntech.de>

Signed-off-by: Joe Perches <joe@perches.com>
---
Heiko Stübner <heiko@sntech.de> pointed out I can't type...
s/vmalloc/vmalloc/ doesn't do much.

 drivers/video/arcfb.c        |    5 ++---
 drivers/video/broadsheetfb.c |    4 +---
 drivers/video/hecubafb.c     |    5 ++---
 drivers/video/metronomefb.c  |    4 +---
 drivers/video/xen-fbfront.c  |    3 +--
 5 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index 3ec4923..86573e2 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -515,11 +515,10 @@ static int __devinit arcfb_probe(struct platform_device *dev)
 
 	/* We need a flat backing store for the Arc's
 	   less-flat actual paged framebuffer */
-	if (!(videomemory = vmalloc(videomemorysize)))
+	videomemory = vzalloc(videomemorysize);
+	if (!videomemory)
 		return retval;
 
-	memset(videomemory, 0, videomemorysize);
-
 	info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
 	if (!info)
 		goto err;
diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c
index ebda687..377dde3 100644
--- a/drivers/video/broadsheetfb.c
+++ b/drivers/video/broadsheetfb.c
@@ -1101,12 +1101,10 @@ static int __devinit broadsheetfb_probe(struct platform_device *dev)
 
 	videomemorysize = roundup((dpyw*dpyh), PAGE_SIZE);
 
-	videomemory = vmalloc(videomemorysize);
+	videomemory = vzalloc(videomemorysize);
 	if (!videomemory)
 		goto err_fb_rel;
 
-	memset(videomemory, 0, videomemorysize);
-
 	info->screen_base = (char *)videomemory;
 	info->fbops = &broadsheetfb_ops;
 
diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c
index 1b94643..fbef15f 100644
--- a/drivers/video/hecubafb.c
+++ b/drivers/video/hecubafb.c
@@ -231,11 +231,10 @@ static int __devinit hecubafb_probe(struct platform_device *dev)
 
 	videomemorysize = (DPY_W*DPY_H)/8;
 
-	if (!(videomemory = vmalloc(videomemorysize)))
+	videomemory = vzalloc(videomemorysize);
+	if (!videomemory)
 		return retval;
 
-	memset(videomemory, 0, videomemorysize);
-
 	info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev);
 	if (!info)
 		goto err_fballoc;
diff --git a/drivers/video/metronomefb.c b/drivers/video/metronomefb.c
index ed64edf..97d45e5 100644
--- a/drivers/video/metronomefb.c
+++ b/drivers/video/metronomefb.c
@@ -628,12 +628,10 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
 	/* we need to add a spare page because our csum caching scheme walks
 	 * to the end of the page */
 	videomemorysize = PAGE_SIZE + (fw * fh);
-	videomemory = vmalloc(videomemorysize);
+	videomemory = vzalloc(videomemorysize);
 	if (!videomemory)
 		goto err_fb_rel;
 
-	memset(videomemory, 0, videomemorysize);
-
 	info->screen_base = (char __force __iomem *)videomemory;
 	info->fbops = &metronomefb_ops;
 
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c
index a20218c..beac52f 100644
--- a/drivers/video/xen-fbfront.c
+++ b/drivers/video/xen-fbfront.c
@@ -395,10 +395,9 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
 	spin_lock_init(&info->dirty_lock);
 	spin_lock_init(&info->resize_lock);
 
-	info->fb = vmalloc(fb_size);
+	info->fb = vzalloc(fb_size);
 	if (info->fb == NULL)
 		goto error_nomem;
-	memset(info->fb, 0, fb_size);
 
 	info->nr_pages = (fb_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
 
-- 



  reply	other threads:[~2011-05-28 18:13 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28 17:36 [TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc Joe Perches
2011-05-28 17:36 ` Joe Perches
2011-05-28 17:36 ` Joe Perches
2011-05-28 17:36 ` Joe Perches
2011-05-28 17:36 ` Joe Perches
2011-05-28 17:36 ` Joe Perches
2011-05-28 17:36 ` Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 01/15] s390: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 02/15] x86: " Joe Perches
2011-05-29 19:25   ` [tip:x86/cleanups] x86: Convert vmalloc()+memset() to vzalloc() tip-bot for Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 03/15] atm: Convert vmalloc/memset to vzalloc Joe Perches
2011-05-28 17:36 ` [Drbd-dev] [TRIVIAL PATCH next 04/15] drbd: " Joe Perches
2011-05-28 17:36   ` Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 05/15] char: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 06/15] isdn: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 07/15] md: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 08/15] media: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 09/15] mtd: " Joe Perches
2011-06-01  8:20   ` Artem Bityutskiy
2011-06-01  8:20     ` Artem Bityutskiy
2011-05-28 17:36 ` [TRIVIAL PATCH next 10/15] scsi: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 11/15] staging: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 12/15] video: " Joe Perches
2011-05-28 17:36   ` Joe Perches
2011-05-28 17:48   ` Heiko Stübner
2011-05-28 17:48   ` Heiko Stübner
2011-05-28 17:48     ` Heiko Stübner
2011-05-28 18:13     ` Joe Perches [this message]
2011-05-28 18:13       ` [TRIVIAL PATCH V2 " Joe Perches
2011-05-31 14:28       ` [TRIVIAL PATCH V2 next 12/15] video: Convert vmalloc/memset to Konrad Rzeszutek Wilk
2011-05-31 14:28         ` [TRIVIAL PATCH V2 next 12/15] video: Convert vmalloc/memset to vzalloc Konrad Rzeszutek Wilk
2011-05-31 14:28         ` Konrad Rzeszutek Wilk
2011-06-02  8:26       ` Paul Mundt
2011-06-02  8:26       ` Paul Mundt
2011-06-02  8:26         ` Paul Mundt
2011-05-28 18:13     ` Joe Perches
2011-05-30 11:40   ` [TRIVIAL PATCH " Mel Gorman
2011-05-30 11:40   ` [TRIVIAL PATCH next 12/15] video: Convert vmalloc/memset to Mel Gorman
2011-05-30 11:40     ` [TRIVIAL PATCH next 12/15] video: Convert vmalloc/memset to vzalloc Mel Gorman
2011-05-28 17:36 ` [TRIVIAL PATCH next 13/15] fs: " Joe Perches
2011-05-28 17:36   ` Joe Perches
2011-05-28 17:36   ` Joe Perches
2011-05-31 18:20   ` Alex Elder
2011-05-31 18:20     ` Alex Elder
2011-05-31 18:20     ` Alex Elder
     [not found] ` <cover.1306603968.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2011-05-28 17:36   ` [TRIVIAL PATCH next 14/15] mm: " Joe Perches
2011-05-28 17:36 ` Joe Perches
2011-05-28 17:36   ` Joe Perches
     [not found]   ` <f3d616b526e00bd8f01a250b7ce8c5a6e2412768.1306603968.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2011-05-31 19:47     ` Paul Menage
2011-05-31 19:47   ` Paul Menage
2011-05-31 19:47     ` Paul Menage
2011-05-28 17:36 ` [TRIVIAL PATCH next 15/15] net: " Joe Perches
2011-06-02 14:49   ` Pablo Neira Ayuso
2011-06-02 21:39     ` David Miller
2011-06-03  1:35       ` Joe Perches
2011-06-03  9:39       ` Pablo Neira Ayuso

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=1306606413.20336.9.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=heiko@sntech.de \
    --cc=jayalk@intworks.biz \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xen-devel@lists.xensource.com \
    /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.