Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp738758imm; Thu, 13 Sep 2018 07:04:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZZrO22BroEuIoRDMaZofVTS0XmnIAJITSMY7eAIVBL68Qijm1AFI9gSsymWzH5H7cf5ejz X-Received: by 2002:a17:902:304:: with SMTP id 4-v6mr7551990pld.39.1536847465720; Thu, 13 Sep 2018 07:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847465; cv=none; d=google.com; s=arc-20160816; b=gFSXR/m/UJeysSN7Rg7uttQDaI7B5TC/a6NLRzVwBjj8styme7EQEXqbL5wTL8TMd3 7uGNwMT0u9W4deLtCVeFlp/2hrOAarOvtqyUAeXbsk6OVSrKoYG7VXqtux6BS5M51MV3 Cv6Xjczo3okX4fgg7YPHsKf4XUeDufTMgu+x5+qfsA9ZVSHApq/xcRX6rxOF9d9sBQ6V tEH5MYxo1TOIjrSIEmEx2uTQb7ys0dpE257z0JoSjs9IUNCH6IRE8UQHRCjHNxYcJ3SK hasoEX7/5AVcP6PAYmSBCaLMbrFZONaAKblHWmghF7FNxhpzpoZaWJAjWWcnASaDzFjk UHAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=hzEbu/XM8tPVL7j9Wd29dslLPvF+6KOe1gsgtQL7b84=; b=xYFaUeZjS4Xi08k3wd+rZpdUXtdJbYDJVYnhzVLivWH3HgSqoBw2Kj54D8MDcC1IuM gf/rEcLM2yO/XU/6/qe4R9VV2J4Fj/57R+omosSHDaC7QXF9bglAade3kudZINk2EdLk P+Q6G4sLBBPihOfL14gDbHBltUzsko/fGXhM8Fa9xMtK2mh3Jd+1c6RP68i46Fa/eha0 eGqIQB2xnwdeJa/NATuzIBubcOaFOROKfQHe+nOL/+PCde5IXdPwAUOBEWKEYhaof/Db IkBylRu7W45rcxhqhWZ3Yw8VfnwWXmSfQjDHdSGAvqLTUB+CvEvdb7YeM8IsnaZBMWVO T6ZQ== 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 q9-v6si4124835pgj.134.2018.09.13.07.04.10; Thu, 13 Sep 2018 07:04:25 -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 S1731779AbeIMTNR (ORCPT + 99 others); Thu, 13 Sep 2018 15:13:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35316 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728556AbeIMTNQ (ORCPT ); Thu, 13 Sep 2018 15:13:16 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4AF62D2E; Thu, 13 Sep 2018 14:03:37 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Alex Deucher Subject: [PATCH 4.18 164/197] drm/amd/display: fix type of variable Date: Thu, 13 Sep 2018 15:31:53 +0200 Message-Id: <20180913131848.117832453@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gustavo A. R. Silva commit fe78627d430435d22316fe39f2012ece31bf23c2 upstream. Currently, the maximum value that *counter* can reach is 255, and code at line 150: while (counter < 1000) { implies a bigger value could be expected. Fix this by changing the type of variable *counter* from uint8_t to uint16_t. Addresses-Coverity-ID: 1470030 ("Operands don't affect result") Fixes: 2b6199a1d1b7 ("drm/amd/display: replace msleep with udelay in fbc path") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c @@ -143,7 +143,7 @@ static void wait_for_fbc_state_changed( struct dce110_compressor *cp110, bool enabled) { - uint8_t counter = 0; + uint16_t counter = 0; uint32_t addr = mmFBC_STATUS; uint32_t value;