Received: by 10.223.176.5 with SMTP id f5csp2931697wra; Mon, 5 Feb 2018 12:32:08 -0800 (PST) X-Google-Smtp-Source: AH8x224mgoCHTt0zGlIHyPYSO5U6XaUpxU+odxPzGu8TIPwbCpb/PTYmfNdT/X8v7VtGPyFYCekZ X-Received: by 10.98.137.213 with SMTP id n82mr31839pfk.175.1517862728198; Mon, 05 Feb 2018 12:32:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517862728; cv=none; d=google.com; s=arc-20160816; b=ePo01N3uvoyYel2zs3ghJQ6MOUUcZDTaOxo1vyTCigrrnMjtUQmsUgScKzECAUKo6L 2AD3PlCWdH4PLquJjMAioS41xBgQO2TrBS3mBVq0+40TLtwWEBPKdnQ08gpDCh4whTq0 8GkC3ee6gPB8lnkztoCFgBeWNXRjrt7QK5snuNOe/9N0B+58AyxfGiL4tn66n+NfpZfx SfNUfKvo2HUJMcJbJbPck+5M5wx5M6JcCk9edvzhcrv1n91Aq7BqaMmC9zv5StFtS/o5 qU/L+bZOLg2VMbE7kGhl5xOOf0KTxsqT57QfCrazPog0Lv85NzRlxl+MSJ7rOiiQ1Itl +8OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=DsaeZyKCtfc4h+0wWUtoswHJRQ2gOB5y7sWWJfSaBJA=; b=C12mwSmNU8LWvfG5cUBmh4UvyiHIKOHMHSUAL2bh9lYAwOofeYWx2AvL/Iz6la0hj6 QI0vSR2RwiwY+zBZdq98vm+FHsQZvaioMdkXIK2b1//4eQJxCot5BfozBbpdAHFsfcY9 6CaiU/Ol7XOexb+KGmpdvCc677B+Nwv8+/g32ZWpxIOwddpHGnhaDsuK+uDf0rdW6lPx AoEGBb9khrZ7+v6Jz/c1zyZU/jqK/lLlcr9E96XkuC4CcPdKKfdXxWiZvzdTVVgPhKlF bbnRcJulSz6U8astImFpAfVbOgbTIyCTtyRuZbVK/gRvxR4lCm1PlpmFoJe7AV/PRCOe 2K1Q== 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 s14si433258pgf.748.2018.02.05.12.31.53; Mon, 05 Feb 2018 12:32:08 -0800 (PST) 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 S1751818AbeBEUaQ (ORCPT + 99 others); Mon, 5 Feb 2018 15:30:16 -0500 Received: from gateway33.websitewelcome.com ([192.185.146.78]:30488 "EHLO gateway33.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbeBEUaK (ORCPT ); Mon, 5 Feb 2018 15:30:10 -0500 X-Greylist: delayed 1428 seconds by postgrey-1.27 at vger.kernel.org; Mon, 05 Feb 2018 15:30:10 EST Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 56F6D32F0 for ; Mon, 5 Feb 2018 14:06:22 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id in1yep8yUODN4in1yejYXq; Mon, 05 Feb 2018 14:06:22 -0600 Received: from [189.152.201.65] (port=46548 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.89_1) (envelope-from ) id 1ein1x-003H4K-JM; Mon, 05 Feb 2018 14:06:21 -0600 Date: Mon, 5 Feb 2018 14:06:18 -0600 From: "Gustavo A. R. Silva" To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , Jacob chen , Heiko Stuebner , Antti Palosaari , Ramesh Shanmugasundaram , "Gustavo A. R. Silva" Subject: [PATCH v2 0/8] use 64-bit arithmetic instead of 32-bit Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.201.65 X-Source-L: No X-Exim-ID: 1ein1x-003H4K-JM X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.201.65]:46548 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 4 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add suffix LL and ULL to various constants in order to give the compiler complete information about the proper arithmetic to use. Such constants are used in contexts that expect expressions of type u64 (64 bits, unsigned) and s64 (64 bits, signed). The mentioned expressions are currently being evaluated using 32-bit arithmetic, wich is some cases can lead to unintentional integer overflows. This patchset addresses the following Coverity IDs: CIDs: 200604, 1056807, 1056808, 1271223, 1324146 CIDs: 1392628, 1392630, 1446589, 1454996, 1458347 Thank you Changes in v2: - Update subject and changelog to better reflect the proposed code changes. - Add suffix ULL and LL to constants instead of casting variables. - Extend the proposed code changes to other similar cases that had not previously been considered in v1 of this patchset. Gustavo A. R. Silva (8): rtl2832: use 64-bit arithmetic instead of 32-bit in rtl2832_set_frontend dvb-frontends: ves1820: use 64-bit arithmetic instead of 32-bit i2c: max2175: use 64-bit arithmetic instead of 32-bit i2c: ov9650: use 64-bit arithmetic instead of 32-bit pci: cx88-input: use 64-bit arithmetic instead of 32-bit rockchip/rga: use 64-bit arithmetic instead of 32-bit platform: sh_veu: use 64-bit arithmetic instead of 32-bit platform: vivid-cec: use 64-bit arithmetic instead of 32-bit drivers/media/dvb-frontends/rtl2832.c | 4 ++-- drivers/media/dvb-frontends/ves1820.c | 2 +- drivers/media/i2c/max2175.c | 2 +- drivers/media/i2c/ov9650.c | 9 +++++---- drivers/media/pci/cx88/cx88-input.c | 4 ++-- drivers/media/platform/rockchip/rga/rga-buf.c | 3 ++- drivers/media/platform/sh_veu.c | 4 ++-- drivers/media/platform/vivid/vivid-cec.c | 11 +++++++++-- 8 files changed, 24 insertions(+), 15 deletions(-) -- 2.7.4