linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	David Chaw <david_chaw@adaptec.com>,
	Luben Tuikov <luben_tuikov@adaptec.com>,
	linux-scsi@vger.kernel.org
Subject: [PATCH 21/30] scsi: aic94xx: aic94xx_dump: Remove code that has been unused for at least 13 years
Date: Wed,  3 Mar 2021 14:46:22 +0000	[thread overview]
Message-ID: <20210303144631.3175331-22-lee.jones@linaro.org> (raw)
In-Reply-To: <20210303144631.3175331-1-lee.jones@linaro.org>

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic94xx/aic94xx_dump.c:731: warning: expecting prototype for asd_dump_ddb_site(). Prototype was for asd_dump_target_ddb() instead
 drivers/scsi/aic94xx/aic94xx_dump.c:875: warning: expecting prototype for ads_dump_seq_state(). Prototype was for asd_dump_seq_state() instead

Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: David Chaw <david_chaw@adaptec.com>
Cc: Luben Tuikov <luben_tuikov@adaptec.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic94xx/aic94xx_dump.c | 184 ----------------------------
 1 file changed, 184 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_dump.c b/drivers/scsi/aic94xx/aic94xx_dump.c
index 7c4c53a54b782..47a663a39dcce 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.c
+++ b/drivers/scsi/aic94xx/aic94xx_dump.c
@@ -720,152 +720,6 @@ static void asd_dump_lseq_state(struct asd_ha_struct *asd_ha, int lseq)
 	PRINT_LMIP_dword(asd_ha, lseq, DEV_PRES_TIMER_TERM_TS);
 }
 
