All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 03/10] [FCoE] Remove DEBUG_ASSERTS statements
Date: Tue, 22 Jan 2008 16:36:09 -0800	[thread overview]
Message-ID: <20080123003609.8469.13363.stgit@fritz> (raw)
In-Reply-To: <20080123003523.8469.62236.stgit@fritz>


---

 drivers/scsi/ofc/include/fc_els.h |   17 -----------------
 drivers/scsi/ofc/include/fc_fs.h  |   13 -------------
 drivers/scsi/ofc/include/fc_gs.h  |   12 ------------
 drivers/scsi/ofc/libfc/fc_ils.h   |   33 ---------------------------------
 drivers/scsi/ofc/libfc/fc_sess.c  |   14 --------------
 5 files changed, 0 insertions(+), 89 deletions(-)


diff --git a/drivers/scsi/ofc/include/fc_els.h b/drivers/scsi/ofc/include/fc_els.h
index 8ef10c0..6bff73e 100644
--- a/drivers/scsi/ofc/include/fc_els.h
+++ b/drivers/scsi/ofc/include/fc_els.h
@@ -808,21 +808,4 @@ enum fc_els_clid_ic {
 	ELS_CLID_IC_LIP =	8,	/* receiving LIP */
 };
 
-#ifdef DEBUG_ASSERTS
-/*
- * Static checks for packet structure sizes.
- * These catch some obvious errors in structure definitions.
- * They should generate no code since they can be tested at compile time.
- */
-static inline void fc_els_size_checks(void)
-{
-	ASSERT_NOTIMPL(sizeof(struct fc_els_csp) == FC_ELS_CSP_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_els_cssp) == FC_ELS_CSSP_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_els_flogi) == FC_ELS_FLOGI_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_els_spp) == FC_ELS_SPP_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_els_prli) == FC_ELS_PRLI_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_els_logo) == FC_ELS_LOGO_LEN);
-}
-#endif /* DEBUG_ASSERTS */
-
 #endif /* _FC_ELS_H_ */
diff --git a/drivers/scsi/ofc/include/fc_fs.h b/drivers/scsi/ofc/include/fc_fs.h
index 150a711..fdbed64 100644
--- a/drivers/scsi/ofc/include/fc_fs.h
+++ b/drivers/scsi/ofc/include/fc_fs.h
@@ -324,17 +324,4 @@ struct fc_data_desc {
 
 #define FC_DATA_DESC_LEN    12	/* expected length of structure */
 
-#ifdef DEBUG_ASSERTS
-/*
- * Static checks for packet structure sizes.
- * These catch some obvious errors in structure definitions.
- * This should generate no code.  The check should be true at compile time.
- */
-static inline void fc_fs_size_checks(void)
-{
-	ASSERT_NOTIMPL(sizeof(struct fc_frame_header) == FC_FRAME_HEADER_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_data_desc) == FC_DATA_DESC_LEN);
-}
-#endif /* DEBUG_ASSERTS */
-
 #endif /* _FC_FS_H_ */
diff --git a/drivers/scsi/ofc/include/fc_gs.h b/drivers/scsi/ofc/include/fc_gs.h
index 2ac3d24..6738535 100644
--- a/drivers/scsi/ofc/include/fc_gs.h
+++ b/drivers/scsi/ofc/include/fc_gs.h
@@ -90,16 +90,4 @@ enum fc_ct_explan {
 	/* definitions not complete */
 };
 
-#ifdef DEBUG_ASSERTS
-/*
- * Static checks for packet structure sizes.
- * These catch some obvious errors in structure definitions.
- * These should generate no code since they can be tested at compile time.
- */
-static inline void fc_gs_size_checks(void)
-{
-	ASSERT_NOTIMPL(sizeof(struct fc_ct_hdr) == FC_CT_HDR_LEN);
-}
-#endif /* DEBUG_ASSERTS */
-
 #endif /* _FC_GS_H_ */
