From patchwork Sun Sep 24 18:41:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 114135 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1805556qgf; Sun, 24 Sep 2017 11:42:28 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD6lFw79Gxx4QqZI7rNcDdM3JBtKb/w6EYiik+Vc1KukYF2nMqn1l+/bhSZQt+/RXfDmIaK X-Received: by 10.99.60.13 with SMTP id j13mr5258384pga.384.1506278548686; Sun, 24 Sep 2017 11:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506278548; cv=none; d=google.com; s=arc-20160816; b=JIz1ejrAXFTj0RlGsT4Iayb5EV9D3x+x2HfD2UiJffnDW+6EBJbAcuoR7U6MLr3PLw yE6EDDQ7zq8UrNOmQTgf75rOhyjOZKdopdbFS4PkXfjMTKV6FomOAjXehHrmgBr3QZzc dtN+mKhj4xqYeuY0BThcGHH0LzeKugOa2FWDl8RsryqxB1nlKadnEugEj5fvmK0uXGvV IZBPVh1T/TmA4MWWXWqSNuTHWhmOEMiwJYAxgTMn80g9FT6A4CQWtjfa3JEnQW4a/Lv4 wWcHUGDN1sSMCX9Q0OKP+xXjoSTvc2D2+PwR8DW2y2xzvKR3xVXMAdPWCSOeBnX3kNDx vUkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:dkim-signature :dkim-signature:from:dkim-signature:arc-authentication-results; bh=NddrKFDrI7erpBBDH26JtzIg5y4Ou7gE758BPkEMXfE=; b=zhUOQPYci+ewMi+KUDZVvTexvP8MdT8VWCDi38RA5w6pM1uU/5azYgLclPmp2onvPJ /LGnAetF5esgeGttVyMusbxlpFeaAAK98P3XReMZNUqmsVedATxuhquhtr5P752EBUI9 CYs5ERY3dd3ir/n40l5eYDnl8+r6nZ5AKYm10aAKhEqhNbXpcvi79ufHVfHVrnt00SHn n4bLE+xubohZh+kdz5rxnxxhrJ4ZJDmFuwlb72Aoui5ltYTbaS4r8Lvk+JlUz7lN9zZb X63o2sN8ctHzcYv6TKWzUdI2xR3ih8G8btS5H35mfXyqh6ZHsLXDnSBEG9m1hOIzNUIo se7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=Ol+B9gk9; dkim=fail header.i=@verizon.com header.s=corp header.b=nRuG6bI4; dkim=fail header.i=@verizon.com header.s=corp header.b=NzaR8QP1; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si3003187pgs.34.2017.09.24.11.42.28; Sun, 24 Sep 2017 11:42:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=Ol+B9gk9; dkim=fail header.i=@verizon.com header.s=corp header.b=nRuG6bI4; dkim=fail header.i=@verizon.com header.s=corp header.b=NzaR8QP1; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752837AbdIXSm1 (ORCPT + 8 others); Sun, 24 Sep 2017 14:42:27 -0400 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:7737 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbdIXSmX (ORCPT ); Sun, 24 Sep 2017 14:42:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278543; x=1537814543; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=DAPoxS6wzmi01pRQQUCfEL5YurCzoG/LqHlBAFeO1u4=; b=Ol+B9gk9FzdeUCnot/W51lrjeGs/XG8htg68eCD1v+1mUUmQYFrF23u/ BjV0L1M+yuYFN0LMS88c57gSQX1xR7PBmh5cGN/HJdpjE3Q+6phJk5Cpx 3oAKGxbBW+p7e2OhtZx3doij3bFAQcPYpqmCc8Quqb4H4vAwEx0rRhn4h c=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe01.verizonbusiness.com with ESMTP; 24 Sep 2017 18:42:21 +0000 From: "Levin, Alexander (Sasha Levin)" Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Sep 2017 18:41:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278512; x=1537814512; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=DAPoxS6wzmi01pRQQUCfEL5YurCzoG/LqHlBAFeO1u4=; b=nRuG6bI48NjF/juMpE03tVIjxiuo2uEK8FVXKcxI3/arGhynY0MRc2ui 1aFoF3MkOcvp2i9f+omU+Zpm6LX3aW9GgABH9Y+4qv6KLGBdGryNtOJuI vhS2E8fL7U6WrBe011HtQmbwyt29vh44fh8j6iNbMhBRxcSWKo8kj99gQ o=; Received: from ranger.odc.vzwcorp.com (HELO mercury.verizonwireless.com) ([10.255.240.27]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Sep 2017 14:41:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1506278514; x=1537814514; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=DAPoxS6wzmi01pRQQUCfEL5YurCzoG/LqHlBAFeO1u4=; b=NzaR8QP1G5ytji5UYmbqjuXES6+3UObDe+NUm0jWv4fFrYc1d7ugBma8 Tgsn4ex7m8UbZbJ9P/R3oCfHD/p9WF70Dnl6m1fNpB4sAirdS5kpctTch PJJ3leS2cz5Kvs9Q6aqnkS4i+29C0eoMJJMwQOddL5hc7ebn7osMZeBvd M=; X-Host: ranger.odc.vzwcorp.com Received: from casac1exh003.uswin.ad.vzwcorp.com ([10.11.218.45]) by mercury.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 24 Sep 2017 18:41:54 +0000 Received: from scwexch05apd.uswin.ad.vzwcorp.com (153.114.130.24) by CASAC1EXH003.uswin.ad.vzwcorp.com (10.11.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 24 Sep 2017 11:41:50 -0700 Received: from OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) by scwexch05apd.uswin.ad.vzwcorp.com (153.114.130.24) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 24 Sep 2017 11:41:50 -0700 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 24 Sep 2017 13:41:49 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Sun, 24 Sep 2017 13:41:49 -0500 To: "gregkh@linuxfoundation.org" CC: "stable@vger.kernel.org" Subject: [GIT PULL for-4.9 19/96] reset: ti_syscon: fix a ti_syscon_reset_status issue Thread-Topic: [GIT PULL for-4.9 19/96] reset: ti_syscon: fix a ti_syscon_reset_status issue Thread-Index: AQHTNWTDi9wbp8Mh40uKxSR2nHtPyw== Date: Sun, 24 Sep 2017 18:41:41 +0000 Message-ID: <20170924184130.29445-20-alexander.levin@verizon.com> References: <20170924184130.29445-1-alexander.levin@verizon.com> In-Reply-To: <20170924184130.29445-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jiancheng Xue [ Upstream commit 5987b4bf512101137fa60c5c0ccac3db51541221 ] If STATUS_SET was not set, ti_syscon_reset_status would always return 0 no matter whether the status_bit was set or not. Signed-off-by: Jiancheng Xue Fixes: cc7c2bb1493c ("reset: add TI SYSCON based reset driver") Signed-off-by: Philipp Zabel Signed-off-by: Sasha Levin --- drivers/reset/reset-ti-syscon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c index 47f0ffd3b013..1799fd423901 100644 --- a/drivers/reset/reset-ti-syscon.c +++ b/drivers/reset/reset-ti-syscon.c @@ -154,8 +154,8 @@ static int ti_syscon_reset_status(struct reset_controller_dev *rcdev, if (ret) return ret; - return (reset_state & BIT(control->status_bit)) && - (control->flags & STATUS_SET); + return !(reset_state & BIT(control->status_bit)) == + !(control->flags & STATUS_SET); } static struct reset_control_ops ti_syscon_reset_ops = {