Re: [PATCH 06/73] sata_mv: kill 'port' argument in mv_dump_all_regs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/9/21 1:40 AM, Damien Le Moal wrote:
On 2021/12/09 1:31, Hannes Reinecke wrote:
Always '-1', so drop it and simplify the function.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
---
  drivers/ata/sata_mv.c | 24 +++++++-----------------
  1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index f0257685495f..e86eddf83704 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1286,23 +1286,13 @@ static void mv_dump_pci_cfg(struct pci_dev *pdev, unsigned bytes)
  	}
  }
-static void mv_dump_all_regs(void __iomem *mmio_base, int port,
-			     struct pci_dev *pdev)
+static void mv_dump_all_regs(void __iomem *mmio_base, struct pci_dev *pdev)
  {
-	void __iomem *hc_base = mv_hc_base(mmio_base,
-					   port >> MV_PORT_HC_SHIFT);
-	void __iomem *port_base;
  	int start_port, num_ports, p, start_hc, num_hcs, hc;
- if (0 > port) {
-		start_hc = start_port = 0;
-		num_ports = 8;		/* shld be benign for 4 port devs */
-		num_hcs = 2;
-	} else {
-		start_hc = port >> MV_PORT_HC_SHIFT;
-		start_port = port;
-		num_ports = num_hcs = 1;
-	}
+	start_hc = start_port = 0;
+	num_ports = 8;		/* shld be benign for 4 port devs */
+	num_hcs = 2;
  	dev_printk(KERN_DEBUG, &pdev->dev,
  		   "%s: All registers for port(s) %u-%u:\n", __func__,
  		   start_port, num_ports > 1 ? num_ports - 1 : start_port);
@@ -1317,13 +1307,13 @@ static void mv_dump_all_regs(void __iomem *mmio_base, int port,
  	mv_dump_mem(&pdev->dev, mmio_base+0xf00, 0x4);
  	mv_dump_mem(&pdev->dev, mmio_base+0x1d00, 0x6c);
  	for (hc = start_hc; hc < start_hc + num_hcs; hc++) {
-		hc_base = mv_hc_base(mmio_base, hc);
+		void __iomem *hc_base = mv_hc_base(mmio_base, hc);

please add a blank line after the declaration.

  		dev_printk(KERN_DEBUG, &pdev->dev, "%s: HC regs (HC %i):\n",
  			   __func__, hc);

Change this to dev_dbg() while at it ?

Okay, will do.

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux