diff mbox

[03/13] dice: Split transaction functionality into a file

Message ID 53840992.9000704@sakamocchi.jp (mailing list archive)
State Changes Requested
Delegated to: Takashi Iwai
Headers show

Commit Message

Takashi Sakamoto May 27, 2014, 3:42 a.m. UTC
This patch includes two bugs. Please apply attached fixup.


Regards

Takashi Sakamoto
o-takashi@sakamocchi.jp
diff mbox

Patch

From 59777bb80164e54611a933ed090d67772e5b458b Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Date: Tue, 27 May 2014 02:27:04 +0900
Subject: fixup for [PATCH 03/13]

fix wrong type of variable for function argument, and prevent from narrowing
conversion.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/dice/dice.c             | 8 ++++----
 sound/firewire/dice/dice_transaction.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c
index f410030..a0172a7 100644
--- a/sound/firewire/dice/dice.c
+++ b/sound/firewire/dice/dice.c
@@ -865,7 +865,7 @@  static int dice_interface_check(struct fw_unit *unit)
 	};
 	struct fw_device *device = fw_parent_device(unit);
 	struct fw_csr_iterator it;
-	int key, vendor = -1, model = -1, err;
+	int key, val, vendor = -1, model = -1, err;
 	unsigned int category, i;
 	__be32 *pointers, value;
 	__be32 tx_data[4];
@@ -882,13 +882,13 @@  static int dice_interface_check(struct fw_unit *unit)
 	 * ID, and a 22-bit serial number.
 	 */
 	fw_csr_iterator_init(&it, unit->directory);
-	while (fw_csr_iterator_next(&it, &key, &value)) {
+	while (fw_csr_iterator_next(&it, &key, &val)) {
 		switch (key) {
 		case CSR_SPECIFIER_ID:
-			vendor = value;
+			vendor = val;
 			break;
 		case CSR_MODEL:
-			model = value;
+			model = val;
 			break;
 		}
 	}
diff --git a/sound/firewire/dice/dice_transaction.c b/sound/firewire/dice/dice_transaction.c
index 90773b8..1ac249a 100644
--- a/sound/firewire/dice/dice_transaction.c
+++ b/sound/firewire/dice/dice_transaction.c
@@ -12,7 +12,7 @@ 
 #define NOTIFICATION_TIMEOUT_MS	100
 
 static u64 get_subaddr(struct snd_dice *dice, enum snd_dice_addr_type type,
-		       unsigned int offset)
+		       u64 offset)
 {
 	switch (type) {
 	case SND_DICE_ADDR_TYPE_TX:
-- 
1.8.3.2