Skip to content

enabled -Wformat-truncation for clang

Arnd Bergmann alsa-devel bpf dri-devel linux-fbdev linux-input linux-kbuild linux-rdma linux-scsi linux-sound linuxppc-dev lkml llvm netdev platform-driver-x86 1 version Applied

Status from this message: applied to fbdev git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 14 repliesApplied 3/9

Patches in v1 Applied · 3/9

#Subject and filesSizeRepliesApplied
1/9fbdev: shmobile: fix snprintf truncationdrivers/video/fbdev/sh_mobile_lcdcfb.c+1 -12 replies
2/9enetc: avoid truncating error messagedrivers/net/ethernet/freescale/enetc/enetc.c+1 -10 repliesApplied
3/9qed: avoid truncating work queue lengthdrivers/net/ethernet/qlogic/qed/qed_main.c+4 -53 repliesApplied
4/9mlx5: avoid truncating error messagedrivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c+1 -11 replyApplied
5/9surface3_power: avoid format string truncation warningdrivers/platform/surface/surface3_power.c+1 -13 replies
6/9Input: IMS: fix printf string overflowdrivers/input/misc/ims-pcu.c+2 -21 reply
7/9scsi: mylex: fix sysfs buffer lengthsdrivers/scsi/myrb.c drivers/scsi/myrs.c+22 -221 reply
8/9ALSA: aoa: avoid false-positive format truncation warningsound/aoa/soundbus/i2sbus/core.c+1 -11 reply
9/9kbuild: enable -Wformat-truncation on clangscripts/Makefile.extrawarn+2 -00 replies

Reviews trailers per patch

3 of 9 patches have a Reviewed-by or Acked-by.

PatchLaurent PinchartHannes ReineckeSubbaraya Sundeep
1/9R-b
2/9
3/9
4/9R-b
5/9
6/9
7/9R-b
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/9] enabled -Wformat-truncation for clang

From: Arnd Bergmann <[email protected]>

With randconfig build testing, I found only eight files that produce warnings with clang when -Wformat-truncation is enabled. This means we can just turn it on by default rather than only enabling it for "make W=1".

Unfortunately, gcc produces a lot more warnings when the option is enabled, so it's not yet possible to turn it on both both compilers.

I hope that the patches can get picked up by platform maintainers directly, so the final patch can go in later on.

Arnd

Arnd Bergmann (9):
fbdev: shmobile: fix snprintf truncation
enetc: avoid truncating error message
qed: avoid truncating work queue length
mlx5: avoid truncating error message
surface3_power: avoid format string truncation warning
Input: IMS: fix printf string overflow
scsi: mylex: fix sysfs buffer lengths
ALSA: aoa: avoid false-positive format truncation warning
kbuild: enable -Wformat-truncation on clang

 drivers/input/misc/ims-pcu.c                  |  4 ++--
 drivers/net/ethernet/freescale/enetc/enetc.c  |  2 +-
 .../ethernet/mellanox/mlx5/core/esw/bridge.c  |  2 +-
 drivers/net/ethernet/qlogic/qed/qed_main.c    |  9 ++++---
 drivers/platform/surface/surface3_power.c     |  2 +-
 drivers/scsi/myrb.c                           | 20 ++++++++--------
 drivers/scsi/myrs.c                           | 24 +++++++++----------
 drivers/video/fbdev/sh_mobile_lcdcfb.c        |  2 +-
 scripts/Makefile.extrawarn                    |  2 ++
 sound/aoa/soundbus/i2sbus/core.c              |  2 +-
 10 files changed, 35 insertions(+), 34 deletions(-)
Signature · 38 lines
2.39.2

Cc: Dmitry Torokhov <[email protected]>
Cc: Claudiu Manoil <[email protected]>
Cc: Vladimir Oltean <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Saeed Mahameed <[email protected]>
Cc: Leon Romanovsky <[email protected]>
Cc: Ariel Elior <[email protected]>
Cc: Manish Chopra <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: "Ilpo Järvinen" <[email protected]>
Cc: Maximilian Luz <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nicolas Schier <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Bill Wendling <[email protected]>
Cc: Justin Stitt <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]