Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp708602rdh; Wed, 14 Feb 2024 09:03:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWrlMKokbdA21ruRmgX7m2/osYE1L26kDvHdT0ttSEWz1/MD/z3JJf2p5yJ/m77kGvz4FNpH5t+cAF935R9RU3pWj6dRC57s32vm8FcKw== X-Google-Smtp-Source: AGHT+IFbXj5beVhdeX7ZnP8RHCUZBUoyBrT75roFowJ+RC0qVIdGoWVQrG8UPubmRVL9/n7TULqv X-Received: by 2002:a17:906:6997:b0:a3d:716e:81f8 with SMTP id i23-20020a170906699700b00a3d716e81f8mr441100ejr.2.1707930228973; Wed, 14 Feb 2024 09:03:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707930228; cv=pass; d=google.com; s=arc-20160816; b=yB78y4tH8JRK0Tmib/O9JlGUU5YOzbEAkwbL31rdimEKiVwWVLBoLLJC0iYu5jICPS lzOj5rTzM0wzFvl0lvVbzC1uruOi9Mfy1vw++XEdczCKZlkSZ4ZUCYTuFmQ2YITQUD0e pwxXFMLKG6mdnS1YrH99DNjVIKHfzNc3g73oppsugs1KocjXIUwqM6sZXN5KSybxa6tG PQOf+QEGJ+ei/XHU50HOByktU+yR0K8GvzqkJdlG0QQwM9t1buJOxHZhVzwn9HtjvhYr Lio38IFJXljBfAYHJh1+4qQ9UWBaaaohBxqUk2OKdnMHNzcBcNikYq5jhTS2FkZn4Oqn Lb+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=mVXiuxpN2DuKygV67dSRs14PyCDJWqbkVa4GJNGi4D4=; fh=rr+4k1NGngu6GiQWZ29RSwKQiiajBJucuLDqeVQwNa4=; b=aSvD+UxZ5CfefQPng8cvlcTd92Wj18z4hdiDrvKwfPNrpGY/thRPQg59dreefJv4/q 8jgR7RfoY67eFG3lq65GmaBsQ+QwuyggqWii+TuHPI2kLXAI0Y+sxZYq9Zk1jBwmNQiI cUVmWKyJfKpsmzrQ53n0SQDsipvKLuFZwUkltKn44ml87B2+RT8Tm+4z3pcyvHuBhKrx pjEwgU17DVnUJeEsh2AarVTMBl7j+rQw5E9kvmzgR0XqQwRGUriTeNnSRYvJ8AsIB8m7 cCvpNKkb+S38zhtZ9bxdufbkOMJme++uZ9s9ng6r3iRHqyFwoDrnfF8FX9CvjxZkNKH1 2VlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lUbUbcg+; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65610-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCVmXmQoW76KyAImg5MCMpnP/VJFinR814HVwEhFDBCfNtEUquud+RJYGZnaTOc+vLnycYHvEpazHDkZdSle4ZKO0lfSAdiDZ/EVu14cng== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d19-20020a170906345300b00a3d55d43072si570757ejb.932.2024.02.14.09.03.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 09:03:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65610-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=pass header.i=@intel.com header.s=Intel header.b=lUbUbcg+; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65610-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65610-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 B649E1F21391 for ; Wed, 14 Feb 2024 17:03:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2AAC360DC8; Wed, 14 Feb 2024 17:02:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lUbUbcg+" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 7024E60BA9 for ; Wed, 14 Feb 2024 17:02:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930139; cv=none; b=rFBfjexNxvNhZ0EdAo1VUnl19Rt9Obe6ssg6vOeleoEzUxiSUN7wmAuKbg3D+IXyQo0L8YxG3BfQ5wNykV5NF1J12cVBxnhJjDj6tcnLDdl4WhCostCSy9x1IGDmuHKMoO35tjWrOgwJS0UalQohs2s0DnZ1Oq9zSbQ09OMRiIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930139; c=relaxed/simple; bh=Ho2RD7gdZfHfrpoZRRhRTcd0IgtIA1/lazjYqexOxfc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rOlYkh9Eo8F0prOUdnTMtaERwlCaOcPvPK+XtazZaC3ZqoQXQ54N9APk9+nUB8TSBEuRBcQ+7NzAkowg8tRGskFWwukveAn9hdyBl1yIKkpHio+EJo0Z3ylDKEKgIwnhYTyLv3/e6MKMGhse29DHB9TUf9rYGAQDFXAb4Fp3lAM= ARC-Authentication-Results:i=1; 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=lUbUbcg+; arc=none smtp.client-ip=192.198.163.17 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=1707930137; x=1739466137; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Ho2RD7gdZfHfrpoZRRhRTcd0IgtIA1/lazjYqexOxfc=; b=lUbUbcg+SGwruBTxXS9dDLnfYr3Ci9hOvdh/K2Ewtm9EkE4J8o8tyhFB brqqShck/iJr8qd1RNzNRJwkbih5SmAzrnb9bhGbNjy6LWS7eL7sBoeYL xNDxCn+FQv58wQelGqpFaVaKuW6M8bga6tow1DrYKzuOOIFJcPYYrW6Qx bn3gzzjmvjBlXH6omUFrKn/Jb0ZdkxJ1SReO2cBrBVTXB7EjrVcKWXumr oIiC04SKAi6DQNT/nfjgXA3hZr/RMoYR9SXjB1EtDQN5MZyyjQjXNmLXN 5eoLq2fKZtyF/ZPGkYaNXu417AWTJst5FIjhu5DmtFvluMNavd8FX+HTX Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="1859183" X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="1859183" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:02:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="3158982" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by fmviesa007.fm.intel.com with ESMTP; 14 Feb 2024 09:02:04 -0800 Received: from [10.249.138.241] (mwajdecz-MOBL.ger.corp.intel.com [10.249.138.241]) by irvmail002.ir.intel.com (Postfix) with ESMTP id CCB1B27BAB; Wed, 14 Feb 2024 17:02:03 +0000 (GMT) Message-ID: <3cce5e9d-a79f-4b26-b758-45679b94b6ff@intel.com> Date: Wed, 14 Feb 2024 18:02:01 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] include/linux/make_type.h: Helpers for making u16/u32/u64 values To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Rodrigo Vivi , Jani Nikula References: <20240214155408.1569-1-michal.wajdeczko@intel.com> Content-Language: en-US From: Michal Wajdeczko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 14.02.2024 17:04, Andy Shevchenko wrote: > On Wed, Feb 14, 2024 at 04:54:08PM +0100, Michal Wajdeczko wrote: >> It is quite common practice to make u16, u32 or u64 values from >> smaller words. Add simple helpers for that. > > ... > >> +++ b/include/linux/make_type.h > > If we go with this, please make better name so we can combine this with > upper/lower_*_bits() helpers which seems related semantically to this. > what about "include/linux/uintops.h" like we have bitops.h ?