From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753837AbbC0Jmo (ORCPT ); Fri, 27 Mar 2015 05:42:44 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:47878 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753742AbbC0Jmn (ORCPT ); Fri, 27 Mar 2015 05:42:43 -0400 From: Wang Long To: , , , , CC: , , , , , , , Subject: [PATCH] ramoops: make it possible to change mem_type param. Date: Fri, 27 Mar 2015 09:19:18 +0000 Message-ID: <1427447958-42138-1-git-send-email-long.wanglong@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.200] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.551520A4.0111,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1e34b9058b755d9fcd00fee787433f1a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If we set ramoops.mem_type=1 in command line, the current code can not change mem_type to 1, because it is assigned to 0 in function ramoops_register_dummy. This patch make it possible to change mem_type parameter in command line. Signed-off-by: Wang Long --- fs/pstore/ram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 44a549b..65e0532 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -65,7 +65,7 @@ module_param(mem_size, ulong, 0400); MODULE_PARM_DESC(mem_size, "size of reserved RAM used to store oops/panic logs"); -static unsigned int mem_type; +static unsigned int mem_type = 0; module_param(mem_type, uint, 0600); MODULE_PARM_DESC(mem_type, "set to 1 to try to use unbuffered memory (default 0)"); @@ -608,7 +608,7 @@ static void ramoops_register_dummy(void) dummy_data->mem_size = mem_size; dummy_data->mem_address = mem_address; - dummy_data->mem_type = 0; + dummy_data->mem_type = mem_type; dummy_data->record_size = record_size; dummy_data->console_size = ramoops_console_size; dummy_data->ftrace_size = ramoops_ftrace_size; -- 1.8.3.4