All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Sagar Borikar <sagar.borikar@gmail.com>
Cc: Tejun Heo <tj@kernel.org>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] Removing PCI dependency of ahci and making it amba bus compatible
Date: Sun, 29 Mar 2009 18:46:57 -0400	[thread overview]
Message-ID: <49CFFA61.8000107@pobox.com> (raw)
In-Reply-To: <3fb94e50903260700r36365d4ue27edf43b5ee9efd@mail.gmail.com>

Comments:

* I am concerned at the unmodified duplication of so much code.  Given 
that so little core AHCI modification was done, I would be interested in 
exploring alternatives to wholesale code duplication.

* Avoid global variables.  Use a private struct and hpriv rather than 
creating globals such as 'amba_base'

* calls to ioremap() must handle NULL return values.  You can 
ahci_save_initial_config() from a simple table lookup to an actual map

* Don't add magic numbers like '0' to replace AHCI_PCI_BAR.  Create your 
own symbol AMBA_IOMAP_IDX or somesuch, with value zero.

* ahci_configure_dma_masks() is wrong.  You must call generic DMA 
mapping API or amba bus DMA mapping API (if exists), since you cannot 
call PCI DMA mapping API.

* amba_request_regions() should pass the driver name ("ahci"), not the 
more-generic "sata"

* we put spaces between all function parameters.  You incorrect elide 
spaces such as in this example:

-	rc = ahci_reset_controller(host);
+	rc = ahci_reset_controller(host,pdev);

* there is nothing AMBA-specific about the implementation of function 
ata_amba_remove_one().  I would rather ata_amba_remove_one() be a 
one-line call to a function that works on generic struct device-based 
devices.

	Jeff





  parent reply	other threads:[~2009-03-29 22:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 14:00 [PATCH] Removing PCI dependency of ahci and making it amba bus compatible Sagar Borikar
2009-03-27  1:08 ` Tejun Heo
2009-03-27  1:10   ` Tejun Heo
2009-03-29 22:46 ` Jeff Garzik [this message]
     [not found]   ` <3fb94e50903291900x2caac3c7nc30c842015570089@mail.gmail.com>
2009-03-30  2:26     ` Jeff Garzik

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=49CFFA61.8000107@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sagar.borikar@gmail.com \
    --cc=tj@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.