Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp347755rdb; Sat, 27 Jan 2024 08:58:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVuJ0P6HZr4Tfuuco1I/sysdfYNRIJujlYo9JFA1bH9W6ewFR4fCiANWidIXRj3FT57KG6 X-Received: by 2002:a05:6a00:939c:b0:6dd:8767:2fa1 with SMTP id ka28-20020a056a00939c00b006dd87672fa1mr1500025pfb.0.1706374686221; Sat, 27 Jan 2024 08:58:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706374686; cv=pass; d=google.com; s=arc-20160816; b=vWW7rf+U56FZjeKd3p3v1HDys1GTawwydGDXYq21oDmwx4BJsU6Ap2qeLQ3c0oUa1i PtSLXmPy6Cszg1NdFbxxsWh40VqIqhqMmjRKHlTY58+S1nXsDrA14Tyyze1uN8oXzv2C IazLxDjEzbMptQlLisIDve0jc6Ub5jjYkuYRCG/btYfbMz8FMsg4DWL9tiulo/94cumQ L6PUrq6iO59A+3Y3LlU53Kr847zLjKW7jJXj9wVfN5PJjR8aKXZJ8fIL1aAQ0jnYCaDM QuiYdIf9aVewoNgx0vEuIiswudEpPD5Y65RgE1lVniv1dJe4eA5d4cNnWb5EmFOkyE4w fEjA== 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=KOxYcy3DfwbUutWKrGt5TLqo9CPKC0pZptBzzACVW2Q=; fh=//+2cTEgcnm/nhcKhEezeBLrqtvifmIIqwZlBvaOsjI=; b=eIpmas3GsCOElm1kEBYVYWnx02BM7sUaEtrXffcNl6o/v2y6oZc2Tnyt4SIwQOIQeq EypSZyKgMb3yOKaB76Zwbd2IshJthueApWllAejZLtKcbF49yakldYCnBBQtJo+Q4jCe 5yHrxqEUlb1AgTDTSFyNwMRxZ7bXEl4ZwQ4Qps7wLNghA2Tscnw7LJQw64S84myTAHXH DL5TfHXr09yu+6QtPaouIg1FFWl1E6+rcsmCW6tz84nVB4hhWfLy9JYrPn8mdBkrXtth bob4Unn2H4LxNOWpRLnCaLRS85xqrH8zvDAd/B2w7dqhDfcBR90EN8p+DXz9dp8WaA/Q 8u4Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vAWCrzo3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v14-20020a056a00148e00b006dda301fb4csi3016110pfu.325.2024.01.27.08.58.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 08:58:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vAWCrzo3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41328-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E3D3D283B95 for ; Sat, 27 Jan 2024 16:57:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AD172C850; Sat, 27 Jan 2024 16:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vAWCrzo3" 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 6C45825615; Sat, 27 Jan 2024 16:57:39 +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=1706374659; cv=none; b=UJLp+5+BFcGefKw1R4cXn7GiP4+WhU1Mfo1AfkA5OMYd9Y7NkO1XyWHdGi4k16HBPAr50FRTpcx3Fw9hCf8hAVhpixB195kJV8xh0n/4SSQhb0v3fynJ0paCqro5+mF+xMdX6RvFOePUxynZMDek6Lu5x6MeKmNbeTT/gIF/88I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706374659; c=relaxed/simple; bh=nOXA2c12RAby5M8SUuFH3qf80EdSAt6dzoh2DKF90tA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UYtFeMePX/bggYIlZ/ltC6hRi9r99jTj2BOdsirJvS2536ZFp4g3DvuM+lgH3RmK1uScnj72R+Oicd3H8xaLIPdiyUZgXh+C54zGRIzEzJs9HOeVGWhQqsBJ/9+BBdvE2BHZBECYmxPjMzJIesQm12tCtPVfq96YK6T6nEnSqn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vAWCrzo3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98B33C433C7; Sat, 27 Jan 2024 16:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706374658; bh=nOXA2c12RAby5M8SUuFH3qf80EdSAt6dzoh2DKF90tA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vAWCrzo3vx+OCgvipPDyAWafHcz6hA4sXdFNgwIDiQPU3zfraJPVEOFEF4fJfmk/O z48pbOTm9ZhfVyHxqcOsLX9dgcUdsRug/WJMXcwXVutGGd7Vx6nmCOl3EWIXALs9VW +lSPPVdUEKF18VQRTWLXHS6Z5ag6zZNJ6fVDr+KY12FnDA7PkIW5+HUL2N8ZyU1mcb vPIP/xHU2pb6pMIivp3GSV4kCxmgpOfLlsRhTL0IKAWbgSMoczva4JbF3u2SiYY791 Y8EopoLg1fl8vngdSYUvM3HsjeF6mm+vmQNCTD4k+yE1EBB2wnC4/5J9cnJKsJRID4 RyPOevMZkwLWQ== Date: Sat, 27 Jan 2024 16:57:27 +0000 From: Jonathan Cameron To: Petre Rodan Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen Subject: Re: [PATCH v2 2/4] iio: pressure: hsc030pa cleanup Message-ID: <20240127165727.1fde5925@jic23-huawei> In-Reply-To: <20240127160405.19696-3-petre.rodan@subdimension.ro> References: <20240127160405.19696-1-petre.rodan@subdimension.ro> <20240127160405.19696-3-petre.rodan@subdimension.ro> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.40; 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 Sat, 27 Jan 2024 18:03:56 +0200 Petre Rodan wrote: > Use signed type to variable holding the result given by div_s64(). > > Add includes based on prior reviews from Andy. > > Provide bus-specific technical datasheet in the _i2c.c _spi.c headers > instead of the generic one. Given this lists 3 things, should really be 3 patches... They are small though so meh, if nothing else comes up to require a v3 I might take it in the interests of expediency. > > Signed-off-by: Petre Rodan > --- > v1 -> v2 no change > drivers/iio/pressure/hsc030pa.c | 2 +- > drivers/iio/pressure/hsc030pa.h | 2 ++ > drivers/iio/pressure/hsc030pa_i2c.c | 6 ++++-- > drivers/iio/pressure/hsc030pa_spi.c | 5 ++++- > 4 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/pressure/hsc030pa.c b/drivers/iio/pressure/hsc030pa.c > index d6a51f0c335f..7e3f74d53b47 100644 > --- a/drivers/iio/pressure/hsc030pa.c > +++ b/drivers/iio/pressure/hsc030pa.c > @@ -406,7 +406,7 @@ int hsc_common_probe(struct device *dev, hsc_recv_fn recv) > struct hsc_data *hsc; > struct iio_dev *indio_dev; > const char *triplet; > - u64 tmp; > + s64 tmp; > int ret; > > indio_dev = devm_iio_device_alloc(dev, sizeof(*hsc)); > diff --git a/drivers/iio/pressure/hsc030pa.h b/drivers/iio/pressure/hsc030pa.h > index d20420dba4f6..f1079a70799f 100644 > --- a/drivers/iio/pressure/hsc030pa.h > +++ b/drivers/iio/pressure/hsc030pa.h > @@ -10,6 +10,8 @@ > > #include > > +#include > + > #define HSC_REG_MEASUREMENT_RD_SIZE 4 > > struct device; > diff --git a/drivers/iio/pressure/hsc030pa_i2c.c b/drivers/iio/pressure/hsc030pa_i2c.c > index e2b524b36417..b5810bafef40 100644 > --- a/drivers/iio/pressure/hsc030pa_i2c.c > +++ b/drivers/iio/pressure/hsc030pa_i2c.c > @@ -4,14 +4,16 @@ > * > * Copyright (c) 2023 Petre Rodan > * > - * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf [hsc] > - * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/common/documents/sps-siot-i2c-comms-digital-output-pressure-sensors-tn-008201-3-en-ciid-45841.pdf [i2c related] > + * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/common/documents/sps-siot-i2c-comms-digital-output-pressure-sensors-tn-008201-3-en-ciid-45841.pdf > + * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/common/documents/sps-siot-sleep-mode-technical-note-008286-1-en-ciid-155793.pdf > */ > > +#include > #include > #include > #include > #include > +#include > > #include > > diff --git a/drivers/iio/pressure/hsc030pa_spi.c b/drivers/iio/pressure/hsc030pa_spi.c > index a719bade8326..8d3441f1dcf9 100644 > --- a/drivers/iio/pressure/hsc030pa_spi.c > +++ b/drivers/iio/pressure/hsc030pa_spi.c > @@ -4,13 +4,16 @@ > * > * Copyright (c) 2023 Petre Rodan > * > - * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf > + * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/common/documents/sps-siot-spi-comms-digital-ouptu-pressure-sensors-tn-008202-3-en-ciid-45843.pdf > + * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/common/documents/sps-siot-sleep-mode-technical-note-008286-1-en-ciid-155793.pdf > */ > > +#include > #include > #include > #include > #include > +#include > > #include >