From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Joe Perches <joe@perches.com>
Cc: Jiri Kosina <trivial@kernel.org>,
Jaya Kumar <jayalk@intworks.biz>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
linux-kernel@vger.kernel.org, xen-devel@lists.xen.org,
virtualization@lists.osdl.org
Subject: Re: [PATCH 36/49] drivers/video: Use vzalloc
Date: Mon, 8 Nov 2010 11:43:26 -0500 [thread overview]
Message-ID: <20101108164325.GB2638@dumpdata.com> (raw)
In-Reply-To: <a1c4c46381ac1867c4af3edb811e58a721957842.1288925425.git.joe@perches.com>
On Thu, Nov 04, 2010 at 08:08:00PM -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
Looks good on xen-fb.
> ---
> 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 = vmalloc(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 c77bcc6..a941e6f 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 63ed3b7..c0c358c 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 428d273..81fcaea 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;
>
> --
> 1.7.3.1.g432b3.dirty
next prev parent reply other threads:[~2010-11-08 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.2.00.1011031108260.11625@router.home>
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
2010-11-05 3:08 ` [PATCH 36/49] drivers/video: Use vzalloc Joe Perches
2010-11-05 5:27 ` Dave Young
2010-11-05 5:31 ` Joe Perches
2010-11-08 16:43 ` Konrad Rzeszutek Wilk [this message]
2010-11-05 5:31 ` [PATCH V2 " Joe Perches
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=20101108164325.GB2638@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=jayalk@intworks.biz \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
--cc=virtualization@lists.osdl.org \
--cc=xen-devel@lists.xen.org \
/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;
as well as URLs for NNTP newsgroup(s).