Skip to content

use 64-bit arithmetic instead of 32-bit

Gustavo A. R. Silva linux-arm-kernel linux-media linux-rockchip lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 4 repliesIn review
  2. v28 patches 5 repliesSuperseded
  3. v11 patch 8 repliesSuperseded

Changes in v3 from the cover letter

- Mention the specific Coverity report in all commit messages.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8rtl2832: use 64-bit arithmetic instead of 32-bit in rtl2832_set_frontenddrivers/media/dvb-frontends/rtl2832.c+2 -20 replies
2/8dvb-frontends: ves1820: use 64-bit arithmetic instead of 32-bitdrivers/media/dvb-frontends/ves1820.c+1 -10 replies
3/8i2c: max2175: use 64-bit arithmetic instead of 32-bitdrivers/media/i2c/max2175.c+1 -10 replies
4/8i2c: ov9650: use 64-bit arithmetic instead of 32-bitdrivers/media/i2c/ov9650.c+5 -44 replies
5/8pci: cx88-input: use 64-bit arithmetic instead of 32-bitdrivers/media/pci/cx88/cx88-input.c+2 -20 replies
6/8rockchip/rga: use 64-bit arithmetic instead of 32-bitdrivers/media/platform/rockchip/rga/rga-buf.c+2 -10 replies
7/8platform: sh_veu: use 64-bit arithmetic instead of 32-bitdrivers/media/platform/sh_veu.c+2 -20 replies
8/8platform: vivid-cec: use 64-bit arithmetic instead of 32-bitdrivers/media/platform/vivid/vivid-cec.c+9 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/8] use 64-bit arithmetic instead of 32-bit

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 in some cases can lead to unintentional integer overflows.

This patchset addresses the following "Unintentional integer overflow" Coverity reports:
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.

Changes in v3:
- Mention the specific Coverity report in all commit messages.

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(-)
Signature · 1 line
2.7.4