-#if 0
-
-/**
- * asd_dump_ddb_site -- dump a CSEQ DDB site
- * @asd_ha: pointer to host adapter structure
- * @site_no: site number of interest
- */
-void asd_dump_target_ddb(struct asd_ha_struct *asd_ha, u16 site_no)
-{
-	if (site_no >= asd_ha->hw_prof.max_ddbs)
-		return;
-
-#define DDB_FIELDB(__name)                                        \
-	asd_ddbsite_read_byte(asd_ha, site_no,                    \
-			      offsetof(struct asd_ddb_ssp_smp_target_port, __name))
-#define DDB2_FIELDB(__name)                                       \
-	asd_ddbsite_read_byte(asd_ha, site_no,                    \
-			      offsetof(struct asd_ddb_stp_sata_target_port, __name))
-#define DDB_FIELDW(__name)                                        \
-	asd_ddbsite_read_word(asd_ha, site_no,                    \
-			      offsetof(struct asd_ddb_ssp_smp_target_port, __name))
-
-#define DDB_FIELDD(__name)                                         \
-	asd_ddbsite_read_dword(asd_ha, site_no,                    \
-			       offsetof(struct asd_ddb_ssp_smp_target_port, __name))
-
-	asd_printk("DDB: 0x%02x\n", site_no);
-	asd_printk("conn_type: 0x%02x\n", DDB_FIELDB(conn_type));
-	asd_printk("conn_rate: 0x%02x\n", DDB_FIELDB(conn_rate));
-	asd_printk("init_conn_tag: 0x%04x\n", be16_to_cpu(DDB_FIELDW(init_conn_tag)));
-	asd_printk("send_queue_head: 0x%04x\n", be16_to_cpu(DDB_FIELDW(send_queue_head)));
-	asd_printk("sq_suspended: 0x%02x\n", DDB_FIELDB(sq_suspended));
-	asd_printk("DDB Type: 0x%02x\n", DDB_FIELDB(ddb_type));
-	asd_printk("AWT Default: 0x%04x\n", DDB_FIELDW(awt_def));
-	asd_printk("compat_features: 0x%02x\n", DDB_FIELDB(compat_features));
-	asd_printk("Pathway Blocked Count: 0x%02x\n",
-		   DDB_FIELDB(pathway_blocked_count));
-	asd_printk("arb_wait_time: 0x%04x\n", DDB_FIELDW(arb_wait_time));
-	asd_printk("more_compat_features: 0x%08x\n",
-		   DDB_FIELDD(more_compat_features));
-	asd_printk("Conn Mask: 0x%02x\n", DDB_FIELDB(conn_mask));
-	asd_printk("flags: 0x%02x\n", DDB_FIELDB(flags));
-	asd_printk("flags2: 0x%02x\n", DDB2_FIELDB(flags2));
-	asd_printk("ExecQ Tail: 0x%04x\n",DDB_FIELDW(exec_queue_tail));
-	asd_printk("SendQ Tail: 0x%04x\n",DDB_FIELDW(send_queue_tail));
-	asd_printk("Active Task Count: 0x%04x\n",
-		   DDB_FIELDW(active_task_count));
-	asd_printk("ITNL Reason: 0x%02x\n", DDB_FIELDB(itnl_reason));
-	asd_printk("ITNL Timeout Const: 0x%04x\n", DDB_FIELDW(itnl_timeout));
-	asd_printk("ITNL timestamp: 0x%08x\n", DDB_FIELDD(itnl_timestamp));
-}
-
-void asd_dump_ddb_0(struct asd_ha_struct *asd_ha)
-{
-#define DDB0_FIELDB(__name)                                  \
-	asd_ddbsite_read_byte(asd_ha, 0,                     \
-			      offsetof(struct asd_ddb_seq_shared, __name))
-#define DDB0_FIELDW(__name)                                  \
-	asd_ddbsite_read_word(asd_ha, 0,                     \
-			      offsetof(struct asd_ddb_seq_shared, __name))
-
-#define DDB0_FIELDD(__name)                                  \
-	asd_ddbsite_read_dword(asd_ha,0 ,                    \
-			       offsetof(struct asd_ddb_seq_shared, __name))
-
-#define DDB0_FIELDA(__name, _o)                              \
-	asd_ddbsite_read_byte(asd_ha, 0,                     \
-			      offsetof(struct asd_ddb_seq_shared, __name)+_o)
-
-
-	asd_printk("DDB: 0\n");
-	asd_printk("q_free_ddb_head:%04x\n", DDB0_FIELDW(q_free_ddb_head));
-	asd_printk("q_free_ddb_tail:%04x\n", DDB0_FIELDW(q_free_ddb_tail));
-	asd_printk("q_free_ddb_cnt:%04x\n",  DDB0_FIELDW(q_free_ddb_cnt));
-	asd_printk("q_used_ddb_head:%04x\n", DDB0_FIELDW(q_used_ddb_head));
-	asd_printk("q_used_ddb_tail:%04x\n", DDB0_FIELDW(q_used_ddb_tail));
-	asd_printk("shared_mem_lock:%04x\n", DDB0_FIELDW(shared_mem_lock));
-	asd_printk("smp_conn_tag:%04x\n",    DDB0_FIELDW(smp_conn_tag));
-	asd_printk("est_nexus_buf_cnt:%04x\n", DDB0_FIELDW(est_nexus_buf_cnt));
-	asd_printk("est_nexus_buf_thresh:%04x\n",
-		   DDB0_FIELDW(est_nexus_buf_thresh));
-	asd_printk("conn_not_active:%02x\n", DDB0_FIELDB(conn_not_active));
-	asd_printk("phy_is_up:%02x\n",       DDB0_FIELDB(phy_is_up));
-	asd_printk("port_map_by_links:%02x %02x %02x %02x "
-		   "%02x %02x %02x %02x\n",
-		   DDB0_FIELDA(port_map_by_links, 0),
-		   DDB0_FIELDA(port_map_by_links, 1),
-		   DDB0_FIELDA(port_map_by_links, 2),
-		   DDB0_FIELDA(port_map_by_links, 3),
-		   DDB0_FIELDA(port_map_by_links, 4),
-		   DDB0_FIELDA(port_map_by_links, 5),
-		   DDB0_FIELDA(port_map_by_links, 6),
-		   DDB0_FIELDA(port_map_by_links, 7));
-}
-
-static void asd_dump_scb_site(struct asd_ha_struct *asd_ha, u16 site_no)
-{
-
-#define SCB_FIELDB(__name)                                                 \
-	asd_scbsite_read_byte(asd_ha, site_no, sizeof(struct scb_header)   \
-			      + offsetof(struct initiate_ssp_task, __name))
-#define SCB_FIELDW(__name)                                                 \
-	asd_scbsite_read_word(asd_ha, site_no, sizeof(struct scb_header)   \
-			      + offsetof(struct initiate_ssp_task, __name))
-#define SCB_FIELDD(__name)                                                 \
-	asd_scbsite_read_dword(asd_ha, site_no, sizeof(struct scb_header)  \
-			       + offsetof(struct initiate_ssp_task, __name))
-
-	asd_printk("Total Xfer Len: 0x%08x.\n", SCB_FIELDD(total_xfer_len));
-	asd_printk("Frame Type: 0x%02x.\n", SCB_FIELDB(ssp_frame.frame_type));
-	asd_printk("Tag: 0x%04x.\n", SCB_FIELDW(ssp_frame.tag));
-	asd_printk("Target Port Xfer Tag: 0x%04x.\n",
-		   SCB_FIELDW(ssp_frame.tptt));
-	asd_printk("Data Offset: 0x%08x.\n", SCB_FIELDW(ssp_frame.data_offs));
-	asd_printk("Retry Count: 0x%02x.\n", SCB_FIELDB(retry_count));
-}
-
-/**
- * asd_dump_scb_sites -- dump currently used CSEQ SCB sites
- * @asd_ha: pointer to host adapter struct
- */
-void asd_dump_scb_sites(struct asd_ha_struct *asd_ha)
-{
-	u16	site_no;
-
-	for (site_no = 0; site_no < asd_ha->hw_prof.max_scbs; site_no++) {
-		u8 opcode;
-
-		if (!SCB_SITE_VALID(site_no))
-			continue;
-
-		/* We are only interested in SCB sites currently used.
-		 */
-		opcode = asd_scbsite_read_byte(asd_ha, site_no,
-					       offsetof(struct scb_header,
-							opcode));
-		if (opcode == 0xFF)
-			continue;
-
-		asd_printk("\nSCB: 0x%x\n", site_no);
-		asd_dump_scb_site(asd_ha, site_no);
-	}
-}
-
-#endif  /*  0  */
-
 /**
  * ads_dump_seq_state -- dump CSEQ and LSEQ states
  * @asd_ha: pointer to host adapter structure
@@ -908,42 +762,4 @@ void asd_dump_frame_rcvd(struct asd_phy *phy,
 	spin_unlock_irqrestore(&phy->sas_phy.frame_rcvd_lock, flags);
 }
 
-#if 0
-
-static void asd_dump_scb(struct asd_ascb *ascb, int ind)
-{
-	asd_printk("scb%d: vaddr: 0x%p, dma_handle: 0x%llx, next: 0x%llx, "
-		   "index:%d, opcode:0x%02x\n",
-		   ind, ascb->dma_scb.vaddr,
-		   (unsigned long long)ascb->dma_scb.dma_handle,
-		   (unsigned long long)
-		   le64_to_cpu(ascb->scb->header.next_scb),
-		   le16_to_cpu(ascb->scb->header.index),
-		   ascb->scb->header.opcode);
-}
-
-void asd_dump_scb_list(struct asd_ascb *ascb, int num)
-{
-	int i = 0;
-
-	asd_printk("dumping %d scbs:\n", num);
-
-	asd_dump_scb(ascb, i++);
-	--num;
-
-	if (num > 0 && !list_empty(&ascb->list)) {
-		struct list_head *el;
-
-		list_for_each(el, &ascb->list) {
-			struct asd_ascb *s = list_entry(el, struct asd_ascb,
-							list);
-			asd_dump_scb(s, i++);
-			if (--num <= 0)
-				break;
-		}
-	}
-}
-
-#endif  /*  0  */
-
 #endif /* ASD_DEBUG */
