From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761403AbdJQXSz (ORCPT ); Tue, 17 Oct 2017 19:18:55 -0400 Received: from smtprelay0186.hostedemail.com ([216.40.44.186]:49546 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750910AbdJQXSy (ORCPT ); Tue, 17 Oct 2017 19:18:54 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:800:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3868:3870:3871:3873:4250:4321:4361:4559:5007:7903:7904:10004:10400:10848:11232:11658:11914:12555:12740:12760:12895:12986:13069:13311:13357:13439:14093:14097:14181:14254:14659:14721:21080:21451:21627:30001:30002:30003:30004:30005:30006:30007:30008:30009:30010:30011:30012:30013:30014:30015:30016:30017:30018:30019:30020:30021:30022:30023:30024:30025:30026:30027:30028:30029:30030:30031:30032:30033:30034:30035:30036:30037:30038:30039:30040:30041:30042:30043:30044:30045:30046:30047:30048:30049:30050:30051:30052:30053:30054:30055:30057:30058:30059:30060:30061:30062:30063:30064:30065:30066:30067:30068:30069:30070:30071:30072:30073:30074:30075:30076:30077:30078:30079:30080:30081:30082:30083:30084:30085:30086:30087:30088: X-HE-Tag: tank32_306c903fcce00 X-Filterd-Recvd-Size: 2405 Message-ID: <1508282331.6530.34.camel@perches.com> Subject: Re: scripts/checkpatch: Concatenated strings should use spaces between elements From: Joe Perches To: Heinrich Schuchardt , Andy Whitcroft Cc: linux-kernel@vger.kernel.org Date: Tue, 17 Oct 2017 16:18:51 -0700 In-Reply-To: References: <20171017211751.31343-1-xypron.glpk@gmx.de> <1508280192.6530.31.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-10-18 at 00:58 +0200, Heinrich Schuchardt wrote: > On 10/18/2017 12:43 AM, Joe Perches wrote: > > On Tue, 2017-10-17 at 23:17 +0200, Heinrich Schuchardt wrote: > > > This patch creates a warning (CHECK) > > > "Concatenated strings should use spaces between elements" > > > > > > There are no concatenated strings here. > > > > Yes, there are. > > > > > (checkpatch is also used in the U-Boot project where wide strings > > > occur in the EFI implementation.) > > > > > > Signed-off-by: Heinrich Schuchardt > > > --- > > > test.c | 7 +++++++ > > > 1 file changed, 7 insertions(+) > > > create mode 100644 test.c > > > > > > diff --git a/test.c b/test.c > > > new file mode 100644 > > > index 0000000000..dfd33cd765 > > > --- /dev/null > > > +++ b/test.c > > > @@ -0,0 +1,6 @@ > > > +#include > > > + > > > +void foo(void) > > > +{ > > > + test(L"\""); > > > > In this case, L must be a constant string and you > > are concatenating L and "\"" > > > > > > See ISO/IEC 9899:1999 > > 6.4.5 String literals > > > A character string literal is a sequence of zero or more multibyte > characters enclosed in double-quotes, as in "xyz" > A wide string literal is the same, except prefixed by the > letter L. > Kernel doesn't support wide strings. > L"foo" is a literal of type wchar_t * and not two strings. > L is a qualifier and not a constant string. > > Just like ULL in 10ULL. > > Regards > > Heinrich