From mboxrd@z Thu Jan 1 00:00:00 1970 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 4D64D2F28EB; Tue, 11 Nov 2025 19:25:16 +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=1762889117; cv=none; b=fx4f20XHGFZiU07QPjany/LNWNuZc2xcnw+MxzhLuHm+BnrAl4nteX5my9CvDtQPbKpyf6n2shjttx/S/ERvk0WRgn+itWyKchiZ2B7ZHEJ2mmw27mtrjhhBlXHfLn2IaBe54W1mIKRjsNYaaYBKultqJIEMT5EuJvPSja/E700= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762889117; c=relaxed/simple; bh=IVQxVjxc4z1K0/u4zAAKxwl6Gk16icCKaP5SPNOFg7U=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Mp4pgq+UiZANqLx2jrc5lsq4utcGYqIuF5zjhtiLNgv4P8Z135blcVxM6K5Fd+lxZM9gcSbQyXHctlJWCqQl5HE8VEMM+60J7rzwC/GppKyqZIfZ6sHqC1bail3wXWhLIfbO8HDef6GslkQg2At6JsjPObNpGDs3j3gDDGTmc4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=InNmF67p; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="InNmF67p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0ED95C116D0; Tue, 11 Nov 2025 19:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762889116; bh=IVQxVjxc4z1K0/u4zAAKxwl6Gk16icCKaP5SPNOFg7U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=InNmF67phlhuM6WWZ4+J6R8uAQd81jpDlr+axxDpPgqIU9fLR7LDlKjYmLIDhRKWy hjIowlPR4d5CDJ9ppWpPMmAmbxyJDv4RNqZgrxyn3CGDRVtmwCyXRfmS1z/TYUIa6C DJ/agAs4n5OhsmL2nIayLm4q9tRDmozrb5DqdU23cuKR/YbHztfKzduf7jA2xssrS1 UNIf/fznf8r3W+mYhBW3OiFojs1/tL/xCUuluOrhqLH9varbDw+4tW0G2shAVwugLk v3zxqRKsT1/XeKMVskHn3tM28wCvXOt9jbsNwwjUT5WHlYpn6P3793kDDdp4OQ504x GyLah0d2t0x4g== Date: Tue, 11 Nov 2025 19:25:10 +0000 From: Jonathan Cameron To: Andy Shevchenko Cc: nuno.sa@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Michael Hennerich , David Lechner , Andy Shevchenko , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Subject: Re: [PATCH v4 10/12] iio: dac: ad5446: Refactor header inclusion Message-ID: <20251111192510.15cedf67@jic23-huawei> In-Reply-To: References: <20251104-dev-add-ad5542-v4-0-6fe35458bf8c@analog.com> <20251104-dev-add-ad5542-v4-10-6fe35458bf8c@analog.com> <20251109163030.66ad74fa@jic23-huawei> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 9 Nov 2025 21:32:35 +0200 Andy Shevchenko wrote: > On Sun, Nov 09, 2025 at 04:30:30PM +0000, Jonathan Cameron wrote: > > On Tue, 4 Nov 2025 20:24:19 +0200 > > Andy Shevchenko wrote: =20 > > > On Tue, Nov 04, 2025 at 03:35:15PM +0000, Nuno S=C3=A1 via B4 Relay w= rote: =20 >=20 > ... >=20 > > > > +#include > > > > #include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include =20 > > >=20 > > > Most likely the types.h is missing and maybe more... =20 > >=20 > > Looks like types.h belongs only in the header. =20 >=20 > Hmm... IIRC my suggestion was based on seeing one of uXX/sXX in the code, > but now I lost the context and maybe I memorised that wrongly. >=20 > > FWIW I ran iwyu against this with my usual iio.imp file > > (shared previously on list) > >=20 > > drivers/iio/dac/ad5446.h should add these lines: > > #include // for __aligned > > #include // for __cmp_op_max > > #include // for NULL > >=20 > > drivers/iio/dac/ad5446.h should remove these lines: > >=20 > > The full include-list for drivers/iio/dac/ad5446.h: > > #include // for BIT > > #include // for __aligned > > #include // for IIO_DMA_MINALIGN, iio_chan_spec > > #include // for __cmp_op_max > > #include // for mutex > > #include // for NULL > > #include // for __be16, u16, u8 > > struct device; // lines 10-10 > > --- > >=20 > > So maybe those 3 extra in the header but seem not much needed in the c= file. > >=20 > > Hence applied with the compiler.h one added to the header. > > Whereever that minmax is coming from is burried deep in macro > > so probably isn't appropriate anyway =20 >=20 > If we use min()/max() or something from there it relies on the __cmp_op_m= ax(), > so probably it's needed. That was where I got stuck. Neither min nor max is used in this file. Anyhow, I played guess where it might be. I think it is probablythe MAX() call in iio.h (which includes minmax.h) Hence I'm not bothered about that being included directly in this c file. If anyone can spot a more direct use then shout and I'll be happy to add that include. Jonathan >=20 > > and including stddef for NULL seems over the top. =20 >=20