-- 
2.27.0


  parent reply	other threads:[~2021-03-03 18:42 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 14:46 [PATCH 00/30] [Set 1] Rid W=1 warnings in SCSI Lee Jones
2021-03-03 14:46 ` [PATCH 01/30] scsi: megaraid: megaraid_mm: Fix incorrect function name in header Lee Jones
2021-03-03 14:46 ` [PATCH 02/30] scsi: megaraid: megaraid_sas_base: Fix a bunch of misnamed functions in their headers Lee Jones
2021-03-03 14:46 ` [PATCH 03/30] scsi: fcoe: Fix function name fcoe_set_vport_symbolic_name() in description Lee Jones
2021-03-03 14:46 ` [PATCH 04/30] scsi: megaraid: megaraid_mbox: Fix function name megaraid_queue_command_lck() " Lee Jones
2021-03-03 14:46 ` [PATCH 05/30] scsi: fcoe: fcoe_ctlr: Fix a couple of incorrectly named functions Lee Jones
2021-03-03 14:46 ` [PATCH 06/30] scsi: aic94xx: aic94xx_hwi: Fix a couple of misnamed function names Lee Jones
2021-03-03 14:46 ` [PATCH 07/30] scsi: aacraid: aachba: Fix a few incorrectly named functions Lee Jones
2021-03-03 14:46 ` [PATCH 08/30] scsi: pm8001: pm8001_init: Provide function name and fix a misspelling Lee Jones
2021-03-04  9:51   ` Jinpu Wang
2021-03-03 14:46 ` [PATCH 09/30] scsi: aacraid: commctrl: Fix incorrect spelling of aac_send_raw_srb() Lee Jones
2021-03-03 14:46 ` [PATCH 10/30] scsi: bnx2fc: bnx2fc_hwi: Fix typo in bnx2fc_indicate_kcqe() Lee Jones
2021-03-03 14:46 ` [PATCH 11/30] scsi: pm8001: pm8001_sas: Provide function name 'pm8001_I_T_nexus_reset()' in header Lee Jones
2021-03-04  9:52   ` Jinpu Wang
2021-03-03 14:46 ` [PATCH 12/30] scsi: qla4xxx: ql4_os: Fix formatting issues - missing '-' and '_' Lee Jones
2021-03-03 16:12   ` [EXT] " Nilesh Javali
2021-03-03 14:46 ` [PATCH 13/30] scsi: pm8001: pm8001_ctl: Fix incorrectly named functions in headers Lee Jones
2021-03-04  9:52   ` Jinpu Wang
2021-03-03 14:46 ` [PATCH 14/30] scsi: aic94xx: aic94xx_sds: Fix asd_erase_nv_sector()'s header Lee Jones
2021-03-03 14:46 ` [PATCH 15/30] scsi: qla2xxx: qla_iocb: Replace __qla2x00_marker()'s missing underscores Lee Jones
2021-03-03 16:13   ` [EXT] " Nilesh Javali
2021-03-03 14:46 ` [PATCH 16/30] scsi: aacraid: commsup: Repair formatting issue in aac_handle_sa_aif()'s header Lee Jones
2021-03-03 14:46 ` [PATCH 17/30] scsi: lpfc: lpfc_sli: Fix a bunch of kernel-doc issues Lee Jones
2021-03-03 14:46 ` [PATCH 18/30] scsi: pm8001: pm8001_hwi: Fix some misnamed function descriptions Lee Jones
2021-03-04  9:53   ` Jinpu Wang
2021-03-03 14:46 ` [PATCH 19/30] scsi: qla4xxx: ql4_mbx: Fix kernel-doc formatting and misnaming issue Lee Jones
2021-03-03 16:13   ` [EXT] " Nilesh Javali
2021-03-03 14:46 ` [PATCH 20/30] scsi: bnx2fc: bnx2fc_tgt: Fix misnaming of bnx2fc_free_session_resc() Lee Jones
2021-03-03 14:46 ` Lee Jones [this message]
2021-03-03 14:46 ` [PATCH 22/30] scsi: pm8001: pm80xx_hwi: Fix a bunch of doc-rotted function headers Lee Jones
2021-03-04  9:53   ` Jinpu Wang
2021-03-03 14:46 ` [PATCH 23/30] scsi: qla2xxx: qla_gs: Fix some incorrect formatting/spelling issues Lee Jones
2021-03-03 16:13   ` [EXT] " Nilesh Javali
2021-03-03 14:46 ` [PATCH 24/30] scsi: aacraid: rx: Fix misspelling of _aac_rx_init() Lee Jones
2021-03-03 14:46 ` [PATCH 25/30] scsi: lpfc: lpfc_ct: Fix formatting and misspelling issues Lee Jones
2021-03-03 14:46 ` [PATCH 26/30] scsi: libfc: fc_lport: Fix some possible copy/paste issues Lee Jones
2021-03-03 14:46 ` [PATCH 27/30] scsi: lpfc: lpfc_hbadisc: Fix incorrect naming of __lpfc_update_fcf_record() Lee Jones
2021-03-03 14:46 ` [PATCH 28/30] scsi: mpt3sas: mpt3sas_base: Fix misspelling of _base_put_smid_default_atomic() Lee Jones
2021-03-03 14:46 ` [PATCH 29/30] scsi: lpfc: lpfc_nportdisc: Fix misspelling of lpfc_defer_acc_rsp() Lee Jones
2021-03-03 14:46 ` [PATCH 30/30] scsi: mpt3sas: mpt3sas_scs: Move a little data from the stack onto the heap Lee Jones
2021-03-16  2:15 ` [PATCH 00/30] [Set 1] Rid W=1 warnings in SCSI Martin K. Petersen
2021-03-19  3:46 ` Martin K. Petersen

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=20210303144631.3175331-22-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=david_chaw@adaptec.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luben_tuikov@adaptec.com \
    --cc=martin.petersen@oracle.com \
    /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).