From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: [PATCH 01/12] rt2x00: Fix chipset debugfs file
Date: Sun, 6 Jan 2008 23:38:10 +0100 [thread overview]
Message-ID: <200801062338.11124.IvDoorn@gmail.com> (raw)
In-Reply-To: <200801062337.35904.IvDoorn@gmail.com>
Initialize blob->data before moving the data pointer
Initialize blob->size based on blob->data size
This fixes the empty chipset file in debugfs.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2x00debug.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
index e72c981..c55bf0e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00debug.c
+++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
@@ -417,6 +417,7 @@ static struct dentry *rt2x00debug_create_file_chipset(const char *name,
if (!data)
return NULL;
+ blob->data = data;
data += sprintf(data, "rt chip: %04x\n", intf->rt2x00dev->chip.rt);
data += sprintf(data, "rf chip: %04x\n", intf->rt2x00dev->chip.rf);
data += sprintf(data, "revision:%08x\n", intf->rt2x00dev->chip.rev);
@@ -425,9 +426,7 @@ static struct dentry *rt2x00debug_create_file_chipset(const char *name,
data += sprintf(data, "eeprom length: %d\n", debug->eeprom.word_count);
data += sprintf(data, "bbp length: %d\n", debug->bbp.word_count);
data += sprintf(data, "rf length: %d\n", debug->rf.word_count);
-
- blob->data = data;
- blob->size = strlen(data);
+ blob->size = strlen(blob->data);
return debugfs_create_blob(name, S_IRUGO, intf->driver_folder, blob);
}
--
1.5.3.7
next prev parent reply other threads:[~2008-01-06 22:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-06 22:37 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
2008-01-06 22:38 ` Ivo van Doorn [this message]
2008-01-06 22:38 ` [PATCH 02/12] rt2x00: Always call ieee80211_stop_queue() when return NETDEV_TX_BUSY Ivo van Doorn
2008-01-06 22:38 ` [PATCH 03/12] rt2x00: Only set the TBCN flag when the interface is configured to send beacons Ivo van Doorn
2008-01-06 22:39 ` [PATCH 04/12] rt2x00: Store queue idx and entry idx in data_ring and data_entry Ivo van Doorn
2008-01-06 22:40 ` [PATCH 05/12] rt2x00: Move start() and stop() handlers into rt2x00lib.c Ivo van Doorn
2008-01-06 22:40 ` [PATCH 06/12] rt2x00: Put 802.11 data on 4 byte boundary Ivo van Doorn
2008-01-11 0:32 ` Johannes Berg
2008-01-11 19:51 ` Ivo van Doorn
2008-01-06 22:40 ` [PATCH 07/12] rt2x00: Move packet filter flags Ivo van Doorn
2008-01-06 22:41 ` [PATCH 08/12] rt2x00: Cleanup write_tx_desc() arguments Ivo van Doorn
2008-01-06 22:41 ` [PATCH 09/12] rt2x00: Determine MY_BSS from descriptor Ivo van Doorn
2008-01-06 22:41 ` [PATCH 10/12] rt2x00: Move init_txring and init_rxring into rt2x00lib Ivo van Doorn
2008-01-06 22:42 ` [PATCH 11/12] rt2x00: Correctly initialize data and desc pointer Ivo van Doorn
2008-01-06 22:42 ` [PATCH 12/12] rt2x00: Release rt2x00 2.0.14 Ivo van Doorn
2008-01-10 11:52 ` [Rt2400-devel] Please pull 'upstream' branch of rt2x00 Will Dyson
2008-01-10 15:46 ` John W. Linville
2008-01-10 17:29 ` Ivo van Doorn
2008-01-15 0:44 ` Will Dyson
2008-01-10 17:29 ` Ivo van Doorn
2008-01-10 20:32 ` Stefan Lippers-Hollmann
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=200801062338.11124.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rt2400-devel@lists.sourceforge.net \
/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).