Linux IOMMU Development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Michal Nazarewicz <mina86@mina86.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Robin Murphy <robin.murphy@arm.com>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes
Date: Wed, 9 Apr 2025 17:43:00 +0300	[thread overview]
Message-ID: <Z_aHdH7Ei_cffeIL@smile.fi.intel.com> (raw)
In-Reply-To: <59af67fa-ca0d-48f6-8b78-b1c694af9dfd@samsung.com>

On Wed, Apr 09, 2025 at 04:35:57PM +0200, Marek Szyprowski wrote:
> On 09.04.2025 14:24, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > When building with W=1, this variable is unused for configs with
> > CONFIG_CMA_SIZE_SEL_PERCENTAGE=y:
> >
> > kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=]
> >
> > Change this to a macro to avoid the warning.

> > -static const phys_addr_t size_bytes __initconst =
> > -	(phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
> > +#define size_bytes (CMA_SIZE_MBYTES * SZ_1M)

This had phys_addr_t type before, do we still have the platforms when it can be
bigger than 32-bit integer?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-04-09 14:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09 12:21 [PATCH 00/10] -Wunused-const-variable warning fixes Arnd Bergmann
2025-04-09 12:24 ` [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes Arnd Bergmann
2025-04-09 14:35   ` Marek Szyprowski
2025-04-09 14:43     ` Andy Shevchenko [this message]
2025-04-09 14:51       ` Arnd Bergmann
2025-04-09 14:57         ` Marek Szyprowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_aHdH7Ei_cffeIL@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mina86@mina86.com \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox