From patchwork Mon May 25 08:48:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Laurentiu X-Patchwork-Id: 476111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9F940140129 for ; Mon, 25 May 2015 19:03:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752080AbbEYJDT (ORCPT ); Mon, 25 May 2015 05:03:19 -0400 Received: from mail-bl2on0119.outbound.protection.outlook.com ([65.55.169.119]:15487 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752003AbbEYJDS (ORCPT ); Mon, 25 May 2015 05:03:18 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Laurentiu.Tudor@freescale.com; Received: from [10.171.73.193] (192.88.166.1) by BY2PR03MB314.namprd03.prod.outlook.com (10.141.139.19) with Microsoft SMTP Server (TLS) id 15.1.166.22; Mon, 25 May 2015 08:49:07 +0000 Message-ID: <5562E1E7.4000002@freescale.com> Date: Mon, 25 May 2015 11:48:39 +0300 From: Laurentiu Tudor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: , Alexander Graf CC: Laurentiu Tudor , Scott Wood , Caraman Mihai Claudiu-B02008 , Subject: [PATCH] KVM: PPC: fix suspicious use of conditional operator X-Originating-IP: [192.88.166.1] X-ClientProxiedBy: AM3PR04CA0092.eurprd04.prod.outlook.com (25.163.180.146) To BY2PR03MB314.namprd03.prod.outlook.com (10.141.139.19) X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB314; 2:rdJGVUTiL0P/S8TkMxBruDX58/NhOypsCg4LntysMf4MkZwQ4VeJmG9Llk/FEDUF; 2:PJ/BibcIT1/AUH1noZb+JRyiBETxuUTMJa3yQi/J98aObzlO2UFn8vphDoErDeix8Zhpew8xJP5ElH5QInd41xdwh6G2C3VD8hw1vGYuKU634Mfn4Nd/5johps0YCkTdH+ySAwMNnhbLHhQJRWxgeA==; 6:ajtxJcks9Tk02jtZuIVkRIGNKEnoVPYH1olfPhweauILaInajqtvRM8VS4l3czXhEToawZ2geghgbMwAMdEqdvPbBRXf4D2x/cjr3ZsD7ZkmoqhzU/fDv+69b5N3VO6igkbmx029ak+aTpAemUTIBpY/PuF6iyHTzQRb0hOZgfrMmAeKbGPHMgXtRsMhm670sCgld3XMJUvar0mudKgdGCFgtDD5cEZ55t2ajPoLEvSLF7wgkdFt6TZs09daRCmU4MPyqxYsRWVMotNx6Xp39nqAh2R1Oi1KoKMx/dzCppP7PNmwnSfdf9ZUbYOIUDAZrQO36TULrbL5H3D8mT96klWRJBOh2OumeuIkKMfyucX3vpM4CKRZqIaGPj+KhldA6BLTacFk2LPJl4T3IenJE6lzth+WBzaMF909GwXvvCj21oT2Gf/7QvuXpoP25V131MYXW2JthVk4BgHK+EtiZ/cY9ReqQ8iJZozWI+dyJ8VLGHmM4AXmACr211FljXsyF4oxuP8eF1xH32hFH4WWWry0/i7fuP2hY52hpWxVowT3oYlIq30Cfjk07EdQ4A6FmVQuIp6czOfB68+P4dcczHPmy+6d6rMAJevNkdjRSGA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB314; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520002)(3002001); SRVR:BY2PR03MB314; BCL:0; PCL:0; RULEID:; SRVR:BY2PR03MB314; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB314; 3:Fi5tV1pS5Hjlha1TV7fwDqMKFBhS7TAQ12h3O79M9P6xJyu+6hWjCw/yy9D90grn+NcmjFhXRMm3AIUDSzUljph3xxBn9JkKqJ6sk405SSg9OWkFRm105DFIr906luCIDtGw7bOTnRWiR0paBzHcLoLzFfua202GgaiHDs8K/mt/kd096+PFSWkYZK/Jd8WqkCeAJubRlwud5SyCRlWoH+cvBL4mCI+aPMS8TQKGF16g9lBSbUPmjxLxhA2Dt1gdbF2zZu+OdK33r/qLwCiYu0nM0PhxkN7xl3+jiSwSSGJ7U2qy8X5/7Dn//+2v3Afv X-Forefront-PRVS: 058707456E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6049001)(199003)(189002)(77156002)(229853001)(42186005)(36756003)(23756003)(46102003)(101416001)(5001860100001)(50466002)(92566002)(64126003)(65956001)(66066001)(47776003)(68736005)(80316001)(5001830100001)(77096005)(83506001)(64706001)(122386002)(5001920100001)(4001350100001)(50986999)(59896002)(62966003)(4001540100001)(54356999)(87976001)(19580395003)(87266999)(19580405001)(65806001)(106356001)(5001960100002)(81156007)(5001770100001)(97736004)(105586002)(33656002)(65816999)(189998001)(40100003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB314; H:[10.171.73.193]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: freescale.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1; BY2PR03MB314; 9:/xEP4K3940ePqvURIp/yL5pcJXSHE0lnho4m0Bet/?= =?iso-8859-1?Q?BSUqxknF/c3IEdSqkojy/MAPt9VxyoIJQl7EKwLzVXKZffv1JFtUbSvfpO?= =?iso-8859-1?Q?yqq/o7KbXg686ofhaP3iH0bO0zxTkKRLaLm/ke51+fpW/vzvR/7jtCYEpo?= =?iso-8859-1?Q?R05L5J5ZL0LsMufilwMOortN0DXIq3N7Ncfq+B8oNisQdG1tAGUU60EqP/?= =?iso-8859-1?Q?HScwod2VkC751PDEcsmX5YxUTmFfvFs8g2zERJ6YdwVC8WsTfb/V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8o4J3fPnXz0RTTvWaF8j+DsnpVv2R4ZRH85nkhq8hy?= =?iso-8859-1?Q?oogBv9x2qzYDCZvS9qiJH9i7Xl7z7z04eiB8Kr3CJMeB36Rt3P0pyJljkI?= =?iso-8859-1?Q?oniY5j18fhwFgFc0u2qQj4GBTmRuUOmiUC0D0mpr+bryBMV3Tsx/aCba6U?= =?iso-8859-1?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB314; 3:CCfCbIAKxKQ3ry89YT60CORMrxvQnYdjC9SznJgqywb4LtQIRVLAr2FZ8vFyl5M6EVEclXdQu12jdhWpM0Tcduu+VWUkE8i5y1IUCaaP1zPkQ+BegQVa0aepXpeGQpPxLAJEzSk1gbED+GjMu4yvig==; 10:JVDsaG8cFZIpJyma0PcMKmGkrO51i02I7aJ8qhh5ES2vplc1U3gJTV/JshDk6KVCM68BI0tnBvXyMPsua72GF7HOqGprccjpj/AmkbK2P0c=; 6:jp7GbzMQZfs09shu7iPcFKmv3cU25CusWjpPHpSbqbWAFumS6xsb5yXppDbpeYDR X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2015 08:49:07.8699 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB314 Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org This was signaled by a static code analysis tool. Signed-off-by: Laurentiu Tudor Reviewed-by: Scott Wood --- arch/powerpc/kvm/e500_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c index 50860e9..29911a0 100644 --- a/arch/powerpc/kvm/e500_mmu.c +++ b/arch/powerpc/kvm/e500_mmu.c @@ -377,7 +377,7 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, gva_t ea) | MAS0_NV(vcpu_e500->gtlb_nv[tlbsel]); vcpu->arch.shared->mas1 = (vcpu->arch.shared->mas6 & MAS6_SPID0) - | (vcpu->arch.shared->mas6 & (MAS6_SAS ? MAS1_TS : 0)) + | ((vcpu->arch.shared->mas6 & MAS6_SAS) ? MAS1_TS : 0) | (vcpu->arch.shared->mas4 & MAS4_TSIZED(~0)); vcpu->arch.shared->mas2 &= MAS2_EPN; vcpu->arch.shared->mas2 |= vcpu->arch.shared->mas4 &