Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8203155rwd; Tue, 20 Jun 2023 11:35:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+eIF1Fyx0dgUBpQj8H5nTKGr7+42+jBbw3H1btpme8oIkk8yz+sqmwi2AEixiyMzaszbp X-Received: by 2002:a05:6a20:8e01:b0:10e:f1e3:8217 with SMTP id y1-20020a056a208e0100b0010ef1e38217mr12457488pzj.17.1687286147584; Tue, 20 Jun 2023 11:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687286147; cv=none; d=google.com; s=arc-20160816; b=oQLtMBRRN+/2ogM2iAmtfMZENJgYLBVI9JKQY5Yu1ze2bcjCURSERoEsP/056Qxj0q 4NAbHggHaLxYlCD53b3Pvaw+ndbTUopI+igMliAhr8yTvmRpkcxFLjf9U7yoEeNMjz4y z1ZB7E0VO2MW04Csl+Kqj8y3hofhwgw81jMqCpMtL/KPxUXRQ93NoKhqa3dUV6tRl2DH dBLra6pfn1RmnyabHKhkvuSgk8yRMgG34VRNKAOqA+NExJ14VUcTxntuhtPldesIb5ey TpdDNe2+7DVmaeZ5e8ni9HF7qkLO++yrjyJzjNPXMqyWOs8fDlv48s3pBXe0AAtWjSML ARbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=fdOtLIk2K8UpvLiDNPPffSXLE4Yi0ykkhdjE2jmtkVU=; b=b4QBWUKZ8+N6pVTfa0oSifKyKwHXO8i+oRGgjfwBVu3hykae+S17umhcZ/k7r9SvWO ZBhJX6NHx/aFm1L4UvIZtbN/NKigAWI8yoVse8/RGRlscIc9kRvzfm6jcY1dG8lAsE+j 5Enz1AcEM08r0RwFyOc+AsLzPP1nfhH9oKupoItvSd6FwhZ9LIpwMCRLtz8vq36Pq6JS EM/+90NKagKvx/rnbKpjm4pDOop9mxgFr/wTLhteFqyjABIsjMKQzRyhEwkESG+zeXCB zlv1dFOU+43/kTd33DT/mFVpGJ3J4qQmSRlfYjEK8xNRbrl0duI7mQF99rQEL8DJtd6C AVVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OKRX26P2; 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 k63-20020a633d42000000b00553d7157e83si2236995pga.134.2023.06.20.11.35.35; Tue, 20 Jun 2023 11:35:47 -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=OKRX26P2; 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 S229692AbjFTSTa (ORCPT + 99 others); Tue, 20 Jun 2023 14:19:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbjFTST3 (ORCPT ); Tue, 20 Jun 2023 14:19:29 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCA351A8 for ; Tue, 20 Jun 2023 11:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687285168; x=1718821168; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=fxp7O1IFxzgSra3+U3m4CdtMmU0xIakqiwOKj7ZMuzc=; b=OKRX26P2xfDuDXHuogAZlOLCQshO1ptM5SxETE2boW46K7DgWFrCdkcU foQhNqw8ImGIez0fQI6CY88jv1D8rYrZBqb+1qCZ9+5UIYh2XsNlII5yp rEjCSC6h+PmgMC0U5qAOabhM0SvO2JlJzoZLjw1bLw9zQzh76UzggDPJa duYeranOu1vfID7rz1ie1f4XU34qDvuRroq/2yr89hXuqhtqNWIkhE18Y 1ekqmBbQtsM4b3+Tc7sCWgsC948JdOMLaA85SGg67CH1De8XNMYR6ON+y /9YyyQeGl+BCl9nyYntDsb7iF4rxj7gCAWeFwKrLnFUwpm+4QwzjA0dBF Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="363368698" X-IronPort-AV: E=Sophos;i="6.00,257,1681196400"; d="scan'208";a="363368698" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 11:19:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="838309700" X-IronPort-AV: E=Sophos;i="6.00,257,1681196400"; d="scan'208";a="838309700" Received: from dshvarts-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.62.204]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 11:19:23 -0700 From: Jani Nikula To: Andy Shevchenko , Lucas De Marchi Cc: Andrew Morton , intel-gfx@lists.freedesktop.org, Kevin Brodsky , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Christian =?utf-8?Q?K=C3=B6nig?= , Alex Deucher , Thomas Gleixner , Masahiro Yamada , intel-xe@lists.freedesktop.org Subject: Re: [Intel-xe] [PATCH 2/3] linux/bits.h: Add fixed-width GENMASK and BIT macros In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20230509051403.2748545-1-lucas.demarchi@intel.com> <20230509051403.2748545-3-lucas.demarchi@intel.com> <87pm75kd0h.fsf@intel.com> <87mt29kc34.fsf@intel.com> <875y7igph5.fsf@intel.com> Date: Tue, 20 Jun 2023 21:19:20 +0300 Message-ID: <87ttv2f13r.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain 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 Tue, 20 Jun 2023, Andy Shevchenko wrote: > So, what does prevent you from using GENMASK_ULL()? > > Another point, you may teach GENMASK() to issue a warning if hi and/or lo > bigger than BITS_PER_LONG. What good does that do if you want the warning for a fixed size different from unsigned long or long long? Worse, sizeof(long) depends on arch, while the GENMASK you want depends on the use case. > I still don't see the usefulness of that churn. This thread is turning into a prime example of why drivers and subsystems reinvent their own wheels instead of trying to get generally useful stuff merged in kernel headers. :p BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center