Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp539813rdb; Thu, 8 Feb 2024 13:17:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXSFyVsOahS4Is0rU8FuayslJtphLOda1qOtxG1luwGkGkfQllmEHjRomLOaezlvXnRxyRB/7N8/FVV9N5ptFUB4UZGAQil7K1UKZo9QQ== X-Google-Smtp-Source: AGHT+IFnYAFzMJE3+VK/E1gpD86Arpqvr28jsVoOOFtkNdZmXGPqHmE+YUYSNyLLpkbXqujFkUJ6 X-Received: by 2002:aa7:d145:0:b0:560:1372:d950 with SMTP id r5-20020aa7d145000000b005601372d950mr303927edo.22.1707427078429; Thu, 08 Feb 2024 13:17:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0gc4d64n+YEnYMiuYCO1rTVvGnoYudmjlGT/Bt27FJ18BcJWdCTXpMZJWgSnE4hGJJfMKw0xeViOEmxqrF4tWrWV/stB4RiijLv0U2Q== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id di10-20020a056402318a00b0055ced896819si112647edb.212.2024.02.08.13.17.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 13:17:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58702-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Ka0b/hC2"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-58702-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 474701F26DF4 for ; Thu, 8 Feb 2024 21:17:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D99AE4F1F2; Thu, 8 Feb 2024 21:17:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Ka0b/hC2" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 A2BE34F1E8 for ; Thu, 8 Feb 2024 21:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707427035; cv=fail; b=mtqbkHdMCvFCy+je75CtvJs5xb8lyLR5GwQgYdiXvnFbSxbXBF1N64SjHbKC2wNd25v16kYyJ/ZRnc9SYtATgZA9hMf/6shDPH6IO0mlQeb47oZuTfdFGZo8hUwMRWEzRoKITLeLc0NEZIwYBlXYr96BBQYMqX3ZiezgyTau/gA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707427035; c=relaxed/simple; bh=Wg66Pd47I15VI7LWyfB1wBB78k82Rc+Svvd1Uor1UxU=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=H/y1PDh+mY3CdEasnZY0MQd5JY+5EV4Qdqy6lA6XRbrWxup9TJmgjDZ18gn1wtWtXBsXVBEAKHQkzAoWRqv/sgEEEfSL7BFlS0bJ+dbglhuYa0Lv3Eps7RN5Tpxx+5Ahr67jatIU3DULhJBLZA3ZS9GJae0r3q1udkHkzQ3C9hg= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Ka0b/hC2; arc=fail smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707427033; x=1738963033; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=Wg66Pd47I15VI7LWyfB1wBB78k82Rc+Svvd1Uor1UxU=; b=Ka0b/hC2kNCdJ82hFFLt8j/UfFXUdMtKG8vCeuwhoCYdPayWrrL/myhD C3hlXe27s/XbVunxnBAWNOCNDOsnLjX9uAwekBFwFFbuYRXMBZmZbzULK 0kM5xDe2geUPcyc0AeKGMo7pJ5LKg3O/hpLj0nQ1zJlQI6REPVULX1aaj DHyoYrKdgw/aJQLuq2ueW9yy2KSjp2w31zWC7vYBch1CixOTzl5npF/CD rEeJppNPareRQCgpVSk94beFmOM5df9XcCcRa3Po9kUehUvO4wC4zJow3 fRKyBEnNNyZOyaYOmaR6L8OET49KVVudfuRJR9PvjrFTl/DB8jkfKmUFj w==; X-IronPort-AV: E=McAfee;i="6600,9927,10978"; a="11967429" X-IronPort-AV: E=Sophos;i="6.05,254,1701158400"; d="scan'208";a="11967429" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 13:17:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10978"; a="910510721" X-IronPort-AV: E=Sophos;i="6.05,254,1701158400"; d="scan'208";a="910510721" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 Feb 2024 13:17:12 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 8 Feb 2024 13:17:11 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 8 Feb 2024 13:17:11 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 8 Feb 2024 13:17:11 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yg/wZ8xhJ3IATuH6RSDiZAZ55DNWnHg0Z6Z5NojJ9Uh+HAjm/ASHXobO/xmILQo7sdWD0RRdBIJiitVmDOe0ux3TOmD6feL7rq3bSrhU9UuhNBafrM8Kh2gid8nTBK/yrN6ujZT0nPyGaLKSJpq30dzqUDDeXA3iCAmvaly2xYOgd9vXgV5WDaiPJ1FDOlOuAew1tMByLYnt0lowZMatPV8KD7P0SQkiuSrGTw/WAXb0WU5RVCpHldBlyVhhIFrXNxEE8lKDccOFMVB4G6uXozxf2/8FJ5TX0W2/25lBgxvg/BUZsAzcxK9hKdiE2sjjLbKpVSYTKcDuEyYtiu1qYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kGL6Hg5LWyCRpS1sy3o5J9Ocle0rXK5UYxtklloKaeg=; b=dHNHW/IdlIcvRYMF7Ce76dMItoD9PPJuVV4y1d9WsiGmtBYdpBNRi2lzajcXTT4hH283oaJmu6gTbOiA3voKQgNU2tnG5iE5dEF8ioyXVe7Z4tpw16MBxNp4mzTteFZxUxhHhmACV8pGMipod1EqebP25McOUYGfYChRDWH/dEX5bxtpiuVMRlFxKLnAUCJDwS7QQOS6fJ+Jq9rN7vxSIxgZGjnDu6oqYotg8JyrE9GPPW/Ke/OWPekcdVK4PAMBOg2x+s+vSQEiKkBRYqw3BC4O4QfxRYF3Fu0grEmrAFGMYJrQeDgG6ftLvnqCtuhyQs3BMiEtNRVd0l/rOOw84g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) by DS0PR11MB7506.namprd11.prod.outlook.com (2603:10b6:8:151::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.38; Thu, 8 Feb 2024 21:17:09 +0000 Received: from CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::9f32:ce50:1914:e954]) by CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::9f32:ce50:1914:e954%7]) with mapi id 15.20.7249.037; Thu, 8 Feb 2024 21:17:09 +0000 Date: Thu, 8 Feb 2024 15:17:04 -0600 From: Lucas De Marchi To: Andi Shyti CC: Yury Norov , , , Andy Shevchenko , Jani Nikula , , , Jani Nikula Subject: Re: 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> Content-Type: text/plain; charset="us-ascii"; format=flowed Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) To CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY5PR11MB6139:EE_|DS0PR11MB7506:EE_ X-MS-Office365-Filtering-Correlation-Id: 33260f55-15db-45f1-e750-08dc28eb4f2f X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xAm2iIgSwlKdlLsWafo7E14m/VxtCAga297OtUa1ZEEJR7MZIggAbgBtT7MYwYO0xkMfhax2yX9obioyKFc9eFp27EaNw7WiN6E+/Hjy3xvdVgzZ0qLBijz/oyrOyDm58HJ8MCOlqdkn9Xf1SbZV1NDUm8Usnm1ARO1YRuHabB2n55hvzbJ2owaoDN0JYH0W2/KRDPIHh93IsJQWgzf7ohvUMUby992dS7Y7hQU1POrLniC2V93CqMRySFjsyZ3t3PkDwExAXc1C0UOiJfWlmwfm9L1nHr7yOu9foawF7wmb8Iag9rNU9GMxKDAjnZ5Wb453XZNpfzymeYSi0EHGU+l8hzdEi0CyZj5RUpkEa/qHPiwC3GTjJdfQWpbj/oeXAogBiXKp0ogznUGFgulPx7FygW49L5wpVWWZN8QZiG0DG2JHx4L+s1zRTx9rDGu0J+mNMwmXIYc2kPSTlxiZ0tzaByTptwW3pfAIbU/jSemGRxYcVarf9S5+WvxbgERPAzSDa/VRQGI2FtO7MjooXdg6dL86A15EVKMMRH0+42HA4HM2OvxtUnQoHCSU4fkv X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY5PR11MB6139.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(376002)(346002)(39860400002)(136003)(396003)(366004)(230922051799003)(64100799003)(186009)(1800799012)(451199024)(82960400001)(86362001)(66556008)(54906003)(316002)(66476007)(6916009)(66946007)(6486002)(478600001)(5660300002)(8936002)(8676002)(4744005)(2906002)(4326008)(38100700002)(6666004)(26005)(9686003)(6512007)(6506007)(41300700001)(33716001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zhH+WqL73by5fqOMdWp+0vrLsybOMj0bQaUEmamZcjONkVTiL/sXH/1fVtxg?= =?us-ascii?Q?2wxqN1TDNnyj2zJJ4GbrwUhkmwzoFMo8dCispEjcQAMTSWPJnKyDw9lcN8SO?= =?us-ascii?Q?cNe0Tgr02TeimiUFGwtLCiNoBjDp3m2pl0mSobAsr4POQUVu63g9xTsw4tA3?= =?us-ascii?Q?ceX+cxbZrPYnBt3F7zmTkC21MzwYxFifQQJp88DE2xpCXNxi48fCq8PgoWfZ?= =?us-ascii?Q?ALZH7NCm84KRT6LJIBr4xoS++fK0GaC01sX1gqp0iuC228oFIc5wQ8V467QI?= =?us-ascii?Q?ahLyGoutsEI1mWj+bH/LiIxFv9KRcYG6Cpsoraz7SE8AmPQRvZjYlVU0+Id0?= =?us-ascii?Q?gE86eXDBMauuzKIg/UJC9fzEczzktJxToGOf9HbIO9nVx0IbIUNppPaBa4RD?= =?us-ascii?Q?Y9lOMZ17gtIipnPAW7wJECIq1i3873oPqdc6yFtam5s7EzsFYKSN0I/fm6PC?= =?us-ascii?Q?z7zOr0FKVXjKEL5lIN2U3LW2SD771CoXzKtW/zt9Q8RIsZCgwz27/G0SQY9n?= =?us-ascii?Q?cHAU7e6tUhG/gR7kryD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5cxbLCpI5P?= =?us-ascii?Q?LV3clE6W/hH/4eeuVsqHVw+TJMn4LH4kOVLVBU86hMk/Ljab662wxYZnVuKV?= =?us-ascii?Q?9FmJN8rRAVDUjwh//jIgTxXOIsn8DTndSOMd+x+33pMfpEBKF4sfR7siJ2Bz?= =?us-ascii?Q?0SAJ1lln8akAgggeNaiDaVpiaxcHTdYeh7xFTljE0+f1NRR7a9RY9Cs8esp5?= =?us-ascii?Q?Xw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 33260f55-15db-45f1-e750-08dc28eb4f2f X-MS-Exchange-CrossTenant-AuthSource: CY5PR11MB6139.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 21:17:09.1879 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R5UB5IRQzORGwdfD2RbhjNYJUt3l1L+LFe7E90X2ESxlUNFNY8JVBxyk2vFYh/4P3Yid+7Y/5cMYSBy8cZh21aor77oWgmoJkFaBfTGARKA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7506 X-OriginatorOrg: intel.com On Thu, Feb 08, 2024 at 09:04:45PM +0100, Andi Shyti wrote: >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? it will clash with defines from other headers and not match the ones for GENMASK so I prefer it the other way. thanks Lucas De Marchi > >Andi