From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, patches@linaro.org
Subject: [Qemu-devel] [PATCH v2 04/18] hw/onenand: Minor spacing fixes
Date: Sun, 28 Aug 2011 17:56:54 +0100 [thread overview]
Message-ID: <1314550628-26869-6-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1314550628-26869-1-git-send-email-peter.maydell@linaro.org>
From: Juha Riihimäki <juha.riihimaki@nokia.com>
Minor whitespace-only cleanup (separated out from the qdevifying
patch for clarity).
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/onenand.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/onenand.c b/hw/onenand.c
index 720c4cf..6f68f70 100644
--- a/hw/onenand.c
+++ b/hw/onenand.c
@@ -245,8 +245,8 @@ static inline int onenand_prog_main(OneNANDState *s, int sec, int secn,
int result = 0;
if (secn > 0) {
- uint32_t size = (uint32_t) secn * 512;
- const uint8_t *sp = (const uint8_t *) src;
+ uint32_t size = (uint32_t)secn * 512;
+ const uint8_t *sp = (const uint8_t *)src;
uint8_t *dp = 0;
if (s->bdrv_cur) {
dp = g_malloc(size);
@@ -257,7 +257,7 @@ static inline int onenand_prog_main(OneNANDState *s, int sec, int secn,
if (sec + secn > s->secs_cur) {
result = 1;
} else {
- dp = (uint8_t *) s->current + (sec << 9);
+ dp = (uint8_t *)s->current + (sec << 9);
}
}
if (!result) {
@@ -299,13 +299,13 @@ static inline int onenand_prog_spare(OneNANDState *s, int sec, int secn,
{
int result = 0;
if (secn > 0) {
- const uint8_t *sp = (const uint8_t *) src;
+ const uint8_t *sp = (const uint8_t *)src;
uint8_t *dp = 0, *dpp = 0;
if (s->bdrv_cur) {
dp = g_malloc(512);
if (!dp || bdrv_read(s->bdrv_cur,
- s->secs_cur + (sec >> 5),
- dp, 1) < 0) {
+ s->secs_cur + (sec >> 5),
+ dp, 1) < 0) {
result = 1;
} else {
dpp = dp + ((sec & 31) << 4);
@@ -324,7 +324,7 @@ static inline int onenand_prog_spare(OneNANDState *s, int sec, int secn,
}
if (s->bdrv_cur) {
result = bdrv_write(s->bdrv_cur, s->secs_cur + (sec >> 5),
- dp, 1) < 0;
+ dp, 1) < 0;
}
}
if (dp) {
--
1.7.1
next prev parent reply other threads:[~2011-08-28 16:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-28 16:56 [Qemu-devel] [PATCH v2 00/18] onenand, omap_gpmc fixes, features Peter Maydell
2011-08-28 16:56 ` Peter Maydell
2011-08-28 16:56 ` [Qemu-devel] [PATCH v2 01/18] hw/sysbus: Add sysbus_mmio_get_region() Peter Maydell
2011-08-28 16:56 ` [Qemu-devel] [PATCH v2 02/18] hw/onenand: Remove unnecessary argument from onenand_command() Peter Maydell
2011-08-28 16:56 ` [Qemu-devel] [PATCH v2 03/18] hw/onenand: Qdevify Peter Maydell
2011-08-28 16:56 ` Peter Maydell [this message]
2011-08-28 16:56 ` [Qemu-devel] [PATCH v2 05/18] omap_gpmc: Clean up omap_gpmc_attach MemoryRegion conversion Peter Maydell
2011-08-28 16:56 ` [Qemu-devel] [PATCH v2 06/18] omap_gpmc: Refactor omap_gpmc_cs_map and omap_gpmc_cs_unmap Peter Maydell
2011-08-28 16:56 ` [Qemu-devel] [PATCH v2 07/18] omap_gpmc: GPMC_IRQSTATUS is write-one-to-clear Peter Maydell
2011-09-17 1:08 ` andrzej zaborowski
2011-09-17 15:47 ` Peter Maydell
2011-08-28 16:56 ` [Qemu-devel] [PATCH v2 08/18] omap_gpmc: Wire up the GPMC IRQ correctly Peter Maydell
2011-08-28 16:56 ` [Qemu-devel] [PATCH v2 09/18] omap_gpmc: Fix handling of FIFOTHRESHOLDSTATUS bit Peter Maydell
2011-09-17 1:22 ` andrzej zaborowski
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 10/18] omap_gpmc: Take omap_mpu_state* in omap_gpmc_init Peter Maydell
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 11/18] omap_gpmc: Calculate revision from OMAP model Peter Maydell
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 12/18] omap_gpmc: Reindent misindented switch statements Peter Maydell
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 13/18] omap_gpmc: Support NAND devices Peter Maydell
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 14/18] hw/omap.h: Add OMAP 3630 to omap_mpu_model enumeration Peter Maydell
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 15/18] omap_gpmc: Accept a zero mask field on omap3630 Peter Maydell
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 16/18] omap_gpmc: Pull prefetch engine data into sub-struct Peter Maydell
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 17/18] omap: Wire up the DMA request line to the GPMC Peter Maydell
2011-08-28 16:57 ` [Qemu-devel] [PATCH v2 18/18] omap_gpmc: Implement prefetch engine Peter Maydell
2011-08-30 6:27 ` [Qemu-devel] [PATCH v2 00/18] onenand, omap_gpmc fixes, features Edgar E. Iglesias
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=1314550628-26869-6-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=edgar.iglesias@gmail.com \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.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).