Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1299959ybg; Fri, 18 Oct 2019 15:28:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIewqxlTEXpJWGgzlwxAzdTzyhYKOAsxjJVlY8Ar5tTsqPmfEvuQHB08ncMyhOTJF2AA5T X-Received: by 2002:a05:6402:1507:: with SMTP id f7mr12420996edw.68.1571437703073; Fri, 18 Oct 2019 15:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571437703; cv=none; d=google.com; s=arc-20160816; b=MeU4EG9l7HEIDRjsgoDvfi86RpLTn8W5auJa8VtjZEnooKt2vlK4BEM5rk80wj8pc8 WCy+kV2WoGSWk9jXY6lbdCRT1vwykVXoKSGH14wwNlq2gAeJwlSOF6OKnNoqImRYIjLy 0XgNN4W9f1erwUbVrDPn4NeJhTceXtQwR26hUE2CtUz0gak7PNqcYKQE5cvV36D8kjgi 3vBhguOzVsoSschMDV3mhAasUMI/S9ES1iD4M/vqNBald1zw3eFBbSlFIFuSqGC0b23J pMzsDq+cMuO5umPfGKxiFfMAD6YO678ID1KyVsn20UpkLj43bUJ4+QMehzSThHRp6tO/ Jizg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=Ar03SN8ojdCPgdDDnhBr1SKZnLdM9cLb9Yk7E1pUhvA=; b=g6rE4lhofpWQY+qLa5xCyjYj6ckru93o8kJkhDMih7KIgX05LanlLfY4Bc6E/gfHny +nsXaqk10cDx4KdLoJ5G0tzGTZPTIjWVH7Wb0ujUTnKID3Q1hPoPrUNqn73ikTvi4LGV gQwrrnxRvVZtt7gcz0RIPjwMHOok1qY+CFtV6ARdQygrDZZpiI+YwTJyqSFO9FoIjjR/ 0ijCH9U/+WcyTRPIrOPxkwoh2XA3mydPa0w+WpAMgMzIQD+bGc5BjRnH9wd9vIqH/XKC 3NZGpKBs2LODgThadIUVx63WEC8TxMfnBIOo5Q0TQPIUVEbKKO7pGTSIcPxYgxU+9L+1 tiuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=HWO1Og9h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id by16si4439689edb.30.2019.10.18.15.28.00; Fri, 18 Oct 2019 15:28:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=HWO1Og9h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441988AbfJRFAh (ORCPT + 99 others); Fri, 18 Oct 2019 01:00:37 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:41032 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727627AbfJRFAh (ORCPT ); Fri, 18 Oct 2019 01:00:37 -0400 Received: by mail-io1-f65.google.com with SMTP id n26so5885829ioj.8 for ; Thu, 17 Oct 2019 22:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Ar03SN8ojdCPgdDDnhBr1SKZnLdM9cLb9Yk7E1pUhvA=; b=HWO1Og9hde/TMA3RyAXmPzOZqdhjb5gLcg2VdZkxBTWSAXVnVEHtmfUEZ9Bdly/5Pj zUkp/siL3Z0sOwANXcY9TGdwcTIzYUymEUTEU5H0I1Am5BoqlQo0OLsDJGzB77MM8N8C Hmhp9f2ap3GaScWS15oXAGTsnLgOK1ldfs73dPBEWXcUdizem3nAcwjd5oJfiNgygKQG iCwbs/OLUDnLvmaDsIp0/+OXeV1rAq+wHHvKKm8qhbNm+O996t7m7xzDEgBHD4e//0LM 5v5kEu60irubA+e/vdEIosEV4qfWiihBbyd1ClO2GgDjBojWmczJzJHzjx1OPqxvtykj rNyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Ar03SN8ojdCPgdDDnhBr1SKZnLdM9cLb9Yk7E1pUhvA=; b=Bl8PHzaSAVTHxjTTT+xyPH5rVmopCQD2oWBi3nEZhmD6y2QlImNyxnH7apTOE+Ev4O XYVkIb2QH0NANGU/cCeeaGbOuCBX0bNhr1jnJ7kEFq51gFGWCLK4irPN3ahpPX1Dn9cc CsX5DJtqSs6VRylwFcoHNfH2YB0llFJRGHDMo54PFyDs8L3bvpSZcuoLyLL1Lf1FwUQw Byz1fc/HAvLvqaOw179KZX4pzPKXfRX7BqlWf490XpisqR++em2ZWVTb7Ro9ebmYN9IS wLmabZDtCy0RDeQ/PJbEU3JvYD+ukcebNGf/IXc4ubVMf6iFTzmvRtvZqjq/DyHb6H3F K4wg== X-Gm-Message-State: APjAAAWG81OWEl1kYT9RAm/k07eGIlajMfmKVD7xZnBszF0rurmUTyXn g34lcD1juFbdWQP1WYVZ5Rn5dorL/tE= X-Received: by 2002:a5e:da45:: with SMTP id o5mr3854840iop.177.1571373500501; Thu, 17 Oct 2019 21:38:20 -0700 (PDT) Received: from localhost (67-0-11-246.albq.qwest.net. [67.0.11.246]) by smtp.gmail.com with ESMTPSA id y23sm1544228iob.28.2019.10.17.21.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 21:38:19 -0700 (PDT) Date: Thu, 17 Oct 2019 21:38:18 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Luc Van Oostenryck cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/8] riscv: init: merge split string literals in preprocessor directive In-Reply-To: <20191018040237.3eyrfrty72r63pkz@ltop.local> Message-ID: References: <20191018004929.3445-1-paul.walmsley@sifive.com> <20191018004929.3445-4-paul.walmsley@sifive.com> <20191018040237.3eyrfrty72r63pkz@ltop.local> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Oct 2019, Luc Van Oostenryck wrote: > On Thu, Oct 17, 2019 at 05:49:24PM -0700, Paul Walmsley wrote: > > sparse complains loudly when string literals associated with > > preprocessor directives are split into multiple, separately quoted > > strings across different lines: > > ... > > > #ifndef __riscv_cmodel_medany > > -#error "setup_vm() is called from head.S before relocate so it should " > > - "not use absolute addressing." > > +#error "setup_vm() is called from head.S before relocate so it should not use absolute addressing." > > #endif > > Using a blacslash should do the trick : > #error "blablablablablablablablablablablabla" \ > "and blablabla again" > Or if need I cn fix Sparse if needed and desiable. Thanks for the kind offer! The backslashless syntax is pretty horrible to my eyes. As far as I can tell from a brief glance, the instance fixed by this patch was the only instance of its kind in the kernel. The existing kernel precedents appear to be to simply use a single long line. Example: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/compiler-gcc.h#n3 So, from a kernel point of view, we should just fix this specific instance. It doesn't seem worth changing sparse for such a rare case. On the other hand, gcc seems to support the non-backslashed syntax. So if the intention is for sparse to follow the gcc practice, and to be used beyond the kernel, maybe it's worth aligning sparse to gcc? Only if you're bored, I suppose... - Paul