Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1403061 > unrolled thread

Re: [PATCH] ARM: samsung: improve static dma_mask definition

Started byKrzysztof Kozlowski <k.kozlowski@samsung.com>
First post2016-05-18 17:10 +0200
Last post2016-05-18 17:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] ARM: samsung: improve static dma_mask definition Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-18 17:10 +0200

#1403061 — Re: [PATCH] ARM: samsung: improve static dma_mask definition

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2016-05-18 17:10 +0200
SubjectRe: [PATCH] ARM: samsung: improve static dma_mask definition
Message-ID<rAbgK-3KP-17@gated-at.bofh.it>
On 05/12/2016 10:38 AM, Arnd Bergmann wrote:
> When no DMA master devices are part of the kernel configuration,
> we get a warning about the unused dma mask definition:
> 
> arch/arm/plat-samsung/devs.c:71:12: error: 'samsung_device_dma_mask' defined but not used [-Werror=unused-variable]
>  static u64 samsung_device_dma_mask = DMA_BIT_MASK(32);
> 
> We could simply mark this as __maybe_unused to shut up that warning,
> but a nicer solution seems to be to have a separate mask for each
> device. The advantage is that a driver that happens to call
> dma_set_mask() on one device doesn't implicitly change the mask
> for the other devices as well. This is more of a theoretical
> problem, as obviously nothing does it for the devices in this
> file (or they would have always been broken), but it feels
> cleaner that way.
> 
> The definition works by creating an array in place so we can take
> the address of it and let the compiler generate a hidden symbol
> for it at compile time.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/plat-samsung/devs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, although does not look as critical fix but less warnings makes
spotting right issues faster so applied for v4.7.

Best regards,
Krzysztof

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web