From patchwork Tue May 27 03:42:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 4245931 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3FEF2BF90B for ; Tue, 27 May 2014 03:42:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64B0520272 for ; Tue, 27 May 2014 03:42:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BC08F20176 for ; Tue, 27 May 2014 03:42:39 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1482C2654D4; Tue, 27 May 2014 05:42:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 097262654B9; Tue, 27 May 2014 05:42:27 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D11952654BE; Tue, 27 May 2014 05:42:25 +0200 (CEST) Received: from smtp310.phy.lolipop.jp (smtp310.phy.lolipop.jp [210.157.22.78]) by alsa0.perex.cz (Postfix) with ESMTP id 75A252654B9 for ; Tue, 27 May 2014 05:42:16 +0200 (CEST) Received: from smtp310.phy.lolipop.lan (HELO smtp310.phy.lolipop.jp) (172.17.1.10) (smtp-auth username m12129643-o-takashi, mechanism plain) by smtp310.phy.lolipop.jp (qpsmtpd/0.82) with ESMTPA; Tue, 27 May 2014 12:42:13 +0900 Received: from 127.0.0.1 (127.0.0.1) by smtp310.phy.lolipop.jp (LOLIPOP-Fsecure); Tue, 27 May 2014 12:42:11 +0900 (JST) X-Virus-Status: clean(LOLIPOP-Fsecure) Message-ID: <53840992.9000704@sakamocchi.jp> Date: Tue, 27 May 2014 12:42:10 +0900 From: Takashi Sakamoto User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: clemens@ladisch.de References: <1400420198-24312-1-git-send-email-o-takashi@sakamocchi.jp> <1400420198-24312-4-git-send-email-o-takashi@sakamocchi.jp> In-Reply-To: <1400420198-24312-4-git-send-email-o-takashi@sakamocchi.jp> X-Enigmail-Version: 1.5.2 Cc: alsa-devel@alsa-project.org, ffado-devel@lists.sf.net Subject: Re: [alsa-devel] [PATCH 03/13] dice: Split transaction functionality into a file X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch includes two bugs. Please apply attached fixup. Regards Takashi Sakamoto o-takashi@sakamocchi.jp From 59777bb80164e54611a933ed090d67772e5b458b Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto 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 --- 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