Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10160728rwr; Fri, 12 May 2023 04:50:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7oMIXIZyThZ1wQudbpmbKMkyObw5nDLJFZ1B82NhePbxBIDIALPGLz+p41OBB8zmPlghZS X-Received: by 2002:a05:6a00:140f:b0:63d:24d0:2c32 with SMTP id l15-20020a056a00140f00b0063d24d02c32mr29207906pfu.33.1683892219623; Fri, 12 May 2023 04:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683892219; cv=none; d=google.com; s=arc-20160816; b=d+qpyAXLiDmYcTByItG+Rd4K+MQf2xvh8EdB5HqEdai9kyuUUwqpicnKasggWoiZ/y JtT0pIVUhGu0m0eMoEyVG+SYX+TXVWzhYu+Knor9s7Ue5i3siIGwQnl71vsV2+mtnPJ6 K7v7ydz7PAF8PX7Ct3fvovsqZmXC8BHP7P2JZf7vsYvI5sdAwZAeRUs8Y+tgj8dcYGYb KqEmpCUYiQf5foi6tNrcSmCd9eNYOE9YtVLu2pLE1Bp8F8jxaJSUSUe6jUyRQPdVdXKh WhR2x+cbzGbxq5xbP02VrqufBwBQzThcoDdpdFjo13TKeGYC+K4MIpe+wivOvVgk1GzX LZmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zD2DEznD95ecdDV2rNtzupHgSEefC1Cfi75lv6xZqmM=; b=ngD0wPMQZcY9ZJ8OeI72/Z0uojvFvsTDs0bPavyX8uSCDI5KSSXQMt7xmu8syTsSj5 ZA5JButC0kkA1g7IrH47nXzq7fRjBOJeWtqDkkf4SlxmZ81ITBJETmB+F7zVUc9OpS6C J79vaIITzaTe4FSmhZofKbQkVTVean9hRT9g5uE2GT6idFbOD87g0VGHF0/Lia6LoOfv Q1TT2HBM3m6kKd8leYT53udTU5dnGzdQU4Ggdf10KvmQjkU9fYL5B2deqjFiq9t2Xpsj iCfB+eLITHhIoK96d7UM6GVSvf26WnqyoXn9Ipp+MDlXjOWup+OYBOUg/M9E7d+AoFsJ 9xOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ed7MGzof; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u145-20020a627997000000b006391322d3f8si10234296pfc.375.2023.05.12.04.50.04; Fri, 12 May 2023 04:50:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ed7MGzof; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240949AbjELLcj (ORCPT + 99 others); Fri, 12 May 2023 07:32:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240422AbjELLci (ORCPT ); Fri, 12 May 2023 07:32:38 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 746FBD05E for ; Fri, 12 May 2023 04:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683891157; x=1715427157; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=PlHNHEaJon/oJdxYet2+Rcf4b0HwSMJh2UW6z3HY6GY=; b=ed7MGzofmHZ0b34bZmOLJTIx4VmJDkHGm6omnzltlyp1LZLf35r2ov5s gIsUOTRltYEk37qX/c6SR+RvS+tX0tgU9BmlmtXJ0qUtGvZcf1O3BkV27 veYqDU+Dl0CqkheSZf//Jzd0545c0qKuDjRTgLZGefjTCCx9lUInKuBAi xAhpXOKTTgQnKoRL8xBitkttVwrFF41Uokrahioclo3rMjTV7erjp9mRt +xpSMEyYdrYoDSCqeHY8krMxCQsFeCS72fl6THBQxhBMCoQPBV8S5sq44 zyPsBwAgR0lKTW/G9EebYfCXd002WIEdIt4Sw7wInA7QK55urishStp0Z Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="350792976" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="350792976" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 04:32:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="703156706" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="703156706" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP; 12 May 2023 04:32:34 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pxR0i-0004cE-1c; Fri, 12 May 2023 14:32:32 +0300 Date: Fri, 12 May 2023 14:32:32 +0300 From: Andy Shevchenko To: Jani Nikula Cc: Lucas De Marchi , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Gleixner , linux-kernel@vger.kernel.org, Masahiro Yamada , Andrew Morton , Kevin Brodsky , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [PATCH 2/3] linux/bits.h: Add fixed-width GENMASK and BIT macros Message-ID: References: <20230509051403.2748545-1-lucas.demarchi@intel.com> <20230509051403.2748545-3-lucas.demarchi@intel.com> <87pm75kd0h.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pm75kd0h.fsf@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Fri, May 12, 2023 at 02:25:18PM +0300, Jani Nikula wrote: > On Fri, 12 May 2023, Andy Shevchenko wrote: > > On Mon, May 08, 2023 at 10:14:02PM -0700, Lucas De Marchi wrote: > >> Add GENMASK_U32(), GENMASK_U16() and GENMASK_U8() macros to create > >> masks for fixed-width types and also the corresponding BIT_U32(), > >> BIT_U16() and BIT_U8(). > > > > Why? > > The main reason is that GENMASK() and BIT() size varies for 32/64 bit > builds. When needed GENMASK_ULL() can be used (with respective castings perhaps) and BIT_ULL(), no? -- With Best Regards, Andy Shevchenko