All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	Borislav Petkov <petkovbb@gmail.com>
Subject: Re: [PATCH 3/3] ide: remove IDE_*_REG macros
Date: Fri, 29 Feb 2008 23:31:07 +0300	[thread overview]
Message-ID: <47C86B8B.8000100@ru.mvista.com> (raw)
In-Reply-To: <200802091624.34064.bzolnier@gmail.com>

Bartlomiej Zolnierkiewicz wrote:

> * Add IDE_{ALTSTATUS,IREASON,BCOUNTL,BCOUNTH}_OFFSET defines.

> * Remove IDE_*_REG macros - this results in more readable
>   and slightly smaller code.

> There should be no functional changes caused by this patch.

> Cc: Borislav Petkov <petkovbb@gmail.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

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

> Index: b/drivers/ide/cris/ide-cris.c
> ===================================================================
> --- a/drivers/ide/cris/ide-cris.c
> +++ b/drivers/ide/cris/ide-cris.c
> @@ -228,7 +228,10 @@ cris_ide_fill_descriptor(cris_dma_descr_
>  static void
>  cris_ide_start_dma(ide_drive_t *drive, cris_dma_descr_type *d, int dir,int type,int len)
>  {
> -	reg_ata_rw_ctrl2 ctrl2 = REG_TYPE_CONV(reg_ata_rw_ctrl2, int, IDE_DATA_REG);
> +	ide_hwif_t *hwif = drive->hwif;
> +

    Why insert new line in the declaration block?

> +	reg_ata_rw_ctrl2 ctrl2 = REG_TYPE_CONV(reg_ata_rw_ctrl2, int,
> +					       hwif->io_ports[IDE_DATA_OFFSET]);
>  	reg_ata_rw_trf_cnt trf_cnt = {0};
>  
>  	mycontext.saved_data = (dma_descr_data*)virt_to_phys(d);
> @@ -264,8 +267,12 @@ cris_ide_wait_dma(int dir)
>  
>  static int cris_dma_test_irq(ide_drive_t *drive)
>  {
> +	ide_hwif_t *hwif = drive->hwif;
>  	int intr = REG_RD_INT(ata, regi_ata, r_intr);
> -	reg_ata_rw_ctrl2 ctrl2 = REG_TYPE_CONV(reg_ata_rw_ctrl2, int, IDE_DATA_REG);
> +

    Same here...

> +	reg_ata_rw_ctrl2 ctrl2 = REG_TYPE_CONV(reg_ata_rw_ctrl2, int,
> +					       hwif->io_ports[IDE_DATA_OFFSET]);
> +
>  	return intr & (1 << ctrl2.sel) ? 1 : 0;
>  }

[...]

> Index: b/drivers/ide/legacy/ht6560b.c
> ===================================================================
> --- a/drivers/ide/legacy/ht6560b.c
> +++ b/drivers/ide/legacy/ht6560b.c
> @@ -79,7 +79,7 @@
>   * out how they setup those cycle time interfacing values, as they at Holtek
>   * call them. IDESETUP.COM that is supplied with the drivers figures out
>   * optimal values and fetches those values to drivers. I found out that
> - * they use IDE_SELECT_REG to fetch timings to the ide board right after
> + * they use Select register to fetch timings to the ide board right after

    The register is called device/head officially. :-)

> Index: b/drivers/scsi/ide-scsi.c
> ===================================================================
> --- a/drivers/scsi/ide-scsi.c
> +++ b/drivers/scsi/ide-scsi.c
> @@ -275,9 +275,12 @@ static int idescsi_end_request(ide_drive
>  static ide_startstop_t
>  idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
>  {
> +	ide_hwif_t *hwif = drive->hwif;
> +
>  	if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
>  		/* force an abort */
> -		HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
> +		hwif->OUTB(WIN_IDLEIMMEDIATE,
> +			   hwif->io_ports[IDE_COMMAND_OFFSET]);

    Hum hm, why not WIN_DEVICE_RESET? :-O

[...]
> Index: b/include/linux/ide.h
> ===================================================================
> --- a/include/linux/ide.h
> +++ b/include/linux/ide.h
[...]
> @@ -369,7 +355,7 @@ typedef struct ide_drive_s {
>          u8	wcache;		/* status of write cache */

    Spaces again...

>  	u8	acoustic;	/* acoustic management */
>  	u8	media;		/* disk, cdrom, tape, floppy, ... */
> -	u8	ctl;		/* "normal" value for IDE_CONTROL_REG */
> +	u8	ctl;		/* "normal" value for Control register */
>  	u8	ready_stat;	/* min status value for drive ready */
>  	u8	mult_count;	/* current multiple sector setting */
>  	u8	mult_req;	/* requested multiple sector setting */

MBR, Sergei


      reply	other threads:[~2008-02-29 20:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-09 15:24 [PATCH 3/3] ide: remove IDE_*_REG macros Bartlomiej Zolnierkiewicz
2008-02-29 20:31 ` Sergei Shtylyov [this message]

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=47C86B8B.8000100@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.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 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.