Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3162457lqp; Tue, 26 Mar 2024 00:56:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLK+n8kFKi5rVXZrC8fF8gCX/oayd2Jiymq1BFAGLp284iInPOcA8ippxfiPYhOs3uqvnqihueoPDCjF7I9L4Y4GK3JG97B86jczr5wQ== X-Google-Smtp-Source: AGHT+IFKM2E8RdjTAJDs/9GHAYasE707wmhrwyDQYN3eF+EcMCXeZ0N80bdHfyz2CwaYz9U8jgtq X-Received: by 2002:a17:906:3182:b0:a3e:da6:85f8 with SMTP id 2-20020a170906318200b00a3e0da685f8mr6305212ejy.30.1711439788455; Tue, 26 Mar 2024 00:56:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711439788; cv=pass; d=google.com; s=arc-20160816; b=uT5yzXe9Y5wVHPplsy57nVPXI3r/bI4UkoAFPrQrWc3aDS8QpyPCf2Z5B4Js4o8UxY Z5S+666tnmh6zwQ3aIrYv3r38pxnZezmGtXBfI0z6svNKZWcGh+4lpkppta8UNrzJIAA EjjOuUz81ocEDqCtLFaOKkXgjhs55BT18v49hgrtS/QDIz9tDh+r+lI2lBp2zIef+SxI 3FDh4PsFQZMv5b60RTfaD/5gTuPVEAA/qssS7r8drL1vkJkbAH31zeiZnuaZ+2w6bkR6 iigGqUpUNK0pKqvJEYVyMw48ByD8Gef8+qfFBkXV6KPGd/sJADo/SS+WjwDswDXW9RLT AEoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=sRay1372G5eOgXvHy/dAHOgITM14ibOcHVU2YY02yrM=; fh=oFLD20fRleTlLXvrx7vaqeSP76bB3o6SnDAfE7eHftA=; b=eUsornpK9RQqHEOe90NzbwwhGBn7w9GSttvvNk7eULHAQ5pFxw7SIMDtrXJkHC4rMv MDY3k/5An4a1wsZml+c3n2eK/0+cbwra1fIMg4aU5aUKKA7wjlurmBFGWXc3pIaxdevf +PGNjEiybvW3Txpp83KdrNd+kcDWBBw30WxZbTCyqW4kuuhmkzTUVV6YqtrHVY6mcHNN jrsMyG10rB2YWlUcyW9QUeFyt77Duhrrva3K4hmtOoW8JHOp4h2W44gZUkztnB+6fcyW SuOFtnBkyiina14PzJChJRM3nUJgx9gXIWNTk144VyJrlGO0ryM95tPTT08lJFEQkIl2 VX4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-118493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118493-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r7-20020a17090638c700b00a4657cc568asi3364882ejd.505.2024.03.26.00.56.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 00:56:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118493-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; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-118493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118493-linux.lists.archive=gmail.com@vger.kernel.org" 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 3523B1F3AC05 for ; Tue, 26 Mar 2024 07:56:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 608C3134412; Tue, 26 Mar 2024 07:56:12 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 6347B4CB2E for ; Tue, 26 Mar 2024 07:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711439771; cv=none; b=QJerXt4IBhFAS/AZQ59FZeZnJaKNK0tCjg+w9W/IFmsHDyOY29g8Vk8c9ozcX36J+4D5ABLOl80Q5bTPRSeJ4g9prEtGVpOl0xOW/oKJCRQu6H4cOIDynJaBik0oJmOoBBTliXqYdhlHiKpdXbVwtY05CjfmIKHtjCh1sEZZ+Zg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711439771; c=relaxed/simple; bh=3YTzaVmBJ0ehsjB5/GHgxAjlefKz0c3u6he9e73Froo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hJNzHPW68rGyRLH52EjQCRummFcp5GxPfBSdDnD+MTAHhOM37NJQhN16hEm75A9ufl/a1Dfynt9CyvqO3NFqILukqAcjntBncnkEjvUJO30Z3liwiLpHG9LVS/u72un5uQxYsmPiT4ra4pYnDT5CKIxnYJ5BHU07nuHur1D2GfI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 72D5768D37; Tue, 26 Mar 2024 08:56:06 +0100 (CET) Date: Tue, 26 Mar 2024 08:56:06 +0100 From: Christoph Hellwig To: Petr Tesarik Cc: Christoph Hellwig , Marek Szyprowski , Robin Murphy , Petr Tesarik , Michael Kelley , Will Deacon , open list , "open list:DMA MAPPING HELPERS" , Roberto Sassu , Petr Tesarik Subject: Re: [PATCH v4 2/2] bug: introduce ASSERT_VAR_CAN_HOLD() Message-ID: <20240326075606.GA10489@lst.de> References: <20240325083105.658-1-petrtesarik@huaweicloud.com> <20240325083105.658-3-petrtesarik@huaweicloud.com> 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: <20240325083105.658-3-petrtesarik@huaweicloud.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Mar 25, 2024 at 09:31:05AM +0100, Petr Tesarik wrote: > From: Petr Tesarik > > Introduce an ASSERT_VAR_CAN_HOLD() macro to check at build time that a > variable can hold the given value. This really should be run past whoever maintains build_bug.h and also cc linux-kernel. Please also split the addition and the user in swiotlb into separate patches. I plan to pick up patch 1 for now, and wait for the discussion on this addition.