diff --git a/drivers/scsi/ofc/libfc/fc_ils.h b/drivers/scsi/ofc/libfc/fc_ils.h
index 7225ac5..c421df7 100644
--- a/drivers/scsi/ofc/libfc/fc_ils.h
+++ b/drivers/scsi/ofc/libfc/fc_ils.h
@@ -521,37 +521,4 @@ struct fc_ils_mrra_resp {
 #define	FC_MRRR_AVAIL	1		/* resources available */
 #define	FC_MRRR_UNAV	2		/* resources unavailable */
 
-#ifdef DEBUG_ASSERTS
-/*
- * Static checks for packet structure sizes.
- * These catch some obvious errors in structure definitions.
- * This should generate no code.  The check should be true at compile time.
- */
-static inline void fc_ils_size_checks(void)
-{
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_sw_rjt) == FC_ILS_SW_RJT_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_gnf) == FC_ILS_GNF_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_elp_f_params) ==
-		       FC_ILS_ELP_F_PARAMS_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_elp) == FC_ILS_ELP_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_elp_r_rdy) == FC_ILS_ELP_R_RDY_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_elp_vc_rdy) ==
-		       FC_ILS_ELP_VC_RDY_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_efp) == FC_ILS_EFP_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_efp_rec) == FC_ILS_EFP_REC_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_mcast_id_rec) ==
-		       FC_ILS_MCAST_ID_REC_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_dia) == FC_ILS_DIA_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_rdi) == FC_ILS_RDI_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_fspf) == FC_ILS_FSPF_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_hlo) == FC_ILS_HLO_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_lsu) == FC_ILS_LSU_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_lsr) == FC_ILS_LSR_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_link_desc) == FC_LINK_DESC_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_esc) == FC_ILS_ESC_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_mrra) == FC_ILS_MRRA_LEN);
-	ASSERT_NOTIMPL(sizeof(struct fc_ils_mrra_resp) == FC_ILS_MRRA_RESP_LEN);
-}
-#endif /* DEBUG_ASSERTS */
-
 #endif /* _FC_ILS_H_ */
diff --git a/drivers/scsi/ofc/libfc/fc_sess.c b/drivers/scsi/ofc/libfc/fc_sess.c
index 65204ae..ee08c97 100644
--- a/drivers/scsi/ofc/libfc/fc_sess.c
+++ b/drivers/scsi/ofc/libfc/fc_sess.c
@@ -116,20 +116,6 @@ static inline void fc_sess_unlock(struct fc_sess *sess)
 	spin_unlock_bh(&sess->fs_lock);
 }
 
-#ifdef DEBUG_ASSERTS
-/*
- * Check whether session is locked.
- */
-static inline int fc_sess_locked(const struct fc_sess *sess)
-{
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
-	return spin_is_locked((spinlock_t *) &sess->fs_lock);
-#else
-	return 1;
-#endif /* CONFIG_SMP || CONFIG_DEBUG_SPINLOCK */
-}
-#endif /* DEBUG_ASSERTS */
-
 /*
  * Unlock session.
  * This must handle operations that defer because they can't be done


  parent reply	other threads:[~2008-01-23  0:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-23  0:35 [PATCH 00/10] [FCoE] This patch set removes the ASSERT code in Open-FCoE Robert Love
2008-01-23  0:35 ` [PATCH 01/10] [FCoE] Changing all ASSERT_NOTIMPL to WARN_ON(1) Robert Love
2008-01-23  0:35 ` [PATCH 02/10] [FCoE] Convert one ASSERT_NOTREACHED " Robert Love
2008-01-23  0:36 ` Robert Love [this message]
2008-01-23  0:36 ` [PATCH 04/10] [FCoE] Remove ASSERTs from libfc Robert Love
2008-01-23  0:36 ` [PATCH 05/10] [FCoE] Remove ASSERTs from libsa Robert Love
2008-01-23  0:36 ` [PATCH 06/10] [FCoE] Remove ASSERTs from openfc Robert Love
2008-01-23  0:37 ` [PATCH 07/10] [FCoE] Remove ASSERTs from fcoe Robert Love
2008-01-23  0:37 ` [PATCH 08/10] [FCoE] Remove ASSERTs from frame headers Robert Love
2008-01-23  0:37 ` [PATCH 09/10] [FCoE] Remove sa_assert files Robert Love
2008-01-23  0:37 ` [PATCH 10/10] [FCoE] Removing unused defines Robert Love

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=20080123003609.8469.13363.stgit@fritz \
    --to=robert.w.love@intel.com \
    --cc=linux-scsi@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 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.