From mboxrd@z Thu Jan 1 00:00:00 1970 From: m.szyprowski@samsung.com (Marek Szyprowski) Date: Tue, 12 Jan 2016 09:35:11 +0100 Subject: [PATCH] arm: irq: l2c: do not print error in case of missing l2c from dtb In-Reply-To: <1452582683.7773.102.camel@perches.com> References: <1452580473-10073-1-git-send-email-andi.shyti@samsung.com> <1452582683.7773.102.camel@perches.com> Message-ID: <5694BABF.3070200@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello, On 2016-01-12 08:11, Joe Perches wrote: > On Tue, 2016-01-12 at 15:34 +0900, Andi Shyti wrote: >> In some architectures the L2 cache controller is integrated in the >> processor's block itself and it doesn't use any external cache >> controller. This means that an entry in the board's dtb related >> to the l2c is not necessary. >> >> Distinguish between error codes and print just an information in >> case of -ENODEV. > trivia: > >> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c > [] >> @@ -95,7 +95,9 @@ void __init init_IRQ(void) >> outer_cache.write_sec = machine_desc->l2c_write_sec; >> ret = l2x0_of_init(machine_desc->l2c_aux_val, >> machine_desc->l2c_aux_mask); >> - if (ret) >> + if (ret == -ENODEV) >> + pr_info("no L2C controller entry found in the dtb\n"); > Perhaps this would be more consistent if it was > pr_info("L2C: no controller entry found in the dtb\n"); Frankly I see no benefit of such message. It still might confuse users that there is something wrong with your DT. When driver initialization fails with -ENODEV, then no message is usually displayed. >> + else if (ret) >> pr_err("L2C: failed to init: %d\n", ret); >> } >> > > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934176AbcALIfR (ORCPT ); Tue, 12 Jan 2016 03:35:17 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50670 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933737AbcALIfP (ORCPT ); Tue, 12 Jan 2016 03:35:15 -0500 X-AuditID: cbfec7f5-f79b16d000005389-72-5694bac07175 Subject: Re: [PATCH] arm: irq: l2c: do not print error in case of missing l2c from dtb To: Joe Perches , Andi Shyti , linux-arm-kernel@lists.infradead.org References: <1452580473-10073-1-git-send-email-andi.shyti@samsung.com> <1452582683.7773.102.camel@perches.com> Cc: linux@arm.linux.org.uk, tony@atomide.com, robh@kernel.org, tglx@linutronix.de, olof@lixom.net, tomasz.figa@gmail.com, jiang.liu@linux.intel.com, yamada.masahiro@socionext.com, linux-kernel@vger.kernel.org, k.kozlowski@samsung.com, andi@etezian.org From: Marek Szyprowski Message-id: <5694BABF.3070200@samsung.com> Date: Tue, 12 Jan 2016 09:35:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-version: 1.0 In-reply-to: <1452582683.7773.102.camel@perches.com> Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsVy+t/xa7oHdk0JM5h2X9Zi+5FnrBaLfzxn spi1fT+Lxez7j1ksXr8wtNj0+BqrxeVdc9gsbl/mtTh1/TObxf89O9gtNm+aymyxatcfRov9 V7ws9t77zOjA59HS3MPm8e3rJBaP60s+MXvsnHWX3WPTqk42j3fnzrF7zDsZ6LF5Sb3HlRNN rB5fVl1j9ujbsorR48T07ywenzfJBfBGcdmkpOZklqUW6dslcGXM2PuMvWATV8Wp+4uZGhgn cHQxcnJICJhInN7xiRHCFpO4cG89WxcjF4eQwFJGidvT1rJCOM8ZJa7v+gVWJSwQIXGy8SQL iC0ikCex7fEHMFtIoEDi0YpdjCANzAKNTBIXe6+zgiTYBAwlut52sYHYvAJaEptXfmQHsVkE VCVeXmwHs0UFYiQudh5hgqgRlPgx+R7QUA4OTqDzLrYJgISZBcwkvrw8zAphy0tsXvOWeQKj wCwkHbOQlM1CUraAkXkVo2hqaXJBcVJ6rpFecWJucWleul5yfu4mRkjMfd3BuPSY1SFGAQ5G JR7eDPYpYUKsiWXFlbmHGCU4mJVEeO22AIV4UxIrq1KL8uOLSnNSiw8xSnOwKInzztz1PkRI ID2xJDU7NbUgtQgmy8TBKdXAOCWZ8VmCd7XBKnnFMK34fcKSuftYtf6fnPHh+/6/UxvPaHKf c8pjaL5VfCPh/ZSPoUt33cj9uUOBN/x+uHdYrfzrE+qXDv1dulvBwuKCor0wK1ccm286X9La 893PVrZ9PDIpU2Pt3zhzDXVP+Wu9gnP5mNbU2+2JUKjS2KW4R+Wjo+zDSfMPKbEUZyQaajEX FScCAEviG8S1AgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 2016-01-12 08:11, Joe Perches wrote: > On Tue, 2016-01-12 at 15:34 +0900, Andi Shyti wrote: >> In some architectures the L2 cache controller is integrated in the >> processor's block itself and it doesn't use any external cache >> controller. This means that an entry in the board's dtb related >> to the l2c is not necessary. >> >> Distinguish between error codes and print just an information in >> case of -ENODEV. > trivia: > >> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c > [] >> @@ -95,7 +95,9 @@ void __init init_IRQ(void) >> outer_cache.write_sec = machine_desc->l2c_write_sec; >> ret = l2x0_of_init(machine_desc->l2c_aux_val, >> machine_desc->l2c_aux_mask); >> - if (ret) >> + if (ret == -ENODEV) >> + pr_info("no L2C controller entry found in the dtb\n"); > Perhaps this would be more consistent if it was > pr_info("L2C: no controller entry found in the dtb\n"); Frankly I see no benefit of such message. It still might confuse users that there is something wrong with your DT. When driver initialization fails with -ENODEV, then no message is usually displayed. >> + else if (ret) >> pr_err("L2C: failed to init: %d\n", ret); >> } >> > > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland