From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 09/10] [FCoE] Remove sa_assert files
Date: Tue, 22 Jan 2008 16:37:41 -0800 [thread overview]
Message-ID: <20080123003741.8469.30213.stgit@fritz> (raw)
In-Reply-To: <20080123003523.8469.62236.stgit@fritz>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/ofc/include/sa_assert.h | 85 ----------------------------------
drivers/scsi/ofc/libsa/Makefile | 1
drivers/scsi/ofc/libsa/sa_assert.c | 50 --------------------
3 files changed, 0 insertions(+), 136 deletions(-)
delete mode 100644 drivers/scsi/ofc/include/sa_assert.h
delete mode 100644 drivers/scsi/ofc/libsa/sa_assert.c
diff --git a/drivers/scsi/ofc/include/sa_assert.h b/drivers/scsi/ofc/include/sa_assert.h
deleted file mode 100644
index 16224d7..0000000
--- a/drivers/scsi/ofc/include/sa_assert.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright(c) 2007 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Maintained at www.Open-FCoE.org
- */
-
-#ifndef _LIBSA_ASSERT_H_
-#define _LIBSA_ASSERT_H_
-
-extern void assert_failed(const char *s, ...)
- __attribute__ ((format(printf, 1, 2)));
-
-#ifndef UNLIKELY
-#define UNLIKELY(_x) (_x)
-#endif /* UNLIKELY */
-
-/*
- * ASSERT macros
- *
- * ASSERT(expr) - this calls assert_failed() if expr is false. This variant
- * is not present in production code or if DEBUG_ASSERTS is not defined.
- * Be careful not to rely on expr being evaluated.
- */
-#if defined(DEBUG_ASSERTS)
-#define ASSERT(_x) do { \
- if (UNLIKELY(!(_x))) { \
- assert_failed("ASSERT FAILED (%s) @ %s:%d\n", \
- "" #_x, __FILE__, __LINE__); \
- } \
- } while (0)
-#else
-#define ASSERT(_x)
-#endif /* DEBUG_ASSERTS */
-
-/*
- * ASSERT_NOTIMPL(expr) - this calls assert_failed() if expr is false.
- * The implication is that the condition is not handled by the current
- * implementation, and work should be done eventually to handle this.
- */
-#define ASSERT_NOTIMPL(_x) do { \
- if (UNLIKELY(!(_x))) { \
- assert_failed("ASSERT (NOT IMPL) (%s) @ %s:%d\n", \
- "" #_x, __FILE__, __LINE__); \
- } \
- } while (0)
-
-/*
- * ASSERT_NOTREACHED - this is the same as ASSERT_NOTIMPL(0).
- */
-#define ASSERT_NOTREACHED do { \
- assert_failed("ASSERT (NOT REACHED) @ %s:%d\n", \
- __FILE__, __LINE__); \
- } while (0)
-
-/*
- * ASSERT_BUG(bugno, expr). This variant is used when a bug number has
- * been assigned to any one of the other assertion failures. It is always
- * present in code. It gives the bug number which helps locate
- * documentation and helps prevent duplicate bug filings.
- */
-#define ASSERT_BUG(_bugNr, _x) do { \
- if (UNLIKELY(!(_x))) { \
- assert_failed("ASSERT (BUG %d) (%s) @ %s:%d\n", \
- (_bugNr), #_x, __FILE__, __LINE__); \
- } \
- } while (0)
-
-#ifndef LIBSA_USE_DANGEROUS_ROUTINES
-#define gets DONT_USE_gets
-#endif /* LIBSA_USE_DANGEROUS_ROUTINES */
-
-#endif /* _LIBSA_ASSERT_H_ */
diff --git a/drivers/scsi/ofc/libsa/Makefile b/drivers/scsi/ofc/libsa/Makefile
index 42b8733..6206b78 100644
--- a/drivers/scsi/ofc/libsa/Makefile
+++ b/drivers/scsi/ofc/libsa/Makefile
@@ -5,7 +5,6 @@ EXTRA_CFLAGS += -I$(OFC_DIR)/include
obj-y += libsa.o
libsa-y := \
- sa_assert.o \
sa_event.o \
sa_hash_kern.o \
sa_timer.o
diff --git a/drivers/scsi/ofc/libsa/sa_assert.c b/drivers/scsi/ofc/libsa/sa_assert.c
deleted file mode 100644
index 0824bb6..0000000
--- a/drivers/scsi/ofc/libsa/sa_assert.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright(c) 2007 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Maintained at www.Open-FCoE.org
- */
-
-#include <linux/autoconf.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-
-#include "sa_kernel.h"
-
-#include "ofc_dbg.h"
-#include "sa_assert.h"
-
-/*
- * Size of on-stack line buffers.
- * These shouldn't be to large for a kernel stack frame.
- */
-#define OFC_DBG_BUF_LEN 200 /* on-stack line buffer size */
-
-/*
- * Assert failures.
- */
-void assert_failed(const char *format, ...)
-{
- va_list arg;
- char buf[OFC_DBG_BUF_LEN];
-
- va_start(arg, format);
- vsnprintf(buf, sizeof(buf), format, arg);
- va_end(arg);
- panic(buf);
-}
-
-EXPORT_SYMBOL(assert_failed);
next prev parent reply other threads:[~2008-01-23 0:51 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 ` [PATCH 03/10] [FCoE] Remove DEBUG_ASSERTS statements Robert Love
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 ` Robert Love [this message]
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=20080123003741.8469.30213.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.