From patchwork Thu May 17 16:03:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 136158 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp122195lji; Thu, 17 May 2018 09:06:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpiU0ajtWNL6k8QFn8vcoIhfaYCc+DpdgAJ6vKaWEWoSrsYgEYfG8+PzGqj1jVgPM0sEUf0 X-Received: by 2002:a17:902:3281:: with SMTP id z1-v6mr5696812plb.226.1526573169967; Thu, 17 May 2018 09:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526573169; cv=none; d=google.com; s=arc-20160816; b=xFmsXBO48nT6pPZG85wWUzLQIO4l2cBrIleoJdVxBMNJ+OWMcdbkyhHT2CRmTO4xWQ INRf6+D8XTaYU45yDViOlagJRBndbmAf4rCXwrvyHptjXbRSN1B4Rc6OjsA447Z8Ex/5 ydjNOe8zDCAMG5qlUIDlZ5HBpQewSQ/aenM3t5sHFoqKqQmP/1qdbJNUJhDnHYRliKUM 5Stb/Yar8Wu8trt3ioDBbmA1V7SOqrliHygy0D697VOJrmgBgeJQL1r8x5h1oFKBSs0G H1tZ1HuHIz2Y2ZgH/hCV6CzhLM+1JMnOBafreSDW0PYAizdo8FUyXp0wf9byT5MGaCHC KnHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=OgQDfJUVW+e559D9Y2nidPGoExRN1sz+bU/oeKRbGWk=; b=fDLZFb4ve78m9qPVMHF/gLf+j9jGOboZfV290mmohZykuy0eQPJvWRMJg8qL5WAEH0 SHfVTzf+dUmCSJrdF+ezLc5E4aKGwlH64HCBYISNcsptPNI0GCHJO03sND38yNnQ1krA fHf8QwKKZjx3R6Duu3iImoHPeIf+non0V+zEU44iP0ZNnA/QF85cNFVpofOumo0/zz/X uUuRu7BHaPRUjNbg+kfYHx+aONT+USXUzj2uO5/BVS10d3qi+b7ktVyRNWV88TIJ3Q6o PLfG46D7G6/uTDoJG3wUROOkucBarBe2W8M8NKeB03OhTClisOwU0MW4wk8asckcIrHX pc4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B/EQRT0H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4-v6si4518783pgn.54.2018.05.17.09.06.09; Thu, 17 May 2018 09:06:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B/EQRT0H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752509AbeEQQGI (ORCPT + 29 others); Thu, 17 May 2018 12:06:08 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34952 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752452AbeEQQGG (ORCPT ); Thu, 17 May 2018 12:06:06 -0400 Received: by mail-wm0-f68.google.com with SMTP id o78-v6so10152855wmg.0 for ; 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=MnTh7J7BLV12cm8LNgmiyN3mftZXrMnSzPKTm8n3GGKeK4b7+VBdFTp2aM4/6WGnNG o6Kv971PF9DL266f6qTlUDggvqTIBDHFnmPtqbVyXl8MVnzqlTnvnD59pphrkaHtbrBi grSCOeHhAh+OVHeCLFh7KKHzn2g6ZDa8UtNRI0+ioWFZZjVdshUbQE6r34D8Vdt/NJPM GQNQGd0h0rKqywLjtiWgA8145HHYaRJ1k1EroWCUyVphUcpxO7puC+75Z3hDYvUoQLUn gO9qKy5e2i82lWs2EKe/VmVVutU06+WKyqkBxdG39H9Lg9G41uCr1lCoPVmLvwNJpKAH LCPg== X-Gm-Message-State: ALKqPwdc/qvgen4xg74CBBN5aEcPSvSTjE2u8NVvoTslw8x33CVwCZM6 f4EN0Fkg/gDL3SSnMjzYboOI4w== 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 To: agross@codeaurora.org, broonie@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Srinivas Kandagatla 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Srinivas Kandagatla --- drivers/soc/qcom/apr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.16.2 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; }