Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp624042pxx; Wed, 28 Oct 2020 12:41:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWigXZxs6CkWIH5CZ5gguVQBtmYIsJYTuBH+YTAYFZ+f27sLjA7CZh+DobB7i0VQlByHmp X-Received: by 2002:aa7:ce04:: with SMTP id d4mr529951edv.130.1603914097368; Wed, 28 Oct 2020 12:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603914097; cv=none; d=google.com; s=arc-20160816; b=UfOcLmiM5cpa4uaAD3UF/qq4yKcoWaFpyUVeiIIp2WW/HF6aGYuBuNNGnrWNL1v4H4 gq9A3/orGPojSED8jq2+1f1YqoT11ywE7qEZWXxAzhDpUCJ4N250Wno+OdGCbckRy+8h kvxfP4IZy36Wm/FIoEk+adEr2cSkr6YlpDfm45CoEOkHDp50cWGZhl0h6FVsuD6t3N3q 8/WD0u651AuA+j3RCZBKeBjRObeo+WQIbgCK2r7qwWqeE4sPlAbQi3H1074uwlW1QlZl YW8HxzL9CC4Bp78TBxGdvrfGZvwQoj4BaiRC4ykjoc76dtrx7S8kWGYyoVtLMgbLdVcz 8+WQ== 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=fB3cqwf2nM5POD0dH4Ltrp/bo7l+gL5t3n021Ti8Yi8=; b=1C8s+Pza+dzL3rNHRZF3bpvpm1twVmQYtEla5FmOyu11iDmqzoQJ5A4FxnFSdfMWy0 Hekm7MT3Gbg17p7LxtSsSi/od1fbl7auS0Man7MRJ7Kne7pR6JGiV+L9WZsR3koQHUgh ACVs8FXeHgkYSjxNd+Rip3eedTi6tC+UvY20A1iB4nMs+a7HJTE+iiLiIUBoC2h4kyiS HmqCWeBRsUmACbx+C7ohS6EzfxTqSZMKAhQa0B6xXDQ/nk/2cv5r+AOkYbgSA4IkqsEZ K6UR6dv8AB0415hltaFQR3d4qGOHxRMlJnc7mcI7ZPWi3IgJ8t4kUP8xwAbzTpJG7NjP 1CEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=POGnz1tz; 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 co4si129868edb.461.2020.10.28.12.41.14; Wed, 28 Oct 2020 12:41:37 -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=POGnz1tz; 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 S1827720AbgJ0S1D (ORCPT + 99 others); Tue, 27 Oct 2020 14:27:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:47740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1746942AbgJ0OAV (ORCPT ); Tue, 27 Oct 2020 10:00:21 -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 7C8062068D; Tue, 27 Oct 2020 14:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807219; bh=fqJxabfMkz6RU154unbmDzgV5qtAy8Ka4yXuq2UqcNg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=POGnz1tzj+GlCQG2FreSyvrTy+4VqjN5xHJNU5T3w583PkRplQFUQeJalVqcxr1OO dEzleq+MFDMQWTEjI4nrGsjq57AB/+SIYYDgk+QB/WFhpllPFTa4Rm0/dZGU0jjt0U RA8f5sUkuqWOOTfiSq9c7jWPvPmET5POcQgyaiEU= 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.4 086/112] media: saa7134: avoid a shift overflow Date: Tue, 27 Oct 2020 14:49:56 +0100 Message-Id: <20201027134904.611920108@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134900.532249571@linuxfoundation.org> References: <20201027134900.532249571@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 21a579309575d..02407983ce236 100644 --- a/drivers/media/pci/saa7134/saa7134-tvaudio.c +++ b/drivers/media/pci/saa7134/saa7134-tvaudio.c @@ -696,7 +696,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