Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338AbdKNIBp (ORCPT ); Tue, 14 Nov 2017 03:01:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34510 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751626AbdKNIBh (ORCPT ); Tue, 14 Nov 2017 03:01:37 -0500 Date: Tue, 14 Nov 2017 16:01:29 +0800 From: Dave Young To: kexec@lists.infradead.org, linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, bhe@redhat.com, vgoyal@redhat.com, bhsharma@redhat.com Subject: [PATCH V2] kdump: print a message in case parse_crashkernel_mem resulted in zero bytes Message-ID: <20171114080129.GA6115@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 14 Nov 2017 08:01:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In parse_crashkernel_mem, it silently return in case we get zero bytes in the parsing function. It is useful for debugging for adding a message especially sometimes kernel can not boot up correctly. Add a pr_info instead of pr_warn because it is expected behavior for size = 0, eg. crashkernel=2G-4G:128M, size will be 0 in case system memory is less than 2G. Signed-off-by: Dave Young --- [v1 -> v2]: bhsharma: pr_warn looks confusing because of return 0 kernel/crash_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- linux-x86.orig/kernel/crash_core.c +++ linux-x86/kernel/crash_core.c @@ -108,7 +108,8 @@ static int __init parse_crashkernel_mem( return -EINVAL; } } - } + } else + pr_info("crashkernel size resulted in zero bytes\n"); return 0; }