Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5106647imm; Tue, 19 Jun 2018 05:15:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZO/1gbMObFndhPGiPwuKkTEWgmD1mSCErE5039nrTX9wTX/mvhJYhPkBgRFJcjKDsQ3Ho X-Received: by 2002:a63:bc0a:: with SMTP id q10-v6mr14666895pge.70.1529410553636; Tue, 19 Jun 2018 05:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529410553; cv=none; d=google.com; s=arc-20160816; b=0dnBT+hBl+ZgMHJPCun8+z7xEga/h9cDNHBzqx0n0bxcyM0484GHaNvvixgkQJSZd4 GXWvGXT8DDRVkq6M0gYyDS1N1C3NtbZ/7sHC5IAtkiQoM/VsZBzCbZyCUsrljftPpxvd FPBAfZLbhUhvnfSIGPzfifgwXQEYgR2Epwhd52+ZQY/h4pNNyJqmoZaa/roCxbky/nWw 0uddpg2t6RmJAiUp8/qzd3fx7ql/Bg0LKqK3m4sJe0lX7Nnev1/lzdsr/5DW5rr55Wsv ZU9plGqA8OYPD0BURzI6OLyFc7tWZqn5LeHrr+1NTJlxXcQPKn/EW2faKshQto0u9qHE OtEg== 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 :arc-authentication-results; bh=HCQo8UQgwxQb5+Rc67Gmp6LwPx2iN+7wDXtGQs182S0=; b=OfW7F0gOe/gigt6oo+F34ZWYIOq7Jwy5xgGsc6o6eFKtaEoJTXGxtGrWPTamTzPKTe CiN7wsj192ggUhPfaBB3JtbRtVGAfcekh/DI8j2B83SYHQiNNzIgRF6sUkniNe3ib6YJ GZSNQ8T69yuGJOaANyXy0+FYe6AoImIBnR0v8jriS/SwfyTa5wfkVZTyTf+LEGrarYyD RCIsBFoApnCtJDuknffFTVhJaxHRYsTMzxmyKiKzxdzyITqcHclNpxo8uI22O84aascL sGofbpuItuYS5aYh288nFrtf3gRgLeClQerm8u7YnaollKO3gr3xneQLIXi7yr8XHzBG hOyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MTAYRlF6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17-v6si14243362pgm.597.2018.06.19.05.15.39; Tue, 19 Jun 2018 05:15:53 -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=@linaro.org header.s=google header.b=MTAYRlF6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937706AbeFSMPB (ORCPT + 99 others); Tue, 19 Jun 2018 08:15:01 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:35525 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937392AbeFSMO7 (ORCPT ); Tue, 19 Jun 2018 08:14:59 -0400 Received: by mail-qt0-f193.google.com with SMTP id s9-v6so18073700qtg.2 for ; Tue, 19 Jun 2018 05:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=HCQo8UQgwxQb5+Rc67Gmp6LwPx2iN+7wDXtGQs182S0=; b=MTAYRlF62GtIBeT3h6WRLsI6vPbryGQPNHI6OQn920+WqZG8efV58KlLsiY83xNqMt viORoL4u5FiLX2AHb1YJl3eSfGTwM/jwvHhCa2+08MoTv9WmAKtvxYvDLICxU2kPW6rr dSum8akhgd0N2uwdtZj2I53LpTXukybOFCgS8= 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=HCQo8UQgwxQb5+Rc67Gmp6LwPx2iN+7wDXtGQs182S0=; b=IGQfEXj9L3mOo5TUdFlGHMmuprs/fWWxQZQA2X4qxTFRsTXdhJsKuwuKcPvssDbDxZ SKzVA+eLGu177sC9r/hybHf1XwEt/f6QDLyb6Cu3OGMeTShzCySmvJYDk73Ovbw3e/f3 5OPGaAczMmuLEk6yWF7/8wvRUL3YzaUL5whQUYT+kozYz74YK6leWp3PlvAVnm4s5uR9 Iu2pOXqqbnZCrQjafcdmB6kwrrfUQGEj4dFJl2NeC4oO8IPwRt7hH2SSbXHtBlZ4uaRb fllXx9RJQYJibPOHc6wE3sMh1NTAUBl0MvorR9yV8xKNTFR783oXdpIYQpQhUnoO7oT4 r8oA== X-Gm-Message-State: APt69E0eB6wx7gh3CS7HYYkkn7rPcnX04qImaz9+eoxpDHiHmOinTTCq 7T4n8MNZc4NXN4CxEyX0EHssEQ== X-Received: by 2002:ac8:26c3:: with SMTP id 3-v6mr14791346qtp.151.1529410499093; Tue, 19 Jun 2018 05:14:59 -0700 (PDT) Received: from xanadu.home (modemcable228.104-82-70.mc.videotron.ca. [70.82.104.228]) by smtp.gmail.com with ESMTPSA id a18-v6sm12925533qkj.60.2018.06.19.05.14.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jun 2018 05:14:58 -0700 (PDT) Date: Tue, 19 Jun 2018 08:14:57 -0400 (EDT) From: Nicolas Pitre To: Joe Perches cc: Andy Shevchenko , Greg Kroah-Hartman , Dave Mielke , Samuel Thibault , Linux Kernel Mailing List Subject: Re: [PATCH v2 4/4] vt: coherence validation code for the unicode screen buffer In-Reply-To: <800831730e3aeaf4da23f7f97cfa80103236c3cb.camel@perches.com> Message-ID: References: <20180617190706.14614-1-nicolas.pitre@linaro.org> <20180617190706.14614-5-nicolas.pitre@linaro.org> <800831730e3aeaf4da23f7f97cfa80103236c3cb.camel@perches.com> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) 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 Mon, 18 Jun 2018, Joe Perches wrote: > 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. Remember that this is costly debugging code that is off by default. No production kernel should have it enabled. Nicolas