Received: by 10.213.65.68 with SMTP id h4csp3633597imn; Tue, 10 Apr 2018 02:03:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx48nbZKkH04kiHj6MI4EZLilIKfikd+3mOvzdxDezpAawEmwkMV2k7HkmnPt7hj07BUuk7d5 X-Received: by 2002:a17:902:6f16:: with SMTP id w22-v6mr8636779plk.166.1523350980940; Tue, 10 Apr 2018 02:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523350980; cv=none; d=google.com; s=arc-20160816; b=wDG7Oah07Tk6gOiNHcrYJOwQlj4Yiysm841vHbj7m2RNQLLx0btq5eHx4bkBx4CaaN 7Uv6yzJdRpk8CJQgy3Lo6w27DDVVbXERCJpQ14UnSNH4w/XXGo9eO28aHBOk19zz9l4P sqt6deZ5zfluHbb355rFlxRi8TM0YQiOcVzHw1a55akImeUOUeAhmXeD/HAA4GmZ/GPj 1nFULYrVlMe0Vsko/A5VFo6YEpKhGT6M5cRdH+9AxpbY8jumxLBTgvJbU/NP5Za4mQ4r fjUg9tFljX8HYIyRtoUa5+TLAQpNIvP0oKzwZbBdPNlFJeww24NWViVkxFCHEJGNOcq3 /ytg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=lNIxAiMfRY0GuERxvMpgFkta6IT5RoaXzl+ppkON7Dg=; b=FOYXuoU9IJaYq5jQmJrKmOqcJhHryBLntSuKOXuGK/yi1dUX6ewg8qiEfbRYj9FyY2 gkqq0AkHnPIxvK6dRf/OWSh/yn+CWAIZ5gzJnhom3rjFeP1HKd+JjRYHLLMF2qwXpuic AtaQ+eY2/QcOwCk9jqfDfE8dwZGgEI7lfagxwAJv8mKv1KxQdgKGm3YjfH8bKh6fIPep BaPJ254FjmmJuqLGMcu33CIrurf6pKS/crZUxq9fApxA+bDNmslIRXFND5A+dYIMsSTj BmM7G5UWdIho2ZrMbqKS0X/WiwwrUMMXtd6wocSrvxwrT+9YTk7QqFh91vqHsMfg9VHa bKlw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7si1639335pfh.395.2018.04.10.02.02.23; Tue, 10 Apr 2018 02:03:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbeDJI6K (ORCPT + 99 others); Tue, 10 Apr 2018 04:58:10 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:14026 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504AbeDJI6I (ORCPT ); Tue, 10 Apr 2018 04:58:08 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w3A8s8IQ029489; Tue, 10 Apr 2018 10:58:06 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2h6krr7afj-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 10 Apr 2018 10:58:06 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E57C33A; Tue, 10 Apr 2018 08:58:05 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C91D01D84; Tue, 10 Apr 2018 08:58:05 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 10 Apr 2018 10:58:05 +0200 Received: from localhost (10.201.23.162) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 10 Apr 2018 10:58:05 +0200 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen CC: , , , Subject: [PATCH] remoteproc: fix crashed parameter logic on stop call. Date: Tue, 10 Apr 2018 10:57:25 +0200 Message-ID: <1523350645-19073-1-git-send-email-arnaud.pouliquen@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.162] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-10_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix rproc_add_subdev parameter name and inverse the crashed logic. Fixes: "remoteproc: Pass type of shutdown to subdev remove" Signed-off-by: Arnaud Pouliquen --- drivers/remoteproc/remoteproc_core.c | 4 ++-- include/linux/remoteproc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 6d9c583..a9609d9 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1163,7 +1163,7 @@ int rproc_trigger_recovery(struct rproc *rproc) if (ret) return ret; - ret = rproc_stop(rproc, false); + ret = rproc_stop(rproc, true); if (ret) goto unlock_mutex; @@ -1316,7 +1316,7 @@ void rproc_shutdown(struct rproc *rproc) if (!atomic_dec_and_test(&rproc->power)) goto out; - ret = rproc_stop(rproc, true); + ret = rproc_stop(rproc, false); if (ret) { atomic_inc(&rproc->power); goto out; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index d09a9c7..dfdaede9 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -569,7 +569,7 @@ static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev) void rproc_add_subdev(struct rproc *rproc, struct rproc_subdev *subdev, int (*probe)(struct rproc_subdev *subdev), - void (*remove)(struct rproc_subdev *subdev, bool graceful)); + void (*remove)(struct rproc_subdev *subdev, bool crashed)); void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev); -- 2.7.4