Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2190938iof; Tue, 7 Jun 2022 22:41:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFAbBK2V0nXQ+1OeTeZmRYbbnKggHshsPrigSBJRF0t6VyGlMGAmSdtd9X1nOfes7jrYyn X-Received: by 2002:a05:6a00:24c1:b0:518:c52f:f5 with SMTP id d1-20020a056a0024c100b00518c52f00f5mr33249010pfv.15.1654666913039; Tue, 07 Jun 2022 22:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654666913; cv=none; d=google.com; s=arc-20160816; b=rDDI/FV7yfUFQIFU0WwyndU0m4aPW+dhMuXe+x6giJ7VopZPNdEGnUrWaRN/qwcOxS WXY6yRvlCU3OoTFtmL+vISH4Pi8AEoNhxbMJ6wkN0pbCEfAwQPgMgL4OFTsrup9il1vi RhRwyCrS8oCaYsaCr0qMt7K2mUrhNr4hqh9WXk7eC6nm39E962IDQgTwsXoOL36xnvp0 NKHAXC7qqT3AS16sz19bBOQj+jSi1MBK04W20LPmhqT68Kkw8G4VjjQ7EgCcjDcGhU5Z gH81rqOLCQ8fQbHqEScrrwr69gZRP720K+CYftD0VZJjW2I2kSosuccLkGJwJei73tdl 6MTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=5Pq/2WmxvUf3fLeQi7VOXBRUj5CoHzMCFygq1Xg6jnY=; b=QnBpeANEQoi41cNIGsDx52ld5MU8TN1n13n+GSsL0rzO4bAYnGkT1n8DGpaiZJOldz pdr9aNeZzi2kmcdSrOmDVjZJtN3HAC7ZdhiegoI4xoYDaXEM7rBLMFFCoJXQJbkCsDSE u9J+Be+n18VPfEKtTOXMjBPnoQJgns/VOtdGRPiSWxKQ/1D4MCU+cbalPelo1XwUTrpa hgQ/bLVTvxg6e8r+n1lADHe8GiW2UlhdaqTjWSldxSs3p/+MmOiVZY2NbFV/mqa8JV5r j7fqW4CtjucWZqMBCJOSW++2FbB4nHOj4cENnoq29orOfQqC/gCgvKY8s45N0qwKfact XtsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FCsvp1+L; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id nl7-20020a17090b384700b001e895fed1e2si8215782pjb.130.2022.06.07.22.41.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:41:53 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FCsvp1+L; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 8A2D43AA9C1; Tue, 7 Jun 2022 22:07:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244859AbiFGNgn (ORCPT + 99 others); Tue, 7 Jun 2022 09:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244847AbiFGNgi (ORCPT ); Tue, 7 Jun 2022 09:36:38 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC1F5F5061; Tue, 7 Jun 2022 06:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654608994; x=1686144994; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=6yxE0YEFT4sCKWHndd+S7xEcoefnVAYtf/Dh/JT+JA8=; b=FCsvp1+LxJeXDfe+HcyBE/RYr1XZBfH9m35JwgR4mZ7l8wC3luYOrBuq TBsJx+QVoWiSJZPFaadZ0Q9jFq+7/Nl/5t/T1d9CbIytIT707fvzcQpTu 8fj2TqGVY75VTNlBgZgmGDeKgJmYz0qcC9C9V3rW5Ju8thnrLcYbsqbet 1Tnhs8ZGdwtG5OVjUT8tYc4pa+VPSYnHuVhwUpnTwCoeUBTLVUMxYPBvK 2qurAJ45GwGkvaKTqnTCOLb1zaiknh86MW7RUxXV+ZD7Fb80PTZgHscEu kekMm3OnfRszK97W14quHZpStoa6w6FOtHSloyt+J6OGuzxskNCECyKvR g==; X-IronPort-AV: E=McAfee;i="6400,9594,10370"; a="256557852" X-IronPort-AV: E=Sophos;i="5.91,284,1647327600"; d="scan'208";a="256557852" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2022 06:36:29 -0700 X-IronPort-AV: E=Sophos;i="5.91,284,1647327600"; d="scan'208";a="584201116" Received: from akmessan-mobl1.amr.corp.intel.com ([10.251.214.146]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2022 06:36:28 -0700 Date: Tue, 7 Jun 2022 16:36:25 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Jiri Slaby cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/36] tty/vt: consolemap: use | for binary addition In-Reply-To: <20220607104946.18710-9-jslaby@suse.cz> Message-ID: <76b4c430-50ac-9c7f-a34a-b9fc12fc760@linux.intel.com> References: <20220607104946.18710-1-jslaby@suse.cz> <20220607104946.18710-9-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1617839474-1654608989=:1622" 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-1617839474-1654608989=:1622 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Tue, 7 Jun 2022, Jiri Slaby wrote: > Unicode letters are composed as a bit shifts and sums of three values. > Use "|" and not "+" for these bit operations. The former is indeed more > appropriate. > > Signed-off-by: Jiri Slaby Reviewed-by: Ilpo J?rvinen > --- > drivers/tty/vt/consolemap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c > index f97081e01b71..016c1a0b4290 100644 > --- a/drivers/tty/vt/consolemap.c > +++ b/drivers/tty/vt/consolemap.c > @@ -265,7 +265,7 @@ static void set_inverse_trans_unicode(struct vc_data *conp, > glyph = p2[k]; > if (glyph >= 0 && glyph < MAX_GLYPH > && q[glyph] < 32) > - q[glyph] = (i << 11) + (j << 6) + k; > + q[glyph] = (i << 11) | (j << 6) | k; > } > } > } > @@ -788,7 +788,7 @@ int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct uni > continue; > if (ect < ct) { > unilist[ect].unicode = > - (i<<11)+(j<<6)+k; > + (i<<11) | (j<<6) | k; I'd have added also the spaces around <<. -- i. --8323329-1617839474-1654608989=:1622--