From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752721AbcERPB3 (ORCPT ); Wed, 18 May 2016 11:01:29 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:64702 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbcERPB1 (ORCPT ); Wed, 18 May 2016 11:01:27 -0400 X-AuditID: cbfec7f5-f792a6d000001302-71-573c83c37758 Subject: Re: [PATCH] ARM: samsung: improve static dma_mask definition To: Arnd Bergmann References: <1463042333-281444-1-git-send-email-arnd@arndb.de> Cc: Kukjin Kim , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org From: Krzysztof Kozlowski X-Enigmail-Draft-Status: N1110 Message-id: <573C83C2.5090203@samsung.com> Date: Wed, 18 May 2016 17:01:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-version: 1.0 In-reply-to: <1463042333-281444-1-git-send-email-arnd@arndb.de> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKLMWRmVeSWpSXmKPExsVy+t/xy7qHm23CDf49UrP4O+kYu8XUh0/Y LF6/MLTof/ya2WLT42usFpd3zWGzmHF+H5MDu8fvX5MYPTat6mTz2Lyk3qNvyypGj8+b5AJY o7hsUlJzMstSi/TtErgyvk54xFowj6ti6uEVLA2M8zm6GDk5JARMJA5ObmOFsMUkLtxbz9bF yMUhJLCUUWLp+wusEM4zRonLr/pZQKqEBVwlvp4+D9YhIqAoMfXFM2YQW0jATqLjdQ8jSAOz wFpGiUMbF7KBJNgEjCU2L1/CBrFCTqK3exLYIF4BLYltW9+CDWIRUJXY+eIWE4gtKhAhsXrd NWaIGkGJH5PvgdVzCthLPN//C6ieA2iBnsT9i1ogYWYBeYnNa94yT2AUnIWkYxZC1SwkVQsY mVcxiqaWJhcUJ6XnGukVJ+YWl+al6yXn525ihAT+1x2MS49ZHWIU4GBU4uGN6LUOF2JNLCuu zD3EKMHBrCTC619rEy7Em5JYWZValB9fVJqTWnyIUZqDRUmcd+au9yFCAumJJanZqakFqUUw WSYOTqkGxtKqhxqnMifOa2kL+iWS+zQr9sH9EI2Fh+9Mvf1zdu2O1SZCVaZM/htvlh6K/Htz 4c7TszriLvhVCZZnuO1/sfaTX928RbyRV6qKn4q6bb8XNHt7wbnLK/dWvTlcWX5r+bRXNik9 LUwz3XttXSsuNixfuv7ilxKWSHMTrcsfWc8vnxv4/NDWlEtKLMUZiYZazEXFiQC9mP9feAIA AA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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