linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jeff@garzik.org, alan@lxorguk.ukuu.org.uk, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 01/10] sata_inic162x: misc clean ups
Date: Wed, 30 Apr 2008 16:35:08 +0900	[thread overview]
Message-ID: <1209540918258-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <12095409172824-git-send-email-htejun@gmail.com>

* use larger indents for structure member definitions

* kill unused variable @addr in inic_scr_write()

* kill unnecessary flushes in inic_freeze/thaw()

* kill buggy explicit kfree() on devres managed port private data

This is in preparation of further inic162x updates.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/sata_inic162x.c |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index d27bb9a..1f5d17e 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -99,13 +99,13 @@ enum {
 };
 
 struct inic_host_priv {
-	u16	cached_hctl;
+	u16		cached_hctl;
 };
 
 struct inic_port_priv {
-	u8	dfl_prdctl;
-	u8	cached_prdctl;
-	u8	cached_pirq_mask;
+	u8		dfl_prdctl;
+	u8		cached_prdctl;
+	u8		cached_pirq_mask;
 };
 
 static struct scsi_host_template inic_sht = {
@@ -185,12 +185,10 @@ static int inic_scr_read(struct ata_port *ap, unsigned sc_reg, u32 *val)
 static int inic_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val)
 {
 	void __iomem *scr_addr = ap->ioaddr.scr_addr;
-	void __iomem *addr;
 
 	if (unlikely(sc_reg >= ARRAY_SIZE(scr_map)))
 		return -EINVAL;
 
-	addr = scr_addr + scr_map[sc_reg] * 4;
 	writel(val, scr_addr + scr_map[sc_reg] * 4);
 	return 0;
 }
@@ -367,8 +365,6 @@ static void inic_freeze(struct ata_port *ap)
 
 	ap->ops->sff_check_status(ap);
 	writeb(0xff, port_base + PORT_IRQ_STAT);
-
-	readb(port_base + PORT_IRQ_STAT); /* flush */
 }
 
 static void inic_thaw(struct ata_port *ap)
@@ -379,8 +375,6 @@ static void inic_thaw(struct ata_port *ap)
 	writeb(0xff, port_base + PORT_IRQ_STAT);
 
 	__inic_set_pirq_mask(ap, PIRQ_MASK_OTHER);
-
-	readb(port_base + PORT_IRQ_STAT); /* flush */
 }
 
 /*
@@ -506,10 +500,8 @@ static int inic_port_start(struct ata_port *ap)
 
 	/* Alloc resources */
 	rc = ata_port_start(ap);
-	if (rc) {
-		kfree(pp);
+	if (rc)
 		return rc;
-	}
 
 	init_port(ap);
 
-- 
1.5.2.4


  reply	other threads:[~2008-04-30  7:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  7:35 [PATCHSET] sata_inic162x: make it work Tejun Heo
2008-04-30  7:35 ` Tejun Heo [this message]
2008-05-06 14:08   ` [PATCH 01/10] sata_inic162x: misc clean ups Jeff Garzik
2008-04-30  7:35 ` [PATCH 02/10] sata_inic162x: add / update constants Tejun Heo
2008-04-30  7:35 ` [PATCH 03/10] sata_inic162x: update TF read handling Tejun Heo
2008-05-01 14:55   ` [PATCH 03/10 UPDATED] " Tejun Heo
2008-04-30  7:35 ` [PATCH 04/10] sata_inic162x: use IDMA for ATA_PROT_DMA Tejun Heo
2008-04-30  7:35 ` [PATCH 05/10] sata_inic162x: kill now unused bmdma related stuff Tejun Heo
2008-04-30  7:35 ` [PATCH 06/10] sata_inic162x: use IDMA for non DMA ATA commands Tejun Heo
2008-04-30  7:35 ` [PATCH 07/10] sata_inic162x: use IDMA for ATAPI commands Tejun Heo
2008-04-30  7:35 ` [PATCH 08/10] sata_inic162x: kill now unused SFF related stuff Tejun Heo
2008-04-30  7:35 ` [PATCH 09/10] sata_inic162x: add cardbus support Tejun Heo
2008-04-30  7:35 ` [PATCH 10/10] sata_inic162x: update intro comment, up the version and drop EXPERIMENTAL Tejun Heo
2008-04-30  7:39 ` [PATCHSET] sata_inic162x: make it work 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=1209540918258-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --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).