All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Anton Salnikov <asalnikov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org, bzolnier@gmail.com
Subject: Re: [PATCH] Palmchip BK3710 IDE driver
Date: Tue, 29 Jan 2008 21:36:38 +0300	[thread overview]
Message-ID: <479F7236.40404@ru.mvista.com> (raw)
In-Reply-To: <200801251512.09836.asalnikov@ru.mvista.com>

Hello.

Anton Salnikov wrote:

> This is Palmchip BK3710 IDE controller support for kernel version 2.6.24.
> The IDE controller logic supports PIO, multiword DMA and ultra-DMA modes.
> Supports interface to compact Flash (CF) configured in True-IDE mode.

> Signed-off-by: Anton Salnikov <asalnikov@ru.mvista.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> Index: 2.6.24.ide/drivers/ide/arm/palm_bk3710.c
> ===================================================================
> --- /dev/null
> +++ 2.6.24.ide/drivers/ide/arm/palm_bk3710.c

> +static void palm_bk3710_setudmamode(u32 base, unsigned int dev,
> +				    unsigned int mode)
> +{
> +	u8 tenv, trp, t0;
> +	u32 val32;
> +	u16 val16;
> +
> +	/* DMA Data Setup */
> +	t0 = (palm_bk3710_udmatimings[mode].cycletime + ide_palm_clk - 1)
> +			/ ide_palm_clk - 1;
> +	tenv = (20 + ide_palm_clk - 1) / ide_palm_clk - 1;
> +	trp = (palm_bk3710_udmatimings[mode].rptime + ide_palm_clk - 1)
> +			/ ide_palm_clk - 1;
> +
> +	/* udmatim Register */
> +	val16 = hwif_read16(base, BK3710_UDMATIM) & (dev ? 0xFF0F : 0xFFF0);
> +	val16 |= (mode << (dev ? 4 : 0));

    Needless parens all over the code like this...
    Also, you could have made it either 2 (getting rid of |= operator) or 4 
lines (read/write, &=, and |=).

MBR, Sergei

  reply	other threads:[~2008-01-29 18:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 12:12 [PATCH] Palmchip BK3710 IDE driver Anton Salnikov
2008-01-29 18:36 ` Sergei Shtylyov [this message]
2008-01-29 18:38   ` Alan Cox
2008-02-02  0:29 ` Bartlomiej Zolnierkiewicz
  -- strict thread matches above, loose matches on Subject: below --
2008-02-05 16:04 Anton Salnikov
2008-02-06  1:35 ` Bartlomiej Zolnierkiewicz
2008-05-15 18:32 ` Sergei Shtylyov
2008-01-24 15:01 Anton Salnikov
2008-01-24 19:18 ` Sergei Shtylyov
2008-01-21 18:44 Anton Salnikov
2008-01-21 19:51 ` Alan Cox
2008-01-22 12:11   ` Anton Salnikov
2008-01-22 14:37     ` Alan Cox
2008-01-22 19:31     ` Jeff Garzik
2008-01-22 20:30 ` Sergei Shtylyov
2008-01-22 22:22   ` Alan Cox
2008-01-23 13:38     ` Sergei Shtylyov
2008-01-23 14:59       ` Alan Cox
2008-01-23 14:32 ` Sergei Shtylyov
2008-01-17 18:50 Anton Salnikov
2008-01-17 18:57 ` Sergei Shtylyov
2008-01-17 23:23 ` Alan Cox
2008-01-18 14:14   ` Sergei Shtylyov
2008-01-18 15:04     ` Alan Cox
2008-01-18 18:03       ` Sergei Shtylyov
2008-01-18 22:20         ` Bartlomiej Zolnierkiewicz
2008-01-18 22:19 ` Bartlomiej Zolnierkiewicz

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=479F7236.40404@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=asalnikov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.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 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.