All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
	Martin Peschke <mp3@de.ibm.com>,
	Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 05/11] zfcp: Introduce printf helper functions for debug trace.
Date: Thu, 27 Mar 2008 14:21:59 +0100	[thread overview]
Message-ID: <20080327133026.257442000@de.ibm.com> (raw)
In-Reply-To: 20080327132154.826339000@de.ibm.com

[-- Attachment #1: zfcp_dbf_simplifed_output_functions.diff --]
[-- Type: text/plain, Size: 963 bytes --]

From: Martin Peschke <mp3@de.ibm.com>

Introducing helper functions that allow for code simpfifications.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
 drivers/s390/scsi/zfcp_dbf.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -95,6 +95,22 @@ zfcp_dbf_view(char *out_buf, const char 
 	return len;
 }
 
+static void zfcp_dbf_outs(char **buf, const char *s1, const char *s2)
+{
+	*buf += sprintf(*buf, "%-24s%s\n", s1, s2);
+}
+
+static void zfcp_dbf_out(char **buf, const char *s, const char *format, ...)
+{
+	va_list arg;
+
+	*buf += sprintf(*buf, "%-24s", s);
+	va_start(arg, format);
+	*buf += vsprintf(*buf, format, arg);
+	va_end(arg);
+	*buf += sprintf(*buf, "\n");
+}
+
 static int
 zfcp_dbf_view_dump(char *out_buf, const char *label,
 		   char *buffer, int buflen, int offset, int total_size)

-- 

  parent reply	other threads:[~2008-03-27 13:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27 13:21 [patch 00/11] zfcp debug trace update Christof Schmitt
2008-03-27 13:21 ` [patch 01/11] zfcp: Introduce a helper function that dumps hex data to a zfcp trace Christof Schmitt
2008-03-27 13:21 ` [patch 02/11] zfcp: Clean up _zfcp_san_dbf_event_common_els Christof Schmitt
2008-03-27 13:21 ` [patch 03/11] zfcp: Remove qtcb dump to kernel log Christof Schmitt
2008-03-27 13:21 ` [patch 04/11] zfcp: Add qtcb dump to hba debug trace Christof Schmitt
2008-03-27 13:21 ` Christof Schmitt [this message]
2008-03-27 13:22 ` [patch 06/11] zfcp: Register new recovery trace Christof Schmitt
2008-03-27 13:22 ` [patch 07/11] zfcp: Add trace records for recovery thread and its queues Christof Schmitt
2008-03-27 13:22 ` [patch 08/11] zfcp: Add traces for state changes Christof Schmitt
2008-03-27 14:20   ` Heiko Carstens
2008-03-27 14:31     ` Martin Peschke
2008-03-27 13:22 ` [patch 09/11] zfcp: Trace all triggers of error recovery activity Christof Schmitt
2008-03-27 13:22 ` [patch 10/11] zfcp: Add trace records for recovery actions Christof Schmitt
2008-03-27 13:22 ` [patch 11/11] zfcp: Remove obsolete erp_dbf trace Christof Schmitt

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=20080327133026.257442000@de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mp3@de.ibm.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 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.