From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Jonathan McDowell <noodles@earth.li>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add Amstrad Delta NAND support.
Date: Thu, 18 May 2006 18:57:28 +0200 [thread overview]
Message-ID: <20060518165728.GA26113@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <20060518160940.GS7570@earth.li>
On Thu, 18 May 2006 17:09:41 +0100, Jonathan McDowell wrote:
>
> +static struct mtd_info *ams_delta_mtd = NULL;
> + switch(cmd){
^ ^
Add spaces
> + omap_writew(0, (OMAP_MPUIO_BASE + OMAP_MPUIO_IO_CNTL));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Could that be done in a macro?
> + udelay(0.04);
Floating point in the kernel?
> + ams_delta_mtd = kmalloc (sizeof(struct mtd_info) +
^
> + sizeof (struct nand_chip), GFP_KERNEL);
Remove space
And please create a structure containing both struct mtd_info and
struct nand_chip. Then use sizeof(that structure)...
> + /* Get pointer to private data */
> + this = (struct nand_chip *) (&ams_delta_mtd[1]);
...and remove this cast.
> + /* Initialize structures */
> + memset((char *) ams_delta_mtd, 0, sizeof(struct mtd_info));
> + memset((char *) this, 0, sizeof(struct nand_chip));
And those as well, while you're at it.
> + if (nand_scan (ams_delta_mtd, 1)) {
^
> + kfree (ams_delta_mtd);
^
> +static void __exit ams_delta_cleanup (void)
^
> + nand_release (ams_delta_mtd);
^
> + kfree (ams_delta_mtd);
^
Jörn
--
Happiness isn't having what you want, it's wanting what you have.
-- unknown
next prev parent reply other threads:[~2006-05-18 16:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-18 16:09 Jonathan McDowell
2006-05-18 16:57 ` Jörn Engel [this message]
2006-05-19 9:01 ` Jonathan McDowell
2006-05-19 9:32 ` David Vrabel
2006-05-19 10:01 ` Jonathan McDowell
2006-05-19 10:03 ` Jörn Engel
2006-05-19 10:26 ` David Woodhouse
2006-05-20 0:10 ` Segher Boessenkool
2006-05-19 22:20 ` Jonathan McDowell
2006-05-20 14:10 ` Jonathan McDowell
2006-05-21 17:12 ` David Woodhouse
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=20060518165728.GA26113@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=noodles@earth.li \
/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®