Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1191200lqj; Mon, 3 Jun 2024 13:04:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwN0ul2J+/T6keDhMcSCCFw3vPvMnVVfSShdsfgcRz97LTbXwDfadlS/7pD6wFjXU8HVQtPoCHVe2j334267oDNvqO1NprJUccuCG+Dw== X-Google-Smtp-Source: AGHT+IFZGm0u+5JoAIXOOJwzsrRHEskfrdD9cEspK+05WEXBIyBDCObZasLKxb5HnhheCfGVi9eT X-Received: by 2002:a05:6a20:7f9b:b0:1b2:91a0:624a with SMTP id adf61e73a8af0-1b291a0bbc4mr3798287637.45.1717445041242; Mon, 03 Jun 2024 13:04:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717445041; cv=pass; d=google.com; s=arc-20160816; b=nmcj2/xnryXAjFrjYk7zbrVKfMG1Dp9ggPRKWqlnXsd8Ut+F/bvOnd4gdbNyzGDVQF urqlg4IeQN7I30+OUdGam2L5kAhm9/Xiy9BAc8kvqQUDiiPJcR1V6URvFYWBEqjz1sWZ 4uNYzWmlrugCt8XWpqsKKerewW7DhfyL7PKB6WDO1sE6Kl4xPSUxIyGoL2yfmZxgeEWV DqJ45pZeHT3Hj78xYyf2dDijLvzB/pD9GQ//DxBIFr1/+tI7ZRvj9TBu3LOm0VJc7gsE aQPOy/k1i83K/4hxUe7PNhVhRhNwVIePOwe+UEitr/SKrumwlmtoh9p/1mE8e1MbeyXh nVfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=jL9H5lnMLzkT7ELAGCPgP46mpHhSQUiwAxRd6u0i+l4=; fh=xjsdCYuomEJyS1EkfNUc5fKtF34cXQ1mOBn36d3R9dU=; b=Vdhxq4L9V7c1SdykIp4S0gtJ3RZg93k68hJhU/dEsVWSREAo71/8dQmrV1Ocw/IBVs /O5tL2eRfXvCaWoHSaE/R0uJ/4CMph1ZnakDPO1JN5LlDzMIeS3vRZQTqQ1V/cdVsiFA ingVGRLbFPl56EvAjEMa2yJoN4Ku1Q4+fNByRcEerEKAxVlJPmCZLJxM+/XJWlgAlcsg PeGxOTMQqGoMqlKXsVBAuyM0lTv7cfUw7H4k6hRklcBrCOunbFtPyFNBRGk8MmkWg6Hi jH1hfuFAj4uGSKIHLQY6GXvgDNEhlnW7cWjAuV5wDZE36N7SMzDUMT++o6RZ+eL6gjU6 BLOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p7RReSKb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199644-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35c17cf0fsi6041025a12.624.2024.06.03.13.04.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 13:04:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p7RReSKb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199644-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 63222B27EA2 for ; Mon, 3 Jun 2024 19:28:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24A7513C3F5; Mon, 3 Jun 2024 19:27:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p7RReSKb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4791F13C3F0; Mon, 3 Jun 2024 19:27:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717442860; cv=none; b=WkvFLuSyMvncGE/eowTNDTFq1a8l8HyLGyyjWzlsZn0zmTVuFZv9dR6/lol2VrboyKrkbula/X2UzmknmzVYzd2Mp7RFca+6ZvT6OR0JHjkQKd2GZ8h7HjjnWKyaipR/tC2m6vR1rAsi5Z074UT6WBnITRbyDAw1Nb6nJoXenkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717442860; c=relaxed/simple; bh=3Zln+JEWRzCLjJqeE+QHq6lHIRgWozx2/elNB/ZIlFg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Jgjxf+CQ/MoBKuudocslk5sKFUbT4gKLkFTXWK0hfjVhtA+nbh9qxQVwJrfk0kCvxYsxAK2cQwDmmRLrr7vxM7NKiwRmN+ozyphQpxYHGWszGsGldtZ9/8aRh/SPQNOkoL3Aw0iSwO3OhYEBKd1P7MoM6eU+i18l800LN1OAZGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p7RReSKb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22E89C2BD10; Mon, 3 Jun 2024 19:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717442860; bh=3Zln+JEWRzCLjJqeE+QHq6lHIRgWozx2/elNB/ZIlFg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=p7RReSKb6hSqdk4Y9AmOd5gUqefWdVL9sG8ZD2R22R7OCNldeT9cCEaEC0wL0xF/c z08G5pNFlRrAlWANQv50Vufa5m76dZG14AxuBraihm9Hmk+e/SFAASMmJUpU8Tj0+A NECDm3qLVFc9w6qBQ2tFTovmZBjwaPB9oRKHNxY5iLRlpLGK8Id+G0icCdORmI73Ui pb2QdeccF57XzQe3Ih9PSO20/ka9SKhMemLdj5KHRLJZtNIOwkMLZb5dFnWh6TARBZ Oz8KnbCflo2yVZtD1rRjyLSkjGRowUyI3V+UewMrtEUA7tLKP2Mvd3K9x98zSD5khQ BMn0WxopdXNPg== Date: Mon, 3 Jun 2024 20:27:30 +0100 From: Jonathan Cameron To: Vasileios Amoiridis Cc: lars@metafoo.de, himanshujha199640@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 13/17] iio: chemical: bme680: Add read buffers in DMA safe region Message-ID: <20240603202730.7ce99cbf@jic23-huawei> In-Reply-To: <20240602193310.GE387181@vamoiridPC> References: <20240527183805.311501-1-vassilisamir@gmail.com> <20240527183805.311501-14-vassilisamir@gmail.com> <20240602135908.7e4183a2@jic23-huawei> <20240602193310.GE387181@vamoiridPC> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Sun, 2 Jun 2024 21:33:10 +0200 Vasileios Amoiridis wrote: > On Sun, Jun 02, 2024 at 01:59:08PM +0100, Jonathan Cameron wrote: > > On Mon, 27 May 2024 20:38:01 +0200 > > Vasileios Amoiridis wrote: > > > > > Move the buffers that are used in order to read data from the > > > device in a DMA-safe region. Also create defines for the number > > > of bytes that are being read from the device and don't use > > > magic numbers. > > > > > > Signed-off-by: Vasileios Amoiridis > > > > Same response as previous. I don't think it's necessary because > > of the custom regmap implementation. > > > > My first instinct was the same as yours though! > > > > Jonathan > > > > > Well, even if we end up not needing it, I would keep the values inside > the union just becasue it saves some space, and it keeps all the read > buffers in the same place. What do you think? > Sure. The union is fine as long as you have made sure there can't be concurrent access to the different members. It will save space on x86_64 at least as that has very low IIO_DMA_MINALIGN. Less likely to make a difference on arm64.