Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4475539pxb; Sun, 14 Feb 2021 11:43:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJynWRoj/WsrN65zZGbf9DFWfoxLPbuZa/AiWI7V2hL4i0q4OUbb2WoD3M0gGAzFQFVTWsyk X-Received: by 2002:a17:906:e2ca:: with SMTP id gr10mr3472588ejb.507.1613331839562; Sun, 14 Feb 2021 11:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613331839; cv=none; d=google.com; s=arc-20160816; b=ubtvztj/kRz49+mYsyyG3dMjR4kGM+mK3V130hxF5QDCCNq5srnwak0QLvFfD3Gse7 e2fqaySePen0VnthT0TMulrK+jGNfwCl2m0aCjGTUFyvhBxuzIFTzu8qrNnJFbZcvMpd vrzaXh+a0Ub54a6owthEbbYhlUZ94AgZL7lKbLEvsbv0W2w7FVKp8gp069rhQbb/A8/2 LHSU+jW2rhk5F6rpRctwC0XOTlADcjhHC/edEdJHH8FA9xUnCtsX4ieEztgmgH8MmeD8 i/1QbkMTxK2aM2J/2oS1xniBMSvMQsbFtvRYp7gWjj7frgD0fkGWcwhnDnKwD2mzoNRy bC6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=rbBTkQvF1/bHKKJPCULfkb7AgNO6MtpJ1dpZEYcT4v4=; b=Y5j7qttY0z28tSX2r1x6dqRf6FppywLJ7pkugGC4qqkjKdMW0nglJXZJE3UXnuxru1 cUBsqO49NK5aYnwZQ/qa3A2aitKEi7TvWxFwajUCUbAd5vGJmXiiMsc17MPwJj2jKCQn b5MpwxlYCSVLo6ZlC5anT5jDv4Uv+vAu+CSCCGWkDQ6jpaqDBzvHEDjUxIsI2A0rB2W+ lOTCyvH4uklprhi6fk7HZMJkSZieWG29WvO++JSz2iF0ZM/0HOmVD4QN6JqOFFkUOivG RodogUv0KsxV+nkC8ukfb07oK2TMFuxdhJ7vJR1Bym42JPzy9VH5GHL1jNzrz7/Vi0S1 oj0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@plus.com header.s=042019 header.b=KgyiiVzX; 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 r26si11158951edt.85.2021.02.14.11.43.36; Sun, 14 Feb 2021 11:43:59 -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=@plus.com header.s=042019 header.b=KgyiiVzX; 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 S229827AbhBNTl1 (ORCPT + 99 others); Sun, 14 Feb 2021 14:41:27 -0500 Received: from avasout02.plus.net ([212.159.14.17]:38023 "EHLO avasout02.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbhBNTl0 (ORCPT ); Sun, 14 Feb 2021 14:41:26 -0500 Received: from [10.0.2.15] ([147.147.167.73]) by smtp with ESMTPA id BN7JlWwUqjOtyBN7KlyjNE; Sun, 14 Feb 2021 19:31:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1613331099; bh=rbBTkQvF1/bHKKJPCULfkb7AgNO6MtpJ1dpZEYcT4v4=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=KgyiiVzXLbMdFHwjT7zzZyt1Q0Ig8zL2Gox3iU2hCMfAbtOVbzEGVt+Uldoo56rwD 80XucEghPm55KJVYMogSTWC6kWLgrH4Xbb4HGQqz9WIgMbsUxKWOKePtiECQ2Fz6WG 21nPGQPOL0TxS8Tr63wmN6GJJu1eau5RAta0qUtEtJOC1WWZhHTuevaA3qJbkVSdyV h6s5paFEly9fwj0+snCb/kXq11mVVU1YwdfwC7PMT8wpqrogYIr95BpY3IEYVVuljP wi9aLD5t5KBdy1ZslTjK0YfnGvDudPztKyFy4IwI9Wso+lQSHiwb385Q7wZH372tX2 A/0emcUVTNVcw== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=UcTKtJaN c=1 sm=1 tr=0 a=nK5asC+3lBOC3EoKtwbYYg==:117 a=nK5asC+3lBOC3EoKtwbYYg==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=Wm_VZl6z05tM19AFg1QA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 Subject: Re: [PATCH v2 2/4] usb: typec: tps6598x: Add trace event for status register To: Linus Torvalds , 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 References: <651ac50b9ff6ed3db8cab9f176514900f6a02a0c.1613131413.git.agx@sigxcpu.org> <20210213031237.GP219708@shao2-debian> <6a8eb07f-16d5-f461-cf0b-6c4aaf93b014@ramsayjones.plus.com> From: Ramsay Jones Message-ID: Date: Sun, 14 Feb 2021 19:31:37 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfBvUKy+/UU37fBEWzQ/KjFKosH1t/3bIq/BfPSWlxeukQnoMzNc8lnoL2gM4TAmRVH09SSy8xwu2MHUoVt8SZt8BpHZw6cPCB4Q0EtkJypwRTa6jnXfE L3IcorPRfPRAlQmbbHhJyoHXtIRWH6B0qfADMnof3vBgDeuyyP4MpohyOaZ0V+pfYU6gxsPQbOJSEw== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/02/2021 19:00, Linus Torvalds wrote: > 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. Yep, as I said, I didn't submit the patch - rather I changed the source so as not to need such a long string. > 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 agree, but I wiggled my patch (which doesn't increase MAX_STRING) to apply to the current codebase, and ... it now fails two tests! ;-) (It seems, in the intervening 9 years, the show_token_sequence() function fixed the quoting of double-quotes in the resulting strings, which my patch fails to do). Sorry for the noise. ATB, Ramsay Jones