From patchwork Tue Jan 2 17:54:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 123191 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9238427qgn; Tue, 2 Jan 2018 09:57:27 -0800 (PST) X-Google-Smtp-Source: ACJfBoum/Zcea9/sVF+h76W/OcntjG2I6uPxJgTOGm+hNrKHLVV9jbo0tIwSP19cfNXc7iyLNDdf X-Received: by 10.159.198.76 with SMTP id y12mr14989715plt.257.1514915847691; Tue, 02 Jan 2018 09:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514915847; cv=none; d=google.com; s=arc-20160816; b=k9V7OMr5ugXvco1q2GQwr3IlpFybNUqgPRKUP8ntKLPK3vCIzyLUrQEVdfqVT3fq1l hdRNLI/H1FvJpDeB1M5l6u+DIkSENi2sRTtWV+5sQvubuCKCqmzpZBdTyWZT+bkPmxak MjcXPN+qvoWB6P+XwF8vie69cgKdwpo9fEsi4CugHE01owiW9xLzoe23vTjkQS1VAl98 9PNrSk0iEjdxiv7C0ssPWhCOgRSTBS3/gxg0+IN4FMWhF2cjrDbUx4bh2px4kXiLJRfI 051S4RlaJTQFjqCNO00u7SAydi3Dnx0/Fx4xS8tjWez7+8LD86TxMm2ixXHwV9WoLiu2 UiNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=S+Lokw1NgBQYSufdQ0F7srF7bNhmG3TyvfOC6IG2eyQ=; b=fqp/10dLyEPXfhEsxjnjbIU9I6/Ra7RJq8zuEVi2CxAZ2SkFzUXZKSuwBAsfqzCCib UiibPG27zuS3D33/Vtv3/eqdsKA0qTxaS6BgyL8AX3ovrxRZCKcjg3LdySlBBjaAa5GY HFSqiaoI1Vhck2JYOpPmHo5dfrelB4tAyjRtszq5mKaQOIREDqbTqWxTYKp1ofLO93Nu jYf3rIa2oDxVIPz7MRojyJnMr8RveDgKj/RaiWXr64uL5pbGkK2utkASlYLua4TwZNct lOV8HaoIT7pl9N9xwcHCPXPmdkOrgfqeXUDM+UjgmBZg6qRjdkBr9xqR3Nf8S+EbfUov 7fkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VqxKAbyL; 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 g3si113212plp.124.2018.01.02.09.57.27; Tue, 02 Jan 2018 09:57:27 -0800 (PST) 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=VqxKAbyL; 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 S1751459AbeABR5Y (ORCPT + 28 others); Tue, 2 Jan 2018 12:57:24 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40918 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751081AbeABR4h (ORCPT ); Tue, 2 Jan 2018 12:56:37 -0500 Received: by mail-wm0-f68.google.com with SMTP id f206so62047318wmf.5 for ; Tue, 02 Jan 2018 09:56:37 -0800 (PST) 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; bh=S+Lokw1NgBQYSufdQ0F7srF7bNhmG3TyvfOC6IG2eyQ=; b=VqxKAbyLkXPYQG0XpAOsHA5/EEZTaHsHhxVsL9bBkL0pkpV8cTRllqxpo5yZ3Jv4GK vP2YdcnhRK41RmfBh4Hr7bVyoDRkYmjroRrlkFosZQ5mT+w4C8DnqGCvsHxZbZFdYwxS vtNDJKorShKnnCI8B5+Na6v+31yvbmTHbcHQ4= 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; bh=S+Lokw1NgBQYSufdQ0F7srF7bNhmG3TyvfOC6IG2eyQ=; b=c3F1L2DPFQtGgpGgAgh/fFNRc76S9YvIZWb7ul1gwWnkN3yZkRNa/HRnprlprG4shN iV5Kb93xM1NMTgUZN+8zvo61ZNAwyUE+eUfB7Rcz4aCU6FDNTCISiyi80ZatKVuUfM2G osprhrLMjkLrQKV+NdZ865qt+D/2PkJPsVm4YKu3tbAUuVHgNQtFCjc6pTCk51nUWi2U QimQ0ADkLupUyk0qDESJhAiVthaHXTtKX2HzHYWiJ3K2FOmB51SlzZaeuwnEZsMYkJM5 OEHcTE0IoNB39mk8I+kTyG31J6tcl4V5i45LBQDmZJFDLHlPjSkWbwLQpRUJ9k9HW3Bj svOA== X-Gm-Message-State: AKGB3mILZRmtCj/ZACp/DTSKoLPGCZQscA1LWcv0usjk0F9xayaBkf7x HJmuCL3dH3c6tuCXO9W1MIPC4w== X-Received: by 10.28.88.137 with SMTP id m131mr37336304wmb.48.1514915796515; Tue, 02 Jan 2018 09:56:36 -0800 (PST) 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 u54sm21895240wrf.77.2018.01.02.09.56.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 09:56:35 -0800 (PST) From: srinivas.kandagatla@linaro.org To: Greg Kroah-Hartman Cc: sdharia@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Colin Ian King , Srinivas Kandagatla Subject: [PATCH 3/6] slimbus: make functions slim_ack_txn and slim_alloc_txbuf static Date: Tue, 2 Jan 2018 17:54:21 +0000 Message-Id: <20180102175424.14391-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> References: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The functions slim_ack_txn and slim_alloc_txbuf are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'slim_ack_txn' was not declared. Should it be static? symbol 'slim_alloc_txbuf' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ctrl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.15.0 diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index 2d67419a3c37..8d12baae4119 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -146,7 +146,7 @@ static void *slim_alloc_rxbuf(struct qcom_slim_ctrl *ctrl) return ctrl->rx.base + (idx * ctrl->rx.sl_sz); } -void slim_ack_txn(struct qcom_slim_ctrl *ctrl, int err) +static void slim_ack_txn(struct qcom_slim_ctrl *ctrl, int err) { struct completion *comp; unsigned long flags; @@ -299,8 +299,9 @@ static int qcom_clk_pause_wakeup(struct slim_controller *sctrl) return 0; } -void *slim_alloc_txbuf(struct qcom_slim_ctrl *ctrl, struct slim_msg_txn *txn, - struct completion *done) +static void *slim_alloc_txbuf(struct qcom_slim_ctrl *ctrl, + struct slim_msg_txn *txn, + struct completion *done) { unsigned long flags; int idx; From patchwork Tue Jan 2 17:54:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 123192 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9238609qgn; Tue, 2 Jan 2018 09:57:40 -0800 (PST) X-Google-Smtp-Source: ACJfBouYVKN1knqeJa1i/Ps8mv/+TfHJZ9GvnNbqSEo9VQDkyXtjtzez+fXzMJuK8YVaWBAIvXBt X-Received: by 10.84.160.226 with SMTP id v31mr46501534plg.9.1514915860140; Tue, 02 Jan 2018 09:57:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514915860; cv=none; d=google.com; s=arc-20160816; b=tMcNINK5t4XQBhU6pbSGU6zzmBICKDLmHlJf21Y5BXv/qrhmSqLNU7o6rq6DGiYcT8 6FTbjQy2qvxegBtsEUl0h9GE7rWAFBrNGKGdXrxnqnVNOUV8tVFmm6/d6PxIhd8qmump fUpdkbcXiZPsYAcKqXNG8z13xu7aSejhdCqxxXt+/p5xWYm6Jfhv+eOzTnUubNsvuw8R uCM8N2kwiM3YtSe4wsO/fRh+8cxM++AdQ0WgxNG/j5SlSVax/tQBMgTF+naGWY13p0pX 7ckdKg6AQJR1t2gAEn1fA3lLlzk9MjK4OcKwwZoyAWZsi92SWEbgCxeWW+pqkR5cLS77 r+jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=c9jAmUnS2LiDwzPdy/5weNVvj+mk+ERw+kDJcWKrajs=; b=IW2ygdiqBKW+c7VIGunm4WEca9BLUY7Ftu97oRxrOnJpFv5gXChHeFKPNH12o8hKjf 4Idqg3Y/W0ZWl/nkhzWCDXIoiUbyDCbgZAQhQoYRwba6s+82bJYTre5+Nu/04J708VFO 0XU9SuF7Rrok1gi4lt2FMi1ZOBeVV9fwZFBOjmFkc6R6BDdCJJIBCPIRwtwuC+Y6kvIU T7g+XYE2yuktf/8CLQqZAHTr61oFW3XwLDaqEHQm3EKCNtRTWaUKC/C3th1PbaSuu+Mj na3GUlfmb+bVbm+YGB4GIARu3R/CelG4v1QD2hHrN3oo3agEdi1b5bmHcem9w6MuPYuu 9bXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NOHcGe5f; 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 bb8si1312245plb.287.2018.01.02.09.57.39; Tue, 02 Jan 2018 09:57:40 -0800 (PST) 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=NOHcGe5f; 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 S1751416AbeABR5X (ORCPT + 28 others); Tue, 2 Jan 2018 12:57:23 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:43283 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbeABR4i (ORCPT ); Tue, 2 Jan 2018 12:56:38 -0500 Received: by mail-wr0-f196.google.com with SMTP id w68so36837387wrc.10 for ; Tue, 02 Jan 2018 09:56:38 -0800 (PST) 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; bh=c9jAmUnS2LiDwzPdy/5weNVvj+mk+ERw+kDJcWKrajs=; b=NOHcGe5fgu+PEDQd9fYH8G5sn9v7Ba+UHfu5LdVUf8mwKXLnmeb+52Tkim4W92p/9B 0NKjjr13ckjFZ1O6OGe5+V3D3zY8QzSX1Fg9qMz/fk2dNLcCYjVY27iv0LObM9a3UDAW WVrMZXmGpbj41wQSdtypLSEiO5qusXX05CILc= 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; bh=c9jAmUnS2LiDwzPdy/5weNVvj+mk+ERw+kDJcWKrajs=; b=rE/C23bhawRdmB4KOHpAybhLUvaW3xs5Bbu/XM2brsZc5vW76Ey8tYUoNuZGBwcViN aR1tPCsiiJ6S3L15hBV3/Rxp9Kd7A21QRyq4QBK4O9FQog9qlWOJ4TD9l32o5or1bFDP HOXqbftArP3c8dDl1XXiAaF7PChMbmaWALZSul85vUYnXoUTXVNQhhWswNKhcH0hzBPr 5Cz15kgeA7xyVuAUEvcNbL7aOhSrL5BwvZBs9ewGewH1huuEFdVIFcTXOWGWz/PsXkX2 fpjPnFSJZ8retsP8NjZjv6Pg3QnZuMpbRimyeWb+XQzhZA/bXr43xRI0jSvlHejvImm4 uOcw== X-Gm-Message-State: AKGB3mIqi0dh1K+Q3WLayXmHMmyJWPJSQmSzn3RBd9RJMnic4l0Nbgde PYeAbbwUmo8mAt7Q3X3Vtml+WQ== X-Received: by 10.223.139.152 with SMTP id o24mr48623664wra.243.1514915797477; Tue, 02 Jan 2018 09:56:37 -0800 (PST) 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 u54sm21895240wrf.77.2018.01.02.09.56.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 09:56:37 -0800 (PST) From: srinivas.kandagatla@linaro.org To: Greg Kroah-Hartman Cc: sdharia@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Wei Yongjun , Srinivas Kandagatla Subject: [PATCH 4/6] slimbus: Use GFP_ATOMIC under spin lock Date: Tue, 2 Jan 2018 17:54:22 +0000 Message-Id: <20180102175424.14391-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> References: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun A spin lock is taken here so we should use GFP_ATOMIC. Signed-off-by: Wei Yongjun Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/messaging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.0 diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c index 8b2c77f516b9..a9a6dc4af0da 100644 --- a/drivers/slimbus/messaging.c +++ b/drivers/slimbus/messaging.c @@ -98,7 +98,7 @@ int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn) if (need_tid) { spin_lock_irqsave(&ctrl->txn_lock, flags); tid = idr_alloc(&ctrl->tid_idr, txn, 0, - SLIM_MAX_TIDS, GFP_KERNEL); + SLIM_MAX_TIDS, GFP_ATOMIC); txn->tid = tid; if (!txn->msg->comp) From patchwork Tue Jan 2 17:54:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 123190 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9237974qgn; Tue, 2 Jan 2018 09:56:59 -0800 (PST) X-Google-Smtp-Source: ACJfBou7iZ15/87W6cWzQGN6GIyuPSHh1o2DFH867/7QJUD68fK27UcasGIqundtlDoEGg+kI2xY X-Received: by 10.99.127.29 with SMTP id a29mr39440023pgd.3.1514915819603; Tue, 02 Jan 2018 09:56:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514915819; cv=none; d=google.com; s=arc-20160816; b=eJKHGgw2X8AinLc0RedeGT8Ah0Jtias0fL7DtRc0lqElqtYncHFiD8pREdhp+SfPou fF/MgqVBG75ACxvfDwlxOakz8aqxWFJmJhS4HoWovn/J6e2smpbFc1xkcOK8dao4W5Sn ZWXmMWgd0RydK8EKklA9+xARbKTjxTgHZO+o/qyEoWqJqqjO2YTa8DeiKf4rfqUdUBac z/SA1Fzdc4T2z2ggSLhGnDhY2pIYv+WWiz2048YU+/rxiZLJGfwdXqGeU6Nh0wjEA/JD 33F05k8Bmd5Tq4azs92KFdZIRzJxKiKW5//0yY5RXR4AwSTmOda+Mye1G5u9HUiDWO4y iZkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=sgoBP8nCXf6MzED4mB9DqU7pHqDhM7VbkAjm17OCSkw=; b=eAmNq8ZP7VKsbGfCW9w69OqlFxMT+zNkWo5fsZ46kgjBocIQulAEGPLOFEkN9JnyBd hlJAG32k0UGuhaB1grHQvEXdVZd63sQG6L6m/7n+jkq/J1rz9rMqgW+1uvCAKJolrCmu qlqmfUkFuMY76sS9roS3X04SRGw/kvS76f+bzWyRTrJF8P0SJyE4tZk49RcCj8jaVwRY 6q5vhmySfHZuDlftSFu0d/Dwbp2iJP3chXmq7UMRX2YfW0xgicVDo7fB141MB6bXFk+Q X2UrD7tP8G2OD/CGIsWVEQKWZ/AY4uoGg/R8dSp2TT2H/2UvXU5xbfS0v6/j28m9nQyv eJzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aEWM6qad; 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 o20si34656789pli.279.2018.01.02.09.56.59; Tue, 02 Jan 2018 09:56:59 -0800 (PST) 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=aEWM6qad; 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 S1751355AbeABR4m (ORCPT + 28 others); Tue, 2 Jan 2018 12:56:42 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:39872 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbeABR4j (ORCPT ); Tue, 2 Jan 2018 12:56:39 -0500 Received: by mail-wr0-f196.google.com with SMTP id o101so20619144wrb.6 for ; Tue, 02 Jan 2018 09:56:39 -0800 (PST) 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; bh=sgoBP8nCXf6MzED4mB9DqU7pHqDhM7VbkAjm17OCSkw=; b=aEWM6qadGvm3LAcxrwG/E3dBjwaYI406hvOmHztttYU5jyexx5lxCG2wane9KKdbm+ aI6RJIZiaE4+ezfd2lH6+QWPDaerzsbVkJj4VTi6xRGArONfqEs6bH4pZDDZkwBN9X8Q eBCRwzdGtLLQtZDX2L0VicSsTxiGOlOFZ6SOQ= 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; bh=sgoBP8nCXf6MzED4mB9DqU7pHqDhM7VbkAjm17OCSkw=; b=GlK5U7ZveIQISbk6IZ6/tUhEfMohmu+lMm2TYacyXzoyjo11K8LIcDT8mNbv36a6Pd obkjrM3ujgxKTvqlfG3S93RLEcHM3wPbCdRcNYjRCfrrDJfj0Xh0m4K8SIDNFqql9oFf XyHQ3dOfhetjI7N7V4/PBnULNvqpNVBhlGFMxJBntkXEOKKm/CbQH1TZhMAhHBt9W402 c/VRUKfRtEcT8ykmelXcQC1tNDmWjxo7e8x5TOd3Tvhr1JVatylAPstITTklfTHAEJ0t O0bHambykDQwKawK6cyU0oB4oKi0Kjn7stw4rgx7WDRMkQG53Elnr5QnbTSfHR2pnida AzTw== X-Gm-Message-State: AKGB3mK1sGun3taKIhGebhqrZ77+hLxqYDFNClBOMt1oNG/F79+mos6M DE2/Qvagjx6IdsiL+XSfb3b86aLt9ko= X-Received: by 10.223.154.112 with SMTP id z103mr48129031wrb.210.1514915798573; Tue, 02 Jan 2018 09:56:38 -0800 (PST) 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 u54sm21895240wrf.77.2018.01.02.09.56.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 09:56:38 -0800 (PST) From: srinivas.kandagatla@linaro.org To: Greg Kroah-Hartman Cc: sdharia@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Wei Yongjun , Srinivas Kandagatla Subject: [PATCH 5/6] slimbus: Fix missing unlock on error in slim_msg_response() Date: Tue, 2 Jan 2018 17:54:23 +0000 Message-Id: <20180102175424.14391-6-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> References: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun Add the missing unlock before return from function slim_msg_response() in the error handling case. Signed-off-by: Wei Yongjun Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/messaging.c | 1 + 1 file changed, 1 insertion(+) -- 2.15.0 diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c index a9a6dc4af0da..884419c37e84 100644 --- a/drivers/slimbus/messaging.c +++ b/drivers/slimbus/messaging.c @@ -38,6 +38,7 @@ void slim_msg_response(struct slim_controller *ctrl, u8 *reply, u8 tid, u8 len) if (msg == NULL || msg->rbuf == NULL) { dev_err(ctrl->dev, "Got response to invalid TID:%d, len:%d\n", tid, len); + spin_unlock_irqrestore(&ctrl->txn_lock, flags); return; } From patchwork Tue Jan 2 17:54:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 123189 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9237848qgn; Tue, 2 Jan 2018 09:56:50 -0800 (PST) X-Google-Smtp-Source: ACJfBovgNqL86kXjSpxzZd28D5yAlRJI8YJxCH4uR7Hggm9k40IyPyX7oYf7qG8Or2UyQAMU2hEQ X-Received: by 10.84.133.1 with SMTP id 1mr13005plf.115.1514915810739; Tue, 02 Jan 2018 09:56:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514915810; cv=none; d=google.com; s=arc-20160816; b=Ph0GnwCnjzWzUr/2Ju5j9k8We2zTzng/OL9w89i6+2r8m8Q+zD/8absL9WSz32qccG CxL0PWLHqT+Jgt8bSMDsewhJdsBzsVDmbCJiosA1Lf06978q6nYriKDBze49mTsQrtwT QYB5XNa83vbw3YHTpoXNEaVO+8GuM4aps/kqKT+rG/CaQYaqcKBplVHDu6uKJ49Xy+dy vVbFHYDnV5dqJLpJbqDU3i08RYe0vnDOeYxUDhYtKuTM61A3rbTuWsO2hKzgRI5Yg572 oHtbsDo879Zg7fBbKzOBGjGmPLVKAExWm5wogD+raAuDiGXgq82nj87CDEy/z6zegZdm rMqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=4JpHUOSScOEZc1VZXOXgPRpJBh6F6eDF8cZV7v4hRUc=; b=BLcGHnnMy1XnFWYB4Nc0wb69ruUYRQB66DPitQOMzb4ClWn4HvqaGKLzNqTAN51Y+p aDQfkq55VVDNw5UlfkEmZMrbpooii7HYHV3ls+1rmAWEwbPXgS0WP4CDMLN2b9t+U/CG QfMt0Pziykh3wyqpVUZK3bEc/Mt/uLE4RO2D720W8TOnaMbxREBgAS1Z157PtmSSq4vS pGHYw7tgLHw7TcNlDeisJoJUeQCuLQ/Lj05WtRwBZ4My/LwhKeVTUBvLvVgiuG5yDkLV EM0aZpxsQPLMOk+VJQIhnaxEunnj9ySn2vh1qYxb9Bu/3JoTgbH1BLFTfAiM45t/M8WL BKzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGde2jzm; 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 n26si2027535pge.68.2018.01.02.09.56.50; Tue, 02 Jan 2018 09:56:50 -0800 (PST) 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=fGde2jzm; 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 S1751396AbeABR4p (ORCPT + 28 others); Tue, 2 Jan 2018 12:56:45 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33809 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbeABR4k (ORCPT ); Tue, 2 Jan 2018 12:56:40 -0500 Received: by mail-wm0-f67.google.com with SMTP id y82so17162550wmg.1 for ; Tue, 02 Jan 2018 09:56:40 -0800 (PST) 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; bh=4JpHUOSScOEZc1VZXOXgPRpJBh6F6eDF8cZV7v4hRUc=; b=fGde2jzmtQpb9EtpFGGo3rbQMglRHF4lWxXk07FJ4tTESZMTnhokskU8jEM/+Ld/Sw VkOr4C/KFmPCtcrCmbHiQ1o4/HFWzYFe8WnTw5m7YmCm5DbVf/Fp+q0Lhg0xq1Ktl8QB IsyO71RkAmaKm3QXeLraCIGH3OanW4OvwzX8E= 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; bh=4JpHUOSScOEZc1VZXOXgPRpJBh6F6eDF8cZV7v4hRUc=; b=BzkHf0WhfpnT+iST7ve5C7s9dUW2aEit9VnUp8hwOL31TjvgWE+Qgzzp6W5heHstTR KwRv4ub/vx15AD0vZkv0u5uHSB9FqrdNxIvRtGjTGORYdY+yUL9JBDBVvb5DxhkPIeqL bxlYnflzm9nEu9HeSvHhD7OoC4fOYNfZzZ2kDaJlDaMIm6WQ191ocv4DenmzN67850Ko Wpmu7YRiUch8txOewG7IxXPJt31EI7FLHMpV10rk8xM7Whm0iXVWV16gLyRKwPuOQ/A+ Szpb/KBMf1QjtdBGa1JkcH8rqhtE+mu+suUYvb9yJL904PMpKXjAMBlVRUS3amD9IOxD s9/w== X-Gm-Message-State: AKGB3mJ8U9g9Q/FAN1tJ4LvyAHM11c6udhMqVwWtvH+uW+VDLld8xWlG zQ3dOyLKm9X7NZxkCP1Jflxq5w== X-Received: by 10.28.19.199 with SMTP id 190mr33843715wmt.87.1514915799444; Tue, 02 Jan 2018 09:56:39 -0800 (PST) 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 u54sm21895240wrf.77.2018.01.02.09.56.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 09:56:39 -0800 (PST) From: srinivas.kandagatla@linaro.org To: Greg Kroah-Hartman Cc: sdharia@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Wei Yongjun , Srinivas Kandagatla Subject: [PATCH 6/6] slimbus: qcom: Fix return value check in qcom_slim_probe() Date: Tue, 2 Jan 2018 17:54:24 +0000 Message-Id: <20180102175424.14391-7-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> References: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.15.0 diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index 8d12baae4119..ffb46f915334 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -529,9 +529,9 @@ static int qcom_slim_probe(struct platform_device *pdev) slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl"); ctrl->base = devm_ioremap_resource(ctrl->dev, slim_mem); - if (!ctrl->base) { + if (IS_ERR(ctrl->base)) { dev_err(&pdev->dev, "IOremap failed\n"); - return -ENOMEM; + return PTR_ERR(ctrl->base); } sctrl->set_laddr = qcom_set_laddr;