Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp729158rdh; Wed, 14 Feb 2024 09:33:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVV86egZWpUQ1SfnglXyAOIy/R9wHnveRXdPtIhzKJLsQWmUHMi6MjzWqO9oq1DGWf12S/fT7yi3oImyLg0NSjwBpWaBUuRh2duJvvrEQ== X-Google-Smtp-Source: AGHT+IEhJMxiTvBVLsmgxtjhjLEva6lXP2wji7ITisERdHz/AzQLAL9GjVuUtFocbSntFpcNwWOX X-Received: by 2002:a17:906:4698:b0:a3d:7532:15ad with SMTP id a24-20020a170906469800b00a3d753215admr342534ejr.39.1707931995236; Wed, 14 Feb 2024 09:33:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXRDlCLoEk6Vxr1lR1Bmm7txZwBVZZWtwpvpYNK127G28pJmG/8FulC6rpc5DMXkF3Ewo3RWLAAeqbTdqaVavFlcZlqff/ydxbrgNLSXg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id by19-20020a170906a2d300b00a3d0567992asi1747350ejb.922.2024.02.14.09.33.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 09:33:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65686-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=ELSP9WyT; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-65686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65686-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 9A91B1F2237E for ; Wed, 14 Feb 2024 17:33:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A6F384A37; Wed, 14 Feb 2024 17:32:18 +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="ELSP9WyT" 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 77416839ED for ; Wed, 14 Feb 2024 17:32:15 +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=1707931937; cv=none; b=cVHBaHAaXFPSBkb869nDuIYo271UXZ3cuqrpOZk191sXxQM6mBu0tnuWywsgmvH8ZNBbYfVGHPt9lk2EgI+6uXBECafOGbZdx81uu9ZKfQYX9KEx5Vzunss47R56v0++XtWDWN2xBQQdzeiQ+bWWKoPYw/KQTF/CckkutZsCzig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707931937; c=relaxed/simple; bh=HFuTE/RRyHBJ0w6ayf2wpkyBRUytUEblMcir9+zBrtc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=am3EBnfHXhTBez8gjKxV+tVz7mUeRRTm4+oZXioIrrodrAolKP0OsViA2acPiLJ5z9dS5UFuAbGHR174SI/Dx4UZkRxxgbQ0agnCNc8jhyVtQAMzGM0QrVi6q/55lCb+hQalQRxde2bENmU77nbkIRMUmZeuy0F40tDfq9w7e8Y= 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=ELSP9WyT; 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=1707931935; x=1739467935; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=HFuTE/RRyHBJ0w6ayf2wpkyBRUytUEblMcir9+zBrtc=; b=ELSP9WyTAuwki0mux3E/33UevsEFPBWsoAZE1IjuGmK30ExOgL96Y/Fw mH23bFpi34875enwECv4Ks8gjvUCbUax2bCjO5on15JCDlY70rjin4U86 pJJByjsB1xJr/KkT7FGI0d20ttkf/HnH3Df6cSaJxexk4sma6sGnrN+3t Rh6p3E2lsE3OlQfoeOXAkMexWshOSqEsPGTujanONfsK8oY0qE3LTFzvM VHnPEmwSKCnr3rB71+eZjwOFikWKyb+uV2xKHLo3EGecsDKvXgUbc9ydf egIPd184jOkeXrcVGPFy5LEj0FLexF2vHx39ikQuIm6DCxJkeJ3hpPhz2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="13378323" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="13378323" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:32:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="912092212" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="912092212" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:32:12 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1raJ7C-00000004YRz-3g2Q; Wed, 14 Feb 2024 19:32:10 +0200 Date: Wed, 14 Feb 2024 19:32:10 +0200 From: Andy Shevchenko To: Alexey Dobriyan Cc: Michal Wajdeczko , linux-kernel@vger.kernel.org, Rodrigo Vivi , Jani Nikula Subject: Re: [RFC] include/linux/make_type.h: Helpers for making u16/u32/u64 values Message-ID: References: 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: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Feb 14, 2024 at 08:20:55PM +0300, Alexey Dobriyan wrote: .. > Secondly, > > #define make_u64(hi__, lo__) ((u64)(hi__) << 32 | (u32)(lo__)) > > doesn't truncate hi, why? Because it's not needed (the whole point AFAIU is to override promotion to a _signed_ type (int) and here it makes no difference)? -- With Best Regards, Andy Shevchenko