From: Vasu Dev <vasu.dev@intel.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 2/2] Removed unused sa_log functions
Date: Fri, 21 Dec 2007 16:24:35 -0800 [thread overview]
Message-ID: <20071222002435.6543.55682.stgit@vdinit.jf.intel.com> (raw)
In-Reply-To: <20071222002255.6543.32102.stgit@vdinit.jf.intel.com>
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
---
drivers/scsi/ofc/libsa/Makefile | 1
drivers/scsi/ofc/libsa/sa_cons_linux.c | 37 ----------
drivers/scsi/ofc/libsa/sa_log.c | 117 --------------------------------
3 files changed, 0 insertions(+), 155 deletions(-)
diff --git a/drivers/scsi/ofc/libsa/Makefile b/drivers/scsi/ofc/libsa/Makefile
index 1431906..7f13291 100644
--- a/drivers/scsi/ofc/libsa/Makefile
+++ b/drivers/scsi/ofc/libsa/Makefile
@@ -6,7 +6,6 @@ obj-y += libsa.o
libsa-y := \
sa_assert.o \
- sa_cons_linux.o \
sa_event.o \
sa_hash_kern.o \
sa_state.o \
diff --git a/drivers/scsi/ofc/libsa/sa_cons_linux.c b/drivers/scsi/ofc/libsa/sa_cons_linux.c
deleted file mode 100644
index 037866b..0000000
--- a/drivers/scsi/ofc/libsa/sa_cons_linux.c
+++ /dev/null
@@ -1,37 +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/kernel.h>
-#include <linux/string.h>
-#include "ofc_dbg.h"
-
-void sa_log_output(const char *buf)
-{
- printk(KERN_INFO "%s", buf);
-}
-
-void sa_log_abort(const char *buf)
-{
- panic(buf);
-}
-
-void sa_log_output_exit(const char *buf)
-{
- panic(buf);
-}
diff --git a/drivers/scsi/ofc/libsa/sa_log.c b/drivers/scsi/ofc/libsa/sa_log.c
deleted file mode 100644
index a3e26cb..0000000
--- a/drivers/scsi/ofc/libsa/sa_log.c
+++ /dev/null
@@ -1,117 +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"
-
-/*
- * 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 */
-
-/*
- * log with a variable argument list.
- */
-static void sa_log_va(const char *func, const char *format, va_list arg)
-{
- size_t len;
- size_t flen;
- int add_newline;
- char sa_buf[OFC_DBG_BUF_LEN];
- char *bp;
-
- /*
- * If the caller didn't provide a newline at the end, we will.
- */
- len = strlen(format);
- add_newline = 0;
- if (!len || format[len - 1] != '\n')
- add_newline = 1;
- bp = sa_buf;
- len = sizeof(sa_buf);
- if (func) {
- flen = snprintf(bp, len, "%s: ", func);
- len -= flen;
- bp += flen;
- }
- flen = vsnprintf(bp, len, format, arg);
- if (add_newline && flen < len) {
- bp += flen;
- *bp++ = '\n';
- *bp = '\0';
- }
- sa_log_output(sa_buf);
-}
-
-/*
- * log
- */
-void sa_log(const char *format, ...)
-{
- va_list arg;
-
- va_start(arg, format);
- sa_log_va(NULL, format, arg);
- va_end(arg);
-}
-
-/*
- * log with function name.
- */
-void sa_log_func(const char *func, const char *format, ...)
-{
- va_list arg;
-
- va_start(arg, format);
- sa_log_va(func, format, arg);
- va_end(arg);
-}
-
-EXPORT_SYMBOL(sa_log_func);
-
-static char *strerror_r(int err, char *buf, size_t len)
-{
- return "";
-}
-
-/*
- * log with error number.
- */
-void sa_log_err(int error, const char *func, const char *format, ...)
-{
- va_list arg;
- char buf[OFC_DBG_BUF_LEN];
-
- if (func) {
- sa_log("%s: error %d %s", func, error,
- strerror_r(error, buf, sizeof(buf)));
- } else {
- sa_log("error %d %s", error,
- strerror_r(error, buf, sizeof(buf)));
- }
- va_start(arg, format);
- sa_log_va(func, format, arg);
- va_end(arg);
-}
prev parent reply other threads:[~2007-12-22 0:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-22 0:24 [PATCH 0/2] Series short description Vasu Dev
2007-12-22 0:24 ` [PATCH 1/2] Added simple OFC_DBG macro to log debug messages for entire fcoe code Vasu Dev
2007-12-22 0:24 ` Vasu Dev [this message]
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=20071222002435.6543.55682.stgit@vdinit.jf.intel.com \
--to=vasu.dev@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.