From: "Emilio G. Cota" <cota@braap.org>
To: Manohar Vanga <manohar.vanga@cern.ch>
Cc: gregkh@suse.de, martyn.welch@ge.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] staging: vme: add struct vme_dev for VME devices
Date: Mon, 26 Sep 2011 18:51:59 -0400 [thread overview]
Message-ID: <20110926225159.GA13175@flamenco.cs.columbia.edu> (raw)
In-Reply-To: <1317029238-13357-2-git-send-email-manohar.vanga@cern.ch>
On Mon, Sep 26, 2011 at 11:27:15 +0200, Manohar Vanga wrote:
(snip)
> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
> index 810fe1f..76e08f3 100644
> --- a/drivers/staging/vme/vme.c
> +++ b/drivers/staging/vme/vme.c
(snip)
> @@ -1358,26 +1355,29 @@ int vme_register_bridge(struct vme_bridge *bridge)
> * specification.
> */
> for (i = 0; i < VME_SLOTS_MAX; i++) {
> - bridge->dev[i] = kzalloc(sizeof(struct device), GFP_KERNEL);
> + bridge->dev[i] = kzalloc(sizeof(struct vme_dev), GFP_KERNEL);
> if (!bridge->dev[i]) {
> retval = -ENOMEM;
> goto err_devalloc;
> }
> - dev = bridge->dev[i];
> - memset(dev, 0, sizeof(struct device));
> -
> - dev->parent = bridge->parent;
> - dev->bus = &vme_bus_type;
> - dev->release = vme_dev_release;
> + vdev = bridge->dev[i];
> + memset(vdev, 0, sizeof(struct vme_dev));
minor nit, in fact removed in patch 2: memset here is redundant
(see kzalloc above).
The rest looks good.
Emilio
next prev parent reply other threads:[~2011-09-26 22:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 9:27 [PATCH 0/4] [RESEND v6] VME Framework Fixes Manohar Vanga
2011-09-26 9:27 ` [PATCH 1/4] staging: vme: add struct vme_dev for VME devices Manohar Vanga
2011-09-26 22:51 ` Emilio G. Cota [this message]
2011-09-26 9:27 ` [PATCH 2/4] staging: vme: make match() driver specific to improve non-VME64x support Manohar Vanga
2011-09-26 23:29 ` Emilio G. Cota
2011-09-27 8:08 ` Manohar Vanga
2011-09-27 16:10 ` Emilio G. Cota
2011-09-26 9:27 ` [PATCH 3/4] staging: vme: get rid of struct vme_device_id and slots Manohar Vanga
2011-09-26 9:27 ` [PATCH 4/4] staging: vme_user: rename USER_BUS_MAX to VME_USER_BUS_MAX Manohar Vanga
2011-09-27 0:51 ` [PATCH 0/4] [RESEND v6] VME Framework Fixes Greg KH
2011-10-03 14:59 ` Manohar Vanga
2011-10-11 0:03 ` Greg KH
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=20110926225159.GA13175@flamenco.cs.columbia.edu \
--to=cota@braap.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=manohar.vanga@cern.ch \
--cc=martyn.welch@ge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®