Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp504510rdb; Thu, 8 Feb 2024 12:05:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNz8BEjlG+0cWRAh7kfUi84F0kSNS0QAXBri8mBD/8LPJopFPavlKoe+rJC4fStOl8GJRc X-Received: by 2002:a2e:88ca:0:b0:2d0:c9b5:7257 with SMTP id a10-20020a2e88ca000000b002d0c9b57257mr268819ljk.8.1707422708649; Thu, 08 Feb 2024 12:05:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXMgSQx+OXffx2YDyKJaJd4XykxujOgfd/3VMVLqnv43h9Y15+C+bCfyU+s7OhmYNweDoF7UZb//L9/GMcwqX8ryQA+GbeYNGDb7g2mwA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dy20-20020a05640231f400b00560bb2b14fbsi64918edb.136.2024.02.08.12.05.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 12:05:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58643-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=YsulmrBi; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-58643-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58643-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 604261F22087 for ; Thu, 8 Feb 2024 20:05:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E201B383A0; Thu, 8 Feb 2024 20:04:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YsulmrBi" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5ECBC38384 for ; Thu, 8 Feb 2024 20:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707422696; cv=none; b=Ig5XSyQXpSYvdHoYXy1aHNRf+sw27PnnzMmqqUfPC8M6B91u/IBGLpKbNvOFXS3ESwtwAXPjypxYhnIzsZ/7sqSPSK23Q63rF9IeenxQ2mefY+x0fJ1CMIwHueCOLnnAYLhAhiUdP38mUTZuOollOIwbNlPbOXV1lVOad8WxLvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707422696; c=relaxed/simple; bh=3z64KEFV+ywZgeTSGpLc92WSDJ22y1rSBk7p5RJceio=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dCYwLRYM2uFYaQvdaUEKBxussWZM+ceTlhTOq/ZVCla9NDW/DqQU/QTOVSf1OlA0pCV7q6L5+pGak9PlkyeBVNg+/pZ01GEdykfdxdYLOYuvrQTCxekUOLawAixXu2uj+SfzC8JVHfSJwnyGlfDi4pVXiATY6Ib39L7CUBlEDZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YsulmrBi; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707422696; x=1738958696; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3z64KEFV+ywZgeTSGpLc92WSDJ22y1rSBk7p5RJceio=; b=YsulmrBiJURUTiaY24gdse/X4MlLvV6EzVijVrpAHwj35axDf8nwyrRS O172im+nct3MJD1eG9M9OOIHMBLP0Gohpwq9sg9J6iSGJejhcDZZpNz8q jq6/0DW8X+N8soYJ/rk/uNZoHMAmQ2SOHadB40jHy/ttOo22AhGdfF/Po R/7uAWgdH/Z91TWdkXTFsv6SJXmJIqCzsfYm8eZsrIaLmY1airsWD4eS3 UPGQbzodKekz9ZQTJF8DnWongbCT++hh7OAxiXZUTu31J2iUY4whmfoom rBQfsOed3O96dgh01zmyN+nJ7nl+CZIYM7gX5U++0jp3qBjNrYJDraW9r g==; X-IronPort-AV: E=McAfee;i="6600,9927,10978"; a="12675169" X-IronPort-AV: E=Sophos;i="6.05,254,1701158400"; d="scan'208";a="12675169" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 12:04:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,254,1701158400"; d="scan'208";a="6409306" Received: from udig-mobl1.ger.corp.intel.com (HELO intel.com) ([10.246.32.229]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 12:04:48 -0800 Date: Thu, 8 Feb 2024 21:04:45 +0100 From: Andi Shyti To: Lucas De Marchi Cc: Yury Norov , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andy Shevchenko , Jani Nikula , intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Jani Nikula Subject: Re: [PATCH v3 2/3] bits: Introduce fixed-type BIT Message-ID: References: <20240208074521.577076-1-lucas.demarchi@intel.com> <20240208074521.577076-3-lucas.demarchi@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240208074521.577076-3-lucas.demarchi@intel.com> Hi Lucas, looks good, just one idea... .. > +#define BIT_U8(b) ((u8)(BIT_INPUT_CHECK(u8, b) + BIT(b))) > +#define BIT_U16(b) ((u16)(BIT_INPUT_CHECK(u16, b) + BIT(b))) > +#define BIT_U32(b) ((u32)(BIT_INPUT_CHECK(u32, b) + BIT(b))) > +#define BIT_U64(b) ((u64)(BIT_INPUT_CHECK(u64, b) + BIT(b))) considering that BIT defines are always referred to unsigned types, I would just call them #define BIT8 #define BIT16 #define BIT32 #define BIT64 what do you think? Andi