Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1540930rdb; Sat, 10 Feb 2024 06:23:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZ2nGvfmkZU2VVRp4jmS145UOP/LJL3qzRvUecJeIDhVcYPY/5BPRqrLMs0hrKo8tcm2P7 X-Received: by 2002:a05:6a20:8215:b0:19e:4e58:4f04 with SMTP id w21-20020a056a20821500b0019e4e584f04mr1760920pzb.61.1707574988651; Sat, 10 Feb 2024 06:23:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW1wMTAye7Zjkk3nc6qakYMBiUjw82Pafum5914cBChfIdSoBlQQh/FnEkZsG1Br3gsj0vWtPSQQVSbrRmgQ8W6H0z6q2bYtzO1T9wzjg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w69-20020a638248000000b005dc55682d93si2672791pgd.295.2024.02.10.06.23.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 06:23:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60424-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-60424-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60424-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 01921284182 for ; Sat, 10 Feb 2024 14:23:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 221A854659; Sat, 10 Feb 2024 14:23:03 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) (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 BF72F53E30 for ; Sat, 10 Feb 2024 14:23:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.86.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707574982; cv=none; b=n/VSn3fwMpdZst5MQghMb9lSVIbJ1EAXems6iFl0qvOoBdkY6kCIg8nP0E6VcOnvBBPtGZrpzzVkA0wfKImyXtNZ+ZsBZYtZKbxbPwS/j5VkG0alx6kur9iI9UbDqOuvyZBtnXmEmLWKe+VHE8e7RQI6vmiu+piTseYyBV2HpbE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707574982; c=relaxed/simple; bh=OCdrhsWhvA4a4/A756/EUUI1BZgzj9AkFJv1Fy6Ehpc=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=i85F5f/c92+02H15ZPFX1Vf2IwTGvlR8g42pYCJJoLeRxM8O9dIkD8gEAo3ALOs9FEZzmchEauJWuRIfCrJP7Q/hu1kCksG3/Pz/Vxe8mRFiIe0eLA0wMox0yjfDZzau348OZ1Z38hhtUt/F8E5UiZIwG1szOkYAQOns8IvUTJg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.86.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-285-P2GNB8rOM5-27t9QbLe7Bw-1; Sat, 10 Feb 2024 14:22:57 +0000 X-MC-Unique: P2GNB8rOM5-27t9QbLe7Bw-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 10 Feb 2024 14:22:36 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sat, 10 Feb 2024 14:22:36 +0000 From: David Laight To: 'Lucas De Marchi' , Andi Shyti 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: Re: [PATCH v3 2/3] bits: Introduce fixed-type BIT Thread-Topic: Re: [PATCH v3 2/3] bits: Introduce fixed-type BIT Thread-Index: AQHaWtQsWHNiAo+Zx0GwnNabxeNy8rEDowcg Date: Sat, 10 Feb 2024 14:22:36 +0000 Message-ID: References: <20240208074521.577076-1-lucas.demarchi@intel.com> <20240208074521.577076-3-lucas.demarchi@intel.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable .. > >> +#define BIT_U8(b)=09=09((u8)(BIT_INPUT_CHECK(u8, b) + BIT(b))) > >> +#define BIT_U16(b)=09=09((u16)(BIT_INPUT_CHECK(u16, b) + BIT(b))) > >> +#define BIT_U32(b)=09=09((u32)(BIT_INPUT_CHECK(u32, b) + BIT(b))) > >> +#define BIT_U64(b)=09=09((u64)(BIT_INPUT_CHECK(u64, b) + BIT(b))) > > > >considering that BIT defines are always referred to unsigned > >types, I would just call them Except that pretty much as soon as you breath on them the u8 and u16 types get converted to int. If you want them to be an unsigned type then you need to cast them to (unsigned int). =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)