Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp724154rdh; Wed, 14 Feb 2024 09:25:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU374dTICjZ+bErE+6ozzEZ2AOQttm4wNp0lCEs4mYS03JxCB1+f2bnEs39LNstLBv8NyEWnGDnEgDNLZopEjlg8J8jJW2wQCNebAVphQ== X-Google-Smtp-Source: AGHT+IFrMdHfCXnJbn1Rebo6rgRS23451fBWSB2oyhVsWs/RHZb2jXP3eYsztGGzPhUtihCT4J9f X-Received: by 2002:aa7:cf14:0:b0:561:ad3f:a0a6 with SMTP id a20-20020aa7cf14000000b00561ad3fa0a6mr2436766edy.10.1707931504319; Wed, 14 Feb 2024 09:25:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707931504; cv=pass; d=google.com; s=arc-20160816; b=FFJEepUc7tTI2vKDk20rlZHXI0dfnfRTofDi465X1o0Oib1I+ya5ffkbkyGyVKWQNF UY4IbNY8j6j4MKf3ZH03Zx1cNVDFzzP7KDRdaJzOxo2TKCv7EUQRL0giDzjxqpbyJ4NX wgVNpaw/cY/0hWdT52+siRKfN8sbfc7C9T0ZNyfI38iEe+esmGONEiffgLhFXyRBAPRI gl+17y2lna80xpml7U35WgIA/TAXLOei8UXrrIvRvyU8RHHBqmv5fu52zD06ZOEK3Dgt 3gq0RKH3CptX2rf71JKc7ekRCsAeUTAbd4s3qyvEtzmP2/evMhgUpxjcpapjS3jHnO2D ycyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=y87s3zopO2jwBVeBUHCI4rxjiSkOy4fC3WNgHcDeAKE=; fh=WttrXkOakyL0pQzsaNKzFWObMYk8d50YkWuvz+Cb6qs=; b=wOlmi2pyIoMaPaGHGnpimY6vj2kOibRcmS26JukAVIlpjTbNaEOOA65kmJcYszptgX OE/XWF/M/ePkDcXWNeHlb9X/FfRBcX4RNy6vfLtnp80DhP+3QlTE8PCOSjLBkAnFTGVs Yg84HA9jTRv7ltfwaGi2A/Xnz/1YoiRzGhSjRc0UnwiJbF8M1sdkIy3lRsr8PX9BeB+k zRJlCwnaYNBXLOqyvE6uzDSAJgkcwVWQEhX3l2hyaOoH217MHDFB4ID2wK0D02VE2vzF uzVwsFybdU7Q3VmDNUdMHn7it0D8Vym4nAYKOeTwMJq9eZ1/IpNlJiIRt4EyjaSV9505 wNgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Tl/qMYks"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-65655-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCXplulTcNxv7Df6crNPYYgKuUHhcLEjLne1JEL18gP7rB/dgMrtquz1ZmVDrSgjuIKkRJYEbSxKUwlzyR5a8pN4WX6cpqQ5R6vQirJp6g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e8-20020a056402190800b00561e7d87078si2278673edz.559.2024.02.14.09.25.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 09:25:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65655-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=@gmail.com header.s=20230601 header.b="Tl/qMYks"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-65655-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 A30AA1F24C9E for ; Wed, 14 Feb 2024 17:24:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09BEE839F9; Wed, 14 Feb 2024 17:21:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Tl/qMYks" Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8344839ED for ; Wed, 14 Feb 2024 17:20:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707931261; cv=none; b=q/N/D7CT09BjiNdSAtGWhEohbUG+8fKnLZopVDeHPg7HQOi71Ks+GpbeoC8nHZ8tbY1UhCI01dzTkyTIEphVrrgGEt8kx5RjXiMxU8KjgDexKGaD+1eTMSaOsUsfXTCVawakosXmeFBdUFwp7LTAAyDxEEwlfgGumYNRtfyaSgw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707931261; c=relaxed/simple; bh=NqXEuuPW3pnuNH/qAePRl00u3XMEnk0fe4Hf71aiV0g=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=DvxAlIFflO0po/EYLTuo6FsrfXugg/jaWNnKyaGlmGWbvBa3v6IE5hH56jP54LJz7OMlQtZwmDWogYfuHLLXwxedowJTTuvjt8W6zeOEpwm3p7WOVwYSlIUlj67ov2gdL1+05FvtkQsNNuCBgpjIMqra6/vCwx7JHKIL3rYAmQM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Tl/qMYks; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-41205e196b4so1077235e9.0 for ; Wed, 14 Feb 2024 09:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707931258; x=1708536058; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=y87s3zopO2jwBVeBUHCI4rxjiSkOy4fC3WNgHcDeAKE=; b=Tl/qMYksUbp3yANbn9IrBmFlv4mOvvrV3cmgqg2tE1w311yQ3oFWxcL1XZ08Os24Bx o7m9/TQrwLKNyCyO7IrxsVZBqAHMexIv80L9pVgwDmdXh75nPLIPM9z4zXHdH2Ecs/ON DclT/fOqV8zpr0FpXcUjxwiySJuUNq+1yJDpnMGIZkSD26JZywzV3ljE+I6vfhRblMJx sLFO62RdHhuK2hpqienXl6svvx+rTCxJD3SwIE44v9GrpCPo0xoof0d7ImFwtiyVMPfB 4xSMeIMPQVxUUkPxRkKqrgftd9OWEVS0d0nb02eq3dJ6Mt1XWqPZmiyitfXliiblRzJu fAcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707931258; x=1708536058; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=y87s3zopO2jwBVeBUHCI4rxjiSkOy4fC3WNgHcDeAKE=; b=r/KEGWOs7w/2RmniiO41qxoMpvNHiW2572nFmGsTA2zOz5RWimm+nBG/UhKE3Te5Fp QWQ3ha54YkR4RjHx0hWJ8TrNxQ2+AWiSUCZVbvK7JujhAnxaQyKY6F08zHdU3qyzKREh FPO2TUMH9nAo22va1On7W5SiPwDQ4EOrBy+yC7aK4BnQUJUnEMV3LdcxPnUNfIBwWa4S 3Cp/BsUQJ3kHe0LdC/p5nn2ydwG+ZYBhacb/r0Ez76snRXO8pt6Np8aq3fBUCbvgOQsi mf16iLUF58ZyndSKeVTaWvxOF4JxW68nPaYu/f+yCEeiLqAvf0J+1J2jgoD/ddm99F/J afFQ== X-Gm-Message-State: AOJu0YzfyjTza/qKIZhltl0mv08VqOOVQ6aYdursL/lou5cmYmm4XKdN IVDjQVnN1wex1aw/L+msd7nWAj5t7dw0OgZRnhbWbHCju0Us68I= X-Received: by 2002:a05:600c:a14:b0:410:ecc2:3072 with SMTP id z20-20020a05600c0a1400b00410ecc23072mr2906118wmp.7.1707931257593; Wed, 14 Feb 2024 09:20:57 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUiENfw0/AwN1v1Pv7CWxEzISBfLsuKzdkS92Ab92oONhAvJXiniHKYUq0ag6n66hYCbnekCplTapGPwczQRBRTWs/jSRpXSKq50Ki/lC1eXDq+P3YAk+pGIyVG28TzdtS8dgzGF+iEqpQu18TZVVvh2UiQmXGxqTck2+iKxbPCGw== Received: from p183 ([46.53.252.131]) by smtp.gmail.com with ESMTPSA id n4-20020a5d67c4000000b0033b888a0a63sm6820022wrw.0.2024.02.14.09.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 09:20:56 -0800 (PST) Date: Wed, 14 Feb 2024 20:20:55 +0300 From: Alexey Dobriyan To: Michal Wajdeczko Cc: linux-kernel@vger.kernel.org, Andy Shevchenko , Rodrigo Vivi , Jani Nikula Subject: Re: [RFC] include/linux/make_type.h: Helpers for making u16/u32/u64 values Message-ID: 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=utf-8 Content-Disposition: inline > +#define make_u16(hi__, lo__) ((u16)(u8)(hi__) << 8 | (u8)(lo__)) Public Service Announcement Identifiers representing macro arguments generally don't need to be undescored. They are local to the macro, they don't leak outside. End of Public Service Announcement Firstly, make_u16() doesn't return u16. Secondly, #define make_u64(hi__, lo__) ((u64)(hi__) << 32 | (u32)(lo__)) doesn't truncate hi, why?