Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp174435pxx; Wed, 28 Oct 2020 01:36:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFYK0tGbLE+KFcGIBYr2oHusyK8nm/EgOwfAkP19h7DVlrY0a0+MUFYNIBGXKzGVSMmltD X-Received: by 2002:a50:f749:: with SMTP id j9mr6422884edn.376.1603874215765; Wed, 28 Oct 2020 01:36:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603874215; cv=none; d=google.com; s=arc-20160816; b=x//XjW7JWgq1fZrDJ9aiSJjT/3OwXrerwJlUE5JnLSerr+yPCcxvlS3X/RrGk1Bv+t d34XrfE+iz5F/UmYMDoSH+/Fz8CGXYozkjNL5Hxh6H/IDriFa/WemKcyX1/LV27u6Qze 9SY5j6jmFsIJ5O8f1O3vhdHFjUOwDu0VAyDQBfInYcmtgjKOJcieXgltq2camIQrh8eI bkgIAkJWDyiDNgo6irxdJK50kM5+VIBEwjjKAizN1/n+wPtqWeABG0DRim9agbol2nf7 1rr3K4UxQm2SZsynnvgn2vVt8QPxwQKU/+nuagJUVgVPV1LWukaIBIk/vbFLIUj3dDsX 8ZOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uPMo+MZotXBHa94bRtkEFY9paFVoQX/hOHemRG5aSLw=; b=C9nmSEoed3z+PekJvj9N/qr/N/vL3flgd4mQL2qRF9vztcpFiUBZ0jz+cbPZw/+rdO 3paNCZ+1c+JsNYj0euoLqQ76XJXHte4OoFa+Ik3UxjEfQ0t2+O5b/6zAGvEdXa/Pj9U+ RJ3j4rNofNFZmqOi/PNMdD72aHvZ7bA694/JXBhiXOp9y6Wd35WlEqoFMIcVcJQKZZH5 VhfowIvd3KiKAkJ+fubfWoxXJmu9n+80uM6xk5ebAUSl8uJ/7JaKsmiM3xKSQfrXIJm9 KDUk0SBhvJ5SDI1BlHsdAcg80z/PsQRl98PBRWqv2KY3MSLQOjtF2MkWZ6pUN5MSm+O+ WP4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TnG6dOSM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si3838927edf.535.2020.10.28.01.36.34; Wed, 28 Oct 2020 01:36:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TnG6dOSM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754691AbgJ0OGc (ORCPT + 99 others); Tue, 27 Oct 2020 10:06:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:54840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754661AbgJ0OG0 (ORCPT ); Tue, 27 Oct 2020 10:06:26 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7F9052222C; Tue, 27 Oct 2020 14:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807586; bh=y0nrALnpN+wNQd4dB09u9lMUX8CA2OB73naCORAG4Ok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TnG6dOSMUc2dNt3SPP4sPwp1ic3qcJmGIurQlFnonYczZEbDsFlPh2VZw38sHzGDO 8pVs8GcxkbZJJ2Hp2+JAwsVQCDkotf5FG2XhxS3NBHpo5HGujvf0BKZY083Z9LBfHK qUYRSTyKc+piHAk9lLOIt45En+9AaW1zQ3oxzqJI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.9 107/139] media: saa7134: avoid a shift overflow Date: Tue, 27 Oct 2020 14:50:01 +0100 Message-Id: <20201027134907.217650676@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mauro Carvalho Chehab [ Upstream commit 15a36aae1ec1c1f17149b6113b92631791830740 ] As reported by smatch: drivers/media/pci/saa7134//saa7134-tvaudio.c:686 saa_dsp_writel() warn: should 'reg << 2' be a 64 bit type? On a 64-bits Kernel, the shift might be bigger than 32 bits. In real, this should never happen, but let's shut up the warning. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/pci/saa7134/saa7134-tvaudio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7134/saa7134-tvaudio.c b/drivers/media/pci/saa7134/saa7134-tvaudio.c index 38f94b742e283..0b5d6f4994571 100644 --- a/drivers/media/pci/saa7134/saa7134-tvaudio.c +++ b/drivers/media/pci/saa7134/saa7134-tvaudio.c @@ -697,7 +697,8 @@ int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value) { int err; - audio_dbg(2, "dsp write reg 0x%x = 0x%06x\n", reg << 2, value); + audio_dbg(2, "dsp write reg 0x%x = 0x%06x\n", + (reg << 2) & 0xffffffff, value); err = saa_dsp_wait_bit(dev,SAA7135_DSP_RWSTATE_WRR); if (err < 0) return err; -- 2.25.1