linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: jgarzik@pobox.com, albertcc@tw.ibm.com, bzolnier@gmail.com,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH 2/3] libata: make ata_device and ata_port use unsigned int xfer_mask
Date: Fri, 17 Feb 2006 00:01:32 +0900	[thread overview]
Message-ID: <43F493CC.1000703@gmail.com> (raw)
In-Reply-To: <1140100329.28094.17.camel@localhost.localdomain>

Alan Cox wrote:
> On Iau, 2006-02-16 at 23:09 +0900, Tejun Heo wrote:
> 
>>This change removes simplifies code in libata-core and makes
>>integration of later EH speed-down and per-device trasnfer mode
>>configuration easier.  This patch does not change any behavior.
> 
> 
> It also makes all the drive code extremely ugly and non-obvious.
> 
> We replace clear code like
> 
> 	speed = dev->pio_mode;
> 
> with
> 
>        speed = ata_xfer_mask2mode(adev->xfer_mask, ATA_SHIFT_PIO);
> 
> I don't think that is exactly an improvement. The replacement of clear
> easy to read values in the tables with macros that are convoluted and so
> long winded you've even used defines everywhere to avoid repeatign them
> is not an improvement either

I think it's better to use such XFER_MASK macros than repeating numeric
values if it's used multiple times with or without this change.

> I'm definitely opposed to this gross uglification of the libata API.
> Keep libata clean for driver writers because we have a lot of drivers
> which will be written by non-experts and a single core which is
> maintained entirely by smart people.

Yeap, point taken.  It does make code uglier for lower level drivers
although it helps cleaning up libata core layer.  I'll try to clean up
core layer without changing low level driver API.

Thanks for the comment.

-- 
tejun

  reply	other threads:[~2006-02-16 15:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-15 12:53 regarding xfer mode representation in dev, ap and other places Tejun Heo
2006-02-16 14:09 ` [PATCH 1/3] libata: fix sata_sil24 mwdma_mask setting Tejun Heo
2006-02-16 14:09 ` [PATCHSET] libata: use single unsigned int xfer_mask Tejun Heo
2006-02-16 14:27   ` Tejun Heo
2006-02-16 14:46     ` Alan Cox
2006-02-16 14:09 ` [PATCH 2/3] libata: make ata_device and ata_port use " Tejun Heo
2006-02-16 14:32   ` Alan Cox
2006-02-16 15:01     ` Tejun Heo [this message]
2006-02-16 14:09 ` [PATCH 3/3] libata: make ata_port_info and ata_probe_ent use xfer_mask Tejun Heo

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=43F493CC.1000703@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertcc@tw.ibm.com \
    --cc=bzolnier@gmail.com \
    --cc=jgarzik@pobox.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 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).