Skip to content

Commit

Permalink
sata_inic162x: remove unused variable in inic_scr_read()
Browse files Browse the repository at this point in the history
The variable addr is initialized but never used
otherwise, so remove the unused variable.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Wei Yongjun authored and Jeff Garzik committed Nov 28, 2012
1 parent 8b34f2c commit 7f0658d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/ata/sata_inic162x.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,10 @@ static void inic_reset_port(void __iomem *port_base)
static int inic_scr_read(struct ata_link *link, unsigned sc_reg, u32 *val)
{
void __iomem *scr_addr = inic_port_base(link->ap) + PORT_SCR;
void __iomem *addr;

if (unlikely(sc_reg >= ARRAY_SIZE(scr_map)))
return -EINVAL;

addr = scr_addr + scr_map[sc_reg] * 4;
*val = readl(scr_addr + scr_map[sc_reg] * 4);

/* this controller has stuck DIAG.N, ignore it */
Expand Down

0 comments on commit 7f0658d

Please sign in to comment.