Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4727582imm; Mon, 18 Jun 2018 21:53:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKS/inUo2ULX55PQkvPO8TPtweXLQJ4ZV/+u3Ko8En61eWvTRpa5SdodN7SKHhfev7oKz4j X-Received: by 2002:a65:5143:: with SMTP id g3-v6mr13347679pgq.190.1529383999995; Mon, 18 Jun 2018 21:53:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529383999; cv=none; d=google.com; s=arc-20160816; b=o8X9zaL59egLJcYxCdrW8TMxpWtQdkgJrixm7BRYcRcbO6GpGFp6f/7LUX2YX0fagJ +VI5w4vGmocz1r+OybGoiAr2r3q2qK84BY9VYwjMc2u8tm6XroeyxVYNQW/GWZ9/5KqU NEZwT4g6eE5Vgw/q1SzoDSiq9Ppu7UJaBXLG56kPDkTcTAYGyCk60Et2SjQqpEAGvOVf AUpB5rc/p9hQPHkVJekc6g6fRLsWGIQAGoZT02Hu7rCG7UaQEY/DZiYj93UZWnY4WSac fjSBMT5YAMjSS6BxXHzL+xpB74BFOw2agsaN8hO5i3sSXGuekkj/dGnRkwhebMWtvU9p 9iRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=7ZMCWY5Up9tMHTa/Afv5mbDtYDbSei9K7qDMv/8YluY=; b=ACPwwpgGDTnIB5H4i2/1UyCzvn60qs2Ptj7X+lmjq6l5vxfMIHbjPcyci+AQaXpsJo DDj2cZE4neVJP2taTAls+1rPTQQhiqvCzbZF9ivsPnF12biAoBMHoxOdGHam97E+71Dv EsgeSvTDjWH08k8iTQaQH6rlg4OOi5GLMhMb5JGcwTlXjP/a9csTuFEuZY6IOWBX5yfb /K3F5I0lIbVx5JFNUpsoEiMC9WYDBULa0hw3/b/qFaql4HB7gMwONmPTszy73KQTkl7F K58fVIvd7EnW7P6m1kJ5xHyaDPi8nEBfl0PPUIC2J1bdcpSjf0y3PcAqRtQkXtbAo7dd L2DA== ARC-Authentication-Results: i=1; mx.google.com; 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 w69-v6si13368897pgd.101.2018.06.18.21.53.06; Mon, 18 Jun 2018 21:53:19 -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; 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 S937238AbeFSEwG (ORCPT + 99 others); Tue, 19 Jun 2018 00:52:06 -0400 Received: from smtprelay0231.hostedemail.com ([216.40.44.231]:44971 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751602AbeFSEwE (ORCPT ); Tue, 19 Jun 2018 00:52:04 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 1BC83837F252; Tue, 19 Jun 2018 04:52:04 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1801:2198:2199:2393:2553:2559:2562:2693:2828:3138:3139:3140:3141:3142:3353:3622:3865:3867:3870:3871:3872:3874:4321:4605:5007:7903:7904:10004:10400:10848:11026:11232:11233:11658:11914:12740:12760:12895:13069:13095:13311:13357:13439:14659:14721:21060:21080:21433:21451:21627:30012:30054:30060:30069:30090:30091,0,RBL:47.151.150.235:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: bat07_8641d2427883f X-Filterd-Recvd-Size: 2722 Received: from XPS-9350.home (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA; Tue, 19 Jun 2018 04:52:02 +0000 (UTC) Message-ID: <800831730e3aeaf4da23f7f97cfa80103236c3cb.camel@perches.com> Subject: Re: [PATCH v2 4/4] vt: coherence validation code for the unicode screen buffer From: Joe Perches To: Nicolas Pitre , Andy Shevchenko Cc: Greg Kroah-Hartman , Dave Mielke , Samuel Thibault , Linux Kernel Mailing List Date: Mon, 18 Jun 2018 21:52:01 -0700 In-Reply-To: References: <20180617190706.14614-1-nicolas.pitre@linaro.org> <20180617190706.14614-5-nicolas.pitre@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-06-18 at 21:50 -0400, Nicolas Pitre wrote: > On Tue, 19 Jun 2018, Andy Shevchenko wrote: [] > > > + /* > > > + * Make sure our unicode screen translates into the same glyphs > > > + * as the actual screen. This is brutal indeed. > > > + */ > > > + p = (unsigned short *)vc->vc_origin; > > > + mask = vc->vc_hi_font_mask | 0xff; > > > + for (y = 0; y < vc->vc_rows; y++) { > > > + char32_t *line = uniscr->lines[y]; > > > + for (x = 0; x < vc->vc_cols; x++) { > > > + u16 glyph = scr_readw(p++) & mask; > > > + char32_t uc = line[x]; > > > + int tc = conv_uni_to_pc(vc, uc); > > > + if (tc == -4) > > > + tc = conv_uni_to_pc(vc, 0xfffd); > > > + if (tc == -4) > > > + tc = conv_uni_to_pc(vc, '?'); > > > + if (tc != glyph) > > > + pr_notice("%s: mismatch at %d,%d: " > > > + "glyph=%#x tc=%#x\n", __func__, > > > + x, y, glyph, tc); > > > > Don't split format string in printk(). checkpatch will not warn on longer lines. > > I didn't do it like that for checkpatch but to keep the code readable. > I don't particularly care either ways though. If one glyph is off, then perhaps others are off too. Perhaps this message should be ratelimited.