Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2127567iof; Tue, 7 Jun 2022 20:39:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkSiDzG2u28x9Knq2PKutMceCQ3nfGVLJyq5lNA4S7H90pKHcOZBRLZlSwUho/y/NBf73B X-Received: by 2002:a65:4c44:0:b0:39c:e0b5:cd2a with SMTP id l4-20020a654c44000000b0039ce0b5cd2amr28087315pgr.481.1654659575551; Tue, 07 Jun 2022 20:39:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654659575; cv=none; d=google.com; s=arc-20160816; b=TqhVkdqmzHJJkDZwmzf5lwG1wf3hxpv8X6ba/gWcjYUdfGqinZegFiM0d0KByqFN0b +WWqUNa8e1zX8ozl/WUvxjeE40HJteHO5vRAgEUjLd6yF15iM0XqF+S/TX12VTfqAism 2W9f6naktuql+D0/6zuQc9GADQd1H0nJgof+BQphxPMqNsldzmJ8rNHVMk5NG+AS4gVT 9eRuioJbh1DkBsfEMb2x6qcN7aaxS/TmQjd4Me5one292Qy1ZUBRofll6UQJ5wKGEXKF LAfcU3i6xthjJWHPSBs4ow9VFL82dpsW2YXPuA5ntiDN7E6EHf1efG71yJLlWorbJlhT HfLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-id:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=0BKDFGO84vm7cycIJ3usvPb2MwR/YikHKrOEB2dvPEo=; b=BD+R93YngBMy5yb7lg3ilj5m9QvyaJX/l+E0igVykUgWVrlGc8V5CVM7LiClaQJ8RT +mGdFqlMBkcHfiqxfVCl75VVx4/McP0cHwlAvChqo7ImuYTiudq3eOR9sF9ZzvdFkW3x XrNMuTWzFBwn6h5LnxgYIIafqxxIaMhY8TGol+7Bh3P2NhMbcMPLvd0GKIyAedL4FUA9 VZ/SOMRZQaMnpPP+Thy7ctXHa4dfx4SzCPNsSageVTzhk4gvvJxsHmkTt3BiGc0rNrrQ f4/Jx1ThKTAe00HAVCM/qfNRwuQAbi+8BXGHa79LCZjevxGl6q9rhUUKjI/6XkJICb/l dAXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FHXsuwGp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x18-20020a634a12000000b003c22450c09fsi6719356pga.838.2022.06.07.20.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:39:35 -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=@intel.com header.s=Intel header.b=FHXsuwGp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BE2C4276CC4; Tue, 7 Jun 2022 19:57:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243428AbiFGNVK (ORCPT + 99 others); Tue, 7 Jun 2022 09:21:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234281AbiFGNVJ (ORCPT ); Tue, 7 Jun 2022 09:21:09 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7786069290; Tue, 7 Jun 2022 06:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654608065; x=1686144065; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version:content-id; bh=7M5Zbf6hRRdvfgbssy0k9CPN3f/nvfC3XOcth6rYGQk=; b=FHXsuwGpLGZWha5LbKRCDBbsq1MM68THXH+D+IVm6uo8+NwjPA0NFLo1 b5lRFgvwyiLwIj5tTeg5yaj1TynWY494DgU/Ci/OlBwSFEfKI8dqfGyEe f6har4NkwRD52rrDTAJlq7F9OPWO8tiGQjuisCxk0PbTBYnzX3jPGjZTa yxDCdirecVN2wRv4wSbBAlxjwmxFPxGNHImu5VRuqQul0QRedwmhF7OMm sLHbCc32NuwbH3TQBxjbxyFpR3GuccOmJe6vhj5agjSdZ/D6RgdalwoWn AUiWkvFuC2Cew1xTrTylxGrpI9Hq225mSYllvzZiA5dWlidP3+8qYyk7G Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10370"; a="277508732" X-IronPort-AV: E=Sophos;i="5.91,284,1647327600"; d="scan'208";a="277508732" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2022 06:21:04 -0700 X-IronPort-AV: E=Sophos;i="5.91,284,1647327600"; d="scan'208";a="636122037" Received: from akmessan-mobl1.amr.corp.intel.com ([10.251.214.146]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2022 06:21:03 -0700 Date: Tue, 7 Jun 2022 16:21:00 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Jiri Slaby cc: Greg Kroah-Hartman , linux-serial , LKML Subject: Re: [PATCH 03/36] tty/vt: consolemap: define UNI_* macros for constants In-Reply-To: <20220607104946.18710-3-jslaby@suse.cz> Message-ID: <59e0ae93-c7b-2087-75f8-4da0de918250@linux.intel.com> References: <20220607104946.18710-1-jslaby@suse.cz> <20220607104946.18710-3-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1534695395-1654607902=:1622" Content-ID: <7e28987a-6395-d443-4367-a4e8891c480@linux.intel.com> X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1534695395-1654607902=:1622 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: 8BIT Content-ID: 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). -- i. --8323329-1534695395-1654607902=:1622--