Message ID | 20180517160353.27561-1-srinivas.kandagatla@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E04DE60353 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 17 May 2018 17:05:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAED426E55 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 17 May 2018 17:05:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFA6B2818A; Thu, 17 May 2018 17:05:18 +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 autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B3B8D26E55 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 17 May 2018 17:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=pPgzaBSfmUpkAOTwtTZwxauW0aiBFCGscx2yC5re270=; b=Fpo DGaMV7VjDR94aR6rvjRuRKoIdath18jzF3/gyBRBzeV2ysD8aPKPn5WI7AxVrW4uT05/ubMRstfy+ 5eYQPBLeJSG4D1pRwZE7OweihM32n/9sW+e0JFnOLrKGqycqvCHba1WtJLxWh5TCNXBGMnzh5PCpe crgoVHEMK7nYfDzbg9OHBFmclOQPUWr0nsQUAy9TTv3CSsQBqWCoxi3VBiX2iwTlvdJB4GQl15X5z 4kajx5czXWaO6OvKEvoUIxNLkyYDlPUcxbw7x8WlI5nFXgScYwGqdb82LQuipqpWcJxe/dxAF9q4E YPRBJd3O1nlEiJil35YCewVHLFtDPqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJMKz-0004Ae-E9; Thu, 17 May 2018 17:05:09 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJLQ1-0005Ea-DC for linux-arm-kernel@lists.infradead.org; Thu, 17 May 2018 16:06:53 +0000 Received: by mail-wm0-x241.google.com with SMTP id l1-v6so10114109wmb.2 for <linux-arm-kernel@lists.infradead.org>; Thu, 17 May 2018 09:06:06 -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; bh=OgQDfJUVW+e559D9Y2nidPGoExRN1sz+bU/oeKRbGWk=; b=B/EQRT0H91UJM853j3PFAw/MYbfX7Ggq6qgclmrbQeIIKjogDsqafKyYaDxCxXfdQD 2vdCg/hUJCa7OPz09YgG2G7c1W2W+mm73HsqEqIkyzyZ59sc+h8sZGa9rfwgsvV7ybND V02FCDbm9E9N8HAELbW5nJ35pCSLDWyKzg6mE= 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; bh=OgQDfJUVW+e559D9Y2nidPGoExRN1sz+bU/oeKRbGWk=; b=ekhzoUN8sswDuV/qj/VbrVZE/jVnN+tRWpTz1K4kPSAygqbDKmbZBAIK/zhSvCjVNU RLtvQJsCWzLF6+VmMxcZ6WLyWykg+b0mFQBVuAuVknQ+9wzOhwjyGjAP4iPmbjXwLa+G oNw+UoMNNqJCx+mQyP8NQXE5xHbK024BxUMIoeaboewlpqiT8ISQB3XG8MIdWK0Z+o7Z H0ydII+Zdwi8JP5DIbajDAYaTXQLsvUj5RyZ2kwcaeSu7eeHMVvUVwzqGbLXCsOJIf0Q 6R3Edg22ZPYw7mryubjczby73r9wL5FNO7/nZiKbDCd3BBeH/IuMCzHCbMriwH7SKSZi 30mA== X-Gm-Message-State: ALKqPweInGKEI0oWnevF0585r5QAtKYtlc22GmWXtU3VN0Mu+Csav8/D Q3FZgdAxdpLH7ePWa1wuzgP6Gw== X-Google-Smtp-Source: AB8JxZqkd7VlUNRvgg3zpKZ16Q/3dUfJcHDXk2A4HsU8c3O91TApC4u2S+zMTKEFcGtxwwI+SQ4lAA== X-Received: by 2002:a1c:5b02:: with SMTP id p2-v6mr2228945wmb.20.1526573165472; Thu, 17 May 2018 09:06:05 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id c50-v6sm9254734wrc.11.2018.05.17.09.06.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 May 2018 09:06:04 -0700 (PDT) From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> To: agross@codeaurora.org, broonie@kernel.org Subject: [PATCH] soc: qcom: apr: fix invalid msg_type check Date: Thu, 17 May 2018 17:03:53 +0100 Message-Id: <20180517160353.27561-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180517_090617_481526_314A2492 X-CRM114-Status: GOOD ( 13.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c index 97f3622da535..57af8a537332 100644 --- a/drivers/soc/qcom/apr.c +++ b/drivers/soc/qcom/apr.c @@ -92,7 +92,7 @@ static int apr_callback(struct rpmsg_device *rpdev, void *buf, } msg_type = APR_HDR_FIELD_MT(hdr->hdr_field); - if (msg_type >= APR_MSG_TYPE_MAX && msg_type != APR_BASIC_RSP_RESULT) { + if (msg_type >= APR_MSG_TYPE_MAX) { dev_err(apr->dev, "APR: Wrong message type: %d\n", msg_type); return -EINVAL; }
Removed invalid msg_type check. This also fixes below static checker warning: apr.c:95:35: warning: comparison is always true due to limited range of data type [-Wtype-limits] warn: always true condition '(msg_type != 69864) => (0-u16max != 69864)' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- drivers/soc/qcom/apr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)