From patchwork Thu Mar 28 13:41:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10875027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE8E9922 for ; Thu, 28 Mar 2019 13:44:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2C7E2876D for ; Thu, 28 Mar 2019 13:44:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4682287C6; Thu, 28 Mar 2019 13:44:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2499F2876D for ; Thu, 28 Mar 2019 13:44:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5AAF387B; Thu, 28 Mar 2019 14:43:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5AAF387B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1553780678; bh=Bc6UrnporWHDJKE1RD2VgWViSHiCuFsKhxK0Wgs607Y=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sDzoI1cTryyzdjSO9p3PbbUygRQea0EeQbWXTP1AzxIoPc/koAZhgCoEHRrOvZNi3 kI12fgYzXSNKLUwU/DinQ/CB63sNQUupZrDgnduc7Y1eRUJQ9IGAd1ikDd3Mfz6oBq AgBnIlXbIn6LtCcpnHFh+9s1Q03mBilEPfliNBJU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AC281F89708; Thu, 28 Mar 2019 14:42:12 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E85F7F8971A; Thu, 28 Mar 2019 14:42:09 +0100 (CET) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2EBD5F8963C for ; Thu, 28 Mar 2019 14:42:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2EBD5F8963C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hDP7BULK" Received: by mail-wr1-x444.google.com with SMTP id j9so22950537wrn.6 for ; Thu, 28 Mar 2019 06:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QFy2R/hbHdQU/GYBZGpsK8dhJom8kWbgEiSyNSuVg9E=; b=hDP7BULK4cwy8tLjpaX53MoVAzLd4Iwxvkh2ZVnrU7FD1lUZKLxKg+sApf7QrJ9DLS 8LVEhQ27wMUseIJ+TEERj5BKr21jenxNcZ+GrGapWXyymnq8oJLL7ORbrfCqqFtqCDCb 1INRQ8TzkEXl2u2KFoYkBCVC9lT+KdObKwwHmgofqsK2rotKGNVZ1sktJQRnRKCCnkvK o905hoBb0H7xi77B1zOhOCGAgmKqL7wHWSJQ7gCpCkn0vYpQj0SOLsB2tSRh/PRtjfX3 PmelXYlKn8pc0oP3x8kiWacjCW4mSSzn98MzxyngGrFd4kaXRtECRLpxNgzZniid8wUz vIDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QFy2R/hbHdQU/GYBZGpsK8dhJom8kWbgEiSyNSuVg9E=; b=cVJx35MPuEp70ok171r4Ky6wG9AHcwD66FnGmezCAeHjS7XMyO0z0oqsPpxzP7sPhP aNe/KGZNWFUtERXbEp4TJUXD2A1rebzxh2hKhwp8RonJzj07PYYzoVVd/7Rm0ytMv69c YxtiGc9CsDh6bSzHb4ayl9d9JQxidiRI9AWEbUG1WMXr1x0UBq+v7rB9IyGrrfEcV/uK uxeSjbGPDAKK6hbZXf2BXBzNKSdKNxR430BYTe+Up8Lu850gzl80i7UISGc/HuQF+7TQ QZBa3RXYcAiWM/dvjDAXmwUERGTXm8ZW4G99dky9wGjy+KtsIOu90ZYblLWY5SxiOBhE s2Nw== X-Gm-Message-State: APjAAAVPpkcmS2wNQP8JTXPoiFXFSg5ROy4i1XIGn7MJfEs+xCjofjtF VbdgsrfZWn4Na4gf3rQ7TOJvTw== X-Google-Smtp-Source: APXvYqxh9GjGSCFtLqyod+sobi7ARD7jXoR1a02/6Kwmo+MLWtlNWERvSA3qw1nW3WoxdzTqKyEt3w== X-Received: by 2002:adf:f7c2:: with SMTP id a2mr10097121wrq.242.1553780523153; Thu, 28 Mar 2019 06:42:03 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id e193sm5956374wmg.18.2019.03.28.06.42.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Mar 2019 06:42:01 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org Date: Thu, 28 Mar 2019 13:41:32 +0000 Message-Id: <20190328134134.22479-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> References: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Cc: sanyog.r.kale@intel.com, Srinivas Kandagatla , pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 2/4] soundwire: cdns: fix check for number of messages X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" X-Virus-Scanned: ClamAV using ClamSMTP Looks like there is a typo while checking number of messages, which should be checked in defer pointer rather than message length. Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/cadence_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index cb6a331f448a..d41adbc57918 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -434,7 +434,7 @@ cdns_xfer_msg_defer(struct sdw_bus *bus, int cmd = 0, ret; /* for defer only 1 message is supported */ - if (msg->len > 1) + if (defer->length > 1) return -ENOTSUPP; ret = cdns_prep_msg(cdns, msg, &cmd);