From patchwork Thu Sep 14 15:51:11 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: 112579 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp943347qgf; Thu, 14 Sep 2017 09:23:34 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6MtirNaHNRw7kfg2FxT7XN1wREMfEeMgGoFXEgGPPTknInTX+49CjZpcImMS1V0oar2l43 X-Received: by 10.101.77.4 with SMTP id i4mr21983443pgt.119.1505406214795; Thu, 14 Sep 2017 09:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505406214; cv=none; d=google.com; s=arc-20160816; b=PZ8eV2rwNZ9FLyvRJiG+8hvp20/iea19//t80RAPtWFvQvWhhQHrfuFWUoB9tczbBs SpOjOPifPGkGq6Me7VUWZAdt67q7wqyOyx4RmbvP2PH0tMySqGURGyha9fUiCnO/W9Sv /dYhVvOTBc4qWwEj3p5uBT2Y5zJWIjqk4F9BS6pT3QK+56exYq99+CwkBOWbDWYGIE3b rBZBDcTBSR5jSth/GhxXHeiEakoQaIm8XwIVOfBG+h+iuHfvayUy9EnlEu0/d6m393J3 8OCbDQu9qlurLwKY/G6AB5mPUDOZ3pdVGAcSvyP2/6ZNXfmY1KuyjYCsI3U9SCYHIarB Lggw== 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:to:dkim-signature :dkim-signature:cc:from:dkim-signature:arc-authentication-results; bh=NddrKFDrI7erpBBDH26JtzIg5y4Ou7gE758BPkEMXfE=; b=M/ALnAC4SXRn+DeBw4GWi7sZIM8ke3AgpEU7L/QdroVpsawhbReo2c2zjxyhkK/t5y BWgBSx/0mdg+Ty/gpNfld9BRlVkkHsGrlaqg4GGa5iX5L3WfjfKcJIgkQzWKmLcY3O9m LwW9FWEn6ty2VVVNwBeVkOFw58IwY9lVEFuxHvHLfHzDIuWUobDYFfCoadPzd3OHVQW9 SyuceFgqY3NKwKOECNU3NEgypiMybHkVS8GpNTOHQZq/Ea2FS9NVTJaVsssAgm7Sf5Eh ShTkpC2p+TlXToeSw8wauTDeeR8DSsh2XoW2BvhCzSaY3BNOLQwiS2JZgRYdLk8x/Iqd TpwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=mz90YnRW; dkim=fail header.i=@verizon.com header.s=corp header.b=m39plNVq; dkim=fail header.i=@verizon.com header.s=corp header.b=m39plNVq; 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 o19si11290948pgk.236.2017.09.14.09.23.34; Thu, 14 Sep 2017 09:23:34 -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=mz90YnRW; dkim=fail header.i=@verizon.com header.s=corp header.b=m39plNVq; dkim=fail header.i=@verizon.com header.s=corp header.b=m39plNVq; 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 S1751878AbdINQXc (ORCPT + 6 others); Thu, 14 Sep 2017 12:23:32 -0400 Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:7281 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751463AbdINPwQ (ORCPT ); Thu, 14 Sep 2017 11:52:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505404336; x=1536940336; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=DAPoxS6wzmi01pRQQUCfEL5YurCzoG/LqHlBAFeO1u4=; b=mz90YnRW7Dk2bVtupZ9jM9x1QYBAoJjx2fsPdyjSG5lQmFbeJvlop8O2 3rb+bbArDCNfKVGO8FugueNTXjX/PCa3ZOt2N0a3dYwrVEQFL4MzCltXi f/RoKrJVDUW+/HKVSZ/bCPbcOPhFZI2iaJ3Q6tZ1vAnQPfRBYorfEf2bb 4=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe02.verizonbusiness.com with ESMTP; 14 Sep 2017 15:52:09 +0000 From: "Levin, Alexander (Sasha Levin)" Cc: Jiancheng Xue , Philipp Zabel , "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; 14 Sep 2017 15:51:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505404300; x=1536940300; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=DAPoxS6wzmi01pRQQUCfEL5YurCzoG/LqHlBAFeO1u4=; b=m39plNVqjltoUADkRqH0bai74+706TxdIiY8rkGGBQZYuXNOtrrXpjpa z/Qb3X9cH/oIUDWw/LCE89uySkxRSB9Co/rZxAHaejtYMUCZ1n94rv2tT jZ/TwlcJfCiEf53iSFhGzvYzPH86dDrBnH2M+wmfYpoQjX6CzYmFZ/Euj c=; Received: from challenger.odc.vzwcorp.com (HELO mercury.verizonwireless.com) ([10.255.240.24]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Sep 2017 11:51:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1505404300; x=1536940300; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=DAPoxS6wzmi01pRQQUCfEL5YurCzoG/LqHlBAFeO1u4=; b=m39plNVqjltoUADkRqH0bai74+706TxdIiY8rkGGBQZYuXNOtrrXpjpa z/Qb3X9cH/oIUDWw/LCE89uySkxRSB9Co/rZxAHaejtYMUCZ1n94rv2tT jZ/TwlcJfCiEf53iSFhGzvYzPH86dDrBnH2M+wmfYpoQjX6CzYmFZ/Euj c=; X-Host: challenger.odc.vzwcorp.com Received: from casac1exh001.uswin.ad.vzwcorp.com ([10.11.218.43]) by mercury.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 14 Sep 2017 15:51:40 +0000 Received: from scwexch12apd.uswin.ad.vzwcorp.com (153.114.130.31) by CASAC1EXH001.uswin.ad.vzwcorp.com (10.11.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 14 Sep 2017 08:51:29 -0700 Received: from OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) by scwexch12apd.uswin.ad.vzwcorp.com (153.114.130.31) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 14 Sep 2017 08:51:28 -0700 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 14 Sep 2017 10:51:17 -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; Thu, 14 Sep 2017 10:51:17 -0500 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH for 4.9 20/59] reset: ti_syscon: fix a ti_syscon_reset_status issue Thread-Topic: [PATCH for 4.9 20/59] reset: ti_syscon: fix a ti_syscon_reset_status issue Thread-Index: AQHTLXFJjx9+uBgL8UmnP2YMMVvzdA== Date: Thu, 14 Sep 2017 15:51:11 +0000 Message-ID: <20170914155051.8289-20-alexander.levin@verizon.com> References: <20170914155051.8289-1-alexander.levin@verizon.com> In-Reply-To: <20170914155051.8289-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 = {