Re: [PATCH v2 2/4] usb: typec: tps6598x: Add trace event for status register

From: Linus Torvalds
Date: Sun Feb 14 2021 - 14:10:46 EST


On Sun, Feb 14, 2021 at 11:00 AM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> The C89 standard actually says that a string literal can be at most
> 509 characters to be portable. C99 increased it to 4095 characters.
>
> Sparse makes the limit higher, and the limit could easily be expanded
> way past 8kB - but the point is that large string literals are
> actually not guaranteed to be valid C.

Looking around, there's a couple of other similar cases:

drivers/infiniband/hw/hfi1/./trace_tx.h:727:1: error: too long token expansion
arch/x86/purgatory/kexec-purgatory.c:1340:9: warning: trying to
concatenate 21400-character string (8191 bytes max)
drivers/scsi/constants.c:318:9: warning: trying to concatenate
26550-character string (8191 bytes max)
kernel/trace/trace.c:5290:1: warning: trying to concatenate
10842-character string (8191 bytes max)

but those four are the only ones I see from a quick x86-64 allmodconfig build.

Please try to avoid it.

Linus