Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2293214iof; Wed, 8 Jun 2022 01:39:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzs39UiC0hlwgqOfGzYcqZbPv28aBWSY/8gKAt0k/33YgxuKQ/tQw4dMJs2AqjL7m8qpWZm X-Received: by 2002:a17:90a:1150:b0:1e3:2d6b:7a8e with SMTP id d16-20020a17090a115000b001e32d6b7a8emr48181683pje.188.1654677565816; Wed, 08 Jun 2022 01:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654677565; cv=none; d=google.com; s=arc-20160816; b=cDninJ5+OPGh9QFSOMqxC7RNNrUxwSTK4l0jIFcXGi7sgRWdzgmR7SMxV1dQJQuGWI ezWDB6I1YcE3Z/wKuwQxuRVfC0YsNiNLcPLcws0/4vUMBXBXZaU49R/EWgDEBvRp1CEI kTLyzexi6Wzx+4UbNHI/E52a6pxECWU1RHz58bJbBl3UBFTFUaH6MWAaI/DeoM+BgyUQ fDSxAnPh5B1TZQ0ipGnCuhkHjwsAUQDCKVzVsmQcIi4Iy7fObgsOhV/0lOsupB7YQKGa aLKyOc7ijqLzfiVOpdcioRkKCwaisjONsBdpAzeb4snsl0dpSkMCmFDwHo1zaPrrOSEN JYyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=IebUOuXZgGMy6rP6OXWxE6gEj78V4TN+Hj4F0d0N5dU=; b=HofVQb1mEj3YyBqtp75K3HGnhZt89VTeX1cE7IJgwmW0yZv89o3eFhinJXnd1FEwl/ Q5C5BzAmgvzr5VBZ77MhKzayVTf1cOxzH95bLC+y4M7kY7Rzhc3NN6CTFnyAD3PjF41D 6Af2qafFuG0al/cHnXbGRy6YobDVojnhe/d6PJxxe4EyHruh6iWxDmGfU7YEI3j/jdcG Mpq6WbTkivZA0wChzgAK1GiZ7+emhy72nRYXcbQqSClEpD4JBniBL43/1oJx2aJzERru eE0sinn7NjvXAZkjqKD3umGhFchAZ8CZtRA7ckk05j3iXjWffNGWUdgyvoI8xusFZdRn eMGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ajwnL4PU; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i69-20020a636d48000000b003d8204bc333si30571532pgc.616.2022.06.08.01.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:39:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ajwnL4PU; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3FC1124A1F1; Wed, 8 Jun 2022 01:03:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbiFHH2g (ORCPT + 99 others); Wed, 8 Jun 2022 03:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345627AbiFHHVQ (ORCPT ); Wed, 8 Jun 2022 03:21:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A66D1E0AD1; Tue, 7 Jun 2022 23:56:27 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3C7DF1F892; Wed, 8 Jun 2022 06:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1654671353; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IebUOuXZgGMy6rP6OXWxE6gEj78V4TN+Hj4F0d0N5dU=; b=ajwnL4PUcLY1j9dRjoQXPjxlOHNenz0KMt+wfS8+qgyME5mhN+GMuOyjnovlVoQ51ggvyc /5Yb1Cf3fRr5nfLk2gHHugShl3QQ2bmsXDAuqZ3wE4snTRNS2vjRizytSfp2tZDuYLVUTI 0m/DiEjSNJ2iqVyyOqTeY282cJQI+xc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1654671353; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IebUOuXZgGMy6rP6OXWxE6gEj78V4TN+Hj4F0d0N5dU=; b=OdL/YLPirGKwgC+6hRMQR8eUBqwCeczQz+TgN70t4rALeHL87u7A1HKdY7hECnVgiwKHrq BtBMR9CtC67IYZAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1F99D13A15; Wed, 8 Jun 2022 06:55:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MbNZBvlHoGJvDAAAMHmgww (envelope-from ); Wed, 08 Jun 2022 06:55:53 +0000 Message-ID: Date: Wed, 8 Jun 2022 08:55:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 03/36] tty/vt: consolemap: define UNI_* macros for constants Content-Language: en-US To: =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= Cc: Greg Kroah-Hartman , linux-serial , LKML References: <20220607104946.18710-1-jslaby@suse.cz> <20220607104946.18710-3-jslaby@suse.cz> <59e0ae93-c7b-2087-75f8-4da0de918250@linux.intel.com> From: Jiri Slaby In-Reply-To: <59e0ae93-c7b-2087-75f8-4da0de918250@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07. 06. 22, 15:21, Ilpo Järvinen wrote: > On Tue, 7 Jun 2022, Jiri Slaby wrote: > >> The code uses constants for sizes of dictionary substructures on many >> places. Define 3 macros and use them in the code, so that loop bounds, >> local variables and the dictionary always match. (And the loop bounds >> are obvious now too.) >> >> Signed-off-by: Jiri Slaby > > Reviewed-by: Ilpo Järvinen > >> - for (k = 0; k < 64; k++) { >> + for (k = 0; k < UNI_ROW_GLYPHS; k++) { >> glyph = p2[k]; >> if (glyph >= 0 && glyph < MAX_GLYPH >> && q[glyph] < 32) > > Probably unrelated to this change but what's that < 32? It seems to appear > twice related to the inverse mapping (and you didn't end up naming it). That's ascii C0 test _IMO_. thanks, -- js suse labs