Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4459724pxb; Sun, 14 Feb 2021 11:05:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJytI/6fme16Q3T279znB/zAd/H30iDxuxvMLu9Mt4esTTYz7KwXw9x4mAL3L80bxDrX+A4e X-Received: by 2002:a05:6402:54b:: with SMTP id i11mr12505067edx.262.1613329554183; Sun, 14 Feb 2021 11:05:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613329554; cv=none; d=google.com; s=arc-20160816; b=mm/zzAU0BFQ1mKRcA70Xbx/e3LB5iqRzSeDgOcKN8+1OQYl2qHmLP0VGjTMhbBN3cA v/Mted/HjAGCq4qJICYtFESsnMJv1OeLLyu/5YaCYLMWE0le5XpIZDZWSyox6X2PwaM7 yn3fgirs9J1dfwzl2OcHjNXtywSuecLaVM1V+fa0Y07PBL6DvMEbubecAMozCbii5GBO aHT+LB8PyJ/839ekrnq9OrhJcyWZlNb+Z/IE9JiZ6W2x9q7Rw6VgltV3P0GOZxGa7a5J oOeBBWTLF3yUO1Ota8j67IDypHkKCZcheNh/6f40P40xYX/SVGjdVuq2g6q3O4g0rRrX UV2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=M+PrlagK3FXPEbDOZIY/ECRbDBZyE6NRnFmFq47XoKo=; b=tx5R3kV1NMJUZ07pH1EkSyz0gDJHNdGCdR/a4zmBKVIBRJG51fxPG+Bj9OBkSlLMqA A2RLTjORlKmBtB8eB16jBl3InhS+jT+2fqzj9IPNEmJa49gC2bSnPA7Lw6ogCt2aJcfQ JG4mXTAeN6Vgqr3fUFAzONM9tkiT54/IPq3N96tTqqGVVEksnH/3LuAA1bybuEtwmcc6 7EC/VY+Q3kJAcBZr+jhJenLbClaWOtgVhr3VTHsypUDWpVItdrCL4ly9LVsa+9g1MSy6 PGBbq65+TJp0Gkjc4/l9IQTs2WyFVLGmZZ/ab5D25lPw9dCfOpUfmQz06wcpQaLn7Kw5 KMJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=e8vgrlaD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g13si1037469ejb.579.2021.02.14.11.05.30; Sun, 14 Feb 2021 11:05:54 -0800 (PST) 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=@linux-foundation.org header.s=google header.b=e8vgrlaD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229870AbhBNTBt (ORCPT + 99 others); Sun, 14 Feb 2021 14:01:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbhBNTBr (ORCPT ); Sun, 14 Feb 2021 14:01:47 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BFB4C061574 for ; Sun, 14 Feb 2021 11:01:07 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id c17so4235787ljn.0 for ; Sun, 14 Feb 2021 11:01:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M+PrlagK3FXPEbDOZIY/ECRbDBZyE6NRnFmFq47XoKo=; b=e8vgrlaDAszZNUkNayc/bQhGtTDVv2JWQ2vcikOXiPfOvXZyT7o6vWAx5IiBM+Q5aK xdHDapKbzufyKmtn2WyIcyjmXvK9/AY/sW/TaHGzXucoZnioLMvlxwq5wCIBY1xjxt3H 8t/fXMkN3hYAEKXFusstufxRxZGE6gAS/rk1k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M+PrlagK3FXPEbDOZIY/ECRbDBZyE6NRnFmFq47XoKo=; b=eEyaw3RD2tZUywPazx+T8SeJKk58EXUAFnDPy4IN264C3Omho2T4FIWgWvcKr9M85C loK+elTN1EpUq9CVAUaEqKqVoGKjDZ16C7J4tBD6/GcVpCJ/EtBbafNdcXSiaoAZiJDi OH/QD6OOZ2vybCXRJ8t0qh9Czxck9U8aq2RInO5XZp6YPoTNgRKdJLCtAGyJorDhaVPb Ux7MImlxwxB1VTic7fKfdWuI/VtZzK1PpMta/vOOmtkN18kmWIwhoud5qKqoe1ircgwX 86X5rAWD8bIGzg7DY0LPAGjpJQxBV6Lo7Z707ElnN+RDqKwarnhMwwBfjGIegBS8X23k WSrg== X-Gm-Message-State: AOAM532/5VqVCvwBJQcneQBiJmue7A16XlkFaRNeau3nJfjyY6BKME9r 3KO+ZuGvjOoYVloeP5CbPn9BpF9C2EtqAw== X-Received: by 2002:a2e:8855:: with SMTP id z21mr7581893ljj.472.1613329265291; Sun, 14 Feb 2021 11:01:05 -0800 (PST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id g8sm3302895ljl.26.2021.02.14.11.01.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Feb 2021 11:01:04 -0800 (PST) Received: by mail-lf1-f48.google.com with SMTP id j19so6973395lfr.12 for ; Sun, 14 Feb 2021 11:01:04 -0800 (PST) X-Received: by 2002:a19:7f44:: with SMTP id a65mr6579147lfd.41.1613329264262; Sun, 14 Feb 2021 11:01:04 -0800 (PST) MIME-Version: 1.0 References: <651ac50b9ff6ed3db8cab9f176514900f6a02a0c.1613131413.git.agx@sigxcpu.org> <20210213031237.GP219708@shao2-debian> <6a8eb07f-16d5-f461-cf0b-6c4aaf93b014@ramsayjones.plus.com> In-Reply-To: <6a8eb07f-16d5-f461-cf0b-6c4aaf93b014@ramsayjones.plus.com> From: Linus Torvalds Date: Sun, 14 Feb 2021 11:00:48 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/4] usb: typec: tps6598x: Add trace event for status register To: Ramsay Jones , Greg Kroah-Hartman , Linux Kernel Mailing List , linux-usb@vger.kernel.org Cc: =?UTF-8?Q?Guido_G=C3=BCnther?= , Luc Van Oostenryck , Sparse Mailing-list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 14, 2021 at 10:42 AM Ramsay Jones wrote: > > > > > I looked around but didn't find any hints how to fix this. Any pointers > > I missed (added the sparse list to cc:)? > > This is a limitation of sparse; when using the 'stringize' pre-processor > operator #, the maximum size of the resulting string is about 8k (if I > remember correctly). Well, yes and no. 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. So honestly, it really sounds like that TRACE_EVENT() thing is doing something it shouldn't be doing. I don't think there's any fundamental limit why sparse does 8kB as a limit (just a few random buffers). Making sparse accept larger ones should be as simple as just increasing MAX_STRING, but I really don't think the kernel should encourage that kind of excessive string sizes. I wouldn't be surprised if tracing buffers etc make such strings useless anyway. Linus