Thread (7 messages) read the whole thread 7 messages, 2 authors, 2011-08-31

Re: [PATCH 3/4] ath6kl: cleanup diagnose window read and write functions

From: Kalle Valo <hidden>
Date: 2011-08-31 11:05:37

On 08/30/2011 06:00 PM, Vasanthakumar Thiagarajan wrote:
On Tue, Aug 30, 2011 at 04:44:50PM +0300, Kalle Valo wrote:
quoted
+int ath6kl_diag_write(struct ath6kl *ar, u32 address, void *data, u32 length)
+{
+	u32 count, *buf = data;
+	int ret;
+
+	if (WARN_ON(length % 4))
+		return -EINVAL;
+
+	for (count = 0; count < length / 4; count++, address += 4) {
+		ret = ath6kl_diag_write32(ar, address, buf[count]);
+		if (ret)
+			return ret;
 	}
 
-	return status;
+	return ret;
drivers/net/wireless/ath/ath6kl/main.c: In function ‘ath6kl_diag_write’:
drivers/net/wireless/ath/ath6kl/main.c:297: warning: ‘ret’ may be
used uninitialized in this function
Strange, my compiler didn't warn about this. Fixed in v2.

Thanks,
Kalle
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help