From patchwork Tue Jun 27 06:50:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9810901 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B441E60351 for ; Tue, 27 Jun 2017 07:17:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D15EE26222 for ; Tue, 27 Jun 2017 07:17:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C56CB26256; Tue, 27 Jun 2017 07:17:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 684A926222 for ; Tue, 27 Jun 2017 07:17:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751656AbdF0HRJ (ORCPT ); Tue, 27 Jun 2017 03:17:09 -0400 Received: from bxl-001.se.1eurohost.be ([87.238.167.208]:44109 "EHLO bxl-001.se.1eurohost.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751561AbdF0HRI (ORCPT ); Tue, 27 Jun 2017 03:17:08 -0400 X-Greylist: delayed 1572 seconds by postgrey-1.27 at vger.kernel.org; Tue, 27 Jun 2017 03:17:07 EDT Received: from vz23.stone-is.net ([87.238.162.216]) by sf1.bxl.stone.is with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86) (envelope-from ) id 1dPkKg-0001YU-Bh; Tue, 27 Jun 2017 08:50:43 +0200 Received: from exp-402881.sandisk.com.com (178-117-55-239.access.telenet.be [178.117.55.239]) by vz23.stone-is.net (Postfix) with ESMTPA id 87BE4120A74C; Tue, 27 Jun 2017 08:50:37 +0200 (CEST) From: Bart Van Assche To: Andrew Morton Cc: Bart Van Assche , Bart Van Assche , Russell King , Jens Axboe , Jan Kara , yanaijie@huawei.com, zhaohongjiang@huawei.com, miaoxie@huawei.com, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org Subject: [PATCH, RESEND] ARM: Fix rd_size declaration Date: Tue, 27 Jun 2017 08:50:24 +0200 Message-Id: <20170627065024.12347-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.13.1 X-PPP-Message-ID: <20170627065037.612129.12981@vz23.stone-is.net> X-PPP-Vhost: bartvanassche.be X-Originating-IP: 87.238.162.216 X-SpamExperts-Domain: 1eurohost.be X-SpamExperts-Username: vz23 Authentication-Results: bxl.stone.is; auth=pass (plain) smtp.auth=vz23@1eurohost.be X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: SB/global_tokens (1.26585862986e-06) X-Recommended-Action: accept X-Filter-ID: PqwsvolAWURa0gwxuN3S5YEa3T7JuZT23fGO2rGt3ZhOb6mVy14s7cFCoGIo0rDJtHNcS9o7UlGA HPh25xgXoeZdNKT6ucDlFLC5fBfNLGcdp2HJvHLn2BmgmGBjLt85Evu0hL1UqsL6Z2CXAYmfXBum JwiT+2brWmQlzkLIcXivpIH4ag6BM/+u9ym+BA23lJ/9VmmMgSPZceglcASe/O19b50okW22yP22 bTG8N1hDJQ5x7Dq/MyZBRV4ozk8fyEjgsIwKGzGaFZztrR2WGswRTOkB+Z/xFiY1dpLOCSK8Ksk+ aedMfNWSnJswrtlNZTlwBPgbvMsh+LKJ7cz3gRYcppw7p+sHMnyd7tG6k9jAJ4sEYJUkV33+K9iG 8uLhwS4M0B690aNejfEuvKtQZNqaeJv1ftD1M3Z+DvKExzDDAMkYgOTGhcVtsNdTo0WOgqMWXeJ+ 21Dhy6nMwXc/zKexYgzN2alr1Cdovw+qFQmhdlkpfoNhtgWYwB/e4S2rrzbOypuUzMQg+lNXVogO NJJl3FNiWAHgtI7TClOoRjZPqNL9jzhqMmCgIoZ1aXtLT6PtO8amne+DGEGBqAm4odyEIdi4Giau 83ODCoajIduJw2O+33Z9phBZlNT7d/anoHyVPD7wGVqOEd1CxTzAd+BK8PJoCIwdqcV9iOyFOSUm Qeuqg+KB0ry7GTKCmLpb7b+xD+xAiW8OMVR4zv21HQeYUOp7A73HI6oJg7w/VoeR98e9iN7ZpFvf XQjinMvYAl3gpzYtjJqyYNGtY0wDGmQB2ErbcicDbPONrkjWuIP0/50CA3CwPjQ7rlIwKATX/XmL 2bJCoyZ/JR/0pT+JrsLKKmbNfSSKkYdLyl5xlONwWMwTqyRhi+mCjAK5Kv061u3S0Y1ckHmHhkH0 hUTJ4pgu9YnoVLaEVORfFP87T2EE6WPFOfDPkJ6brxGFBWlRwqZC8nyeifmf8R0QIQK4uFcdJpYA 4XcKpzzyyHzpnfEC3DYR6rxE/IZByuAw9wmUhK5Frz84we6DP7LPYyXueOzQu5IqYl3M6BKhcK23 5VfbnJRn0RXSVLMEW4ZQih2ufVok+ESdqvZZ0M7acrb1KpoDhqB/NUPYIxm8SeQJtNBFN27+vavw 0zMWLyurYGBlN/j4qryfxibpcb8wqbI3gnzTVk+ze52g9l1zXLmsefvRlaM1Fe6f1/yjrVO1WtBL AVINS8MwdJHJ3NR9lTx5zg== X-Report-Abuse-To: spam@sf1.bxl.stone.is Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The global variable 'rd_size' is declared as 'int' in source file arch/arm/kernel/atags_parse.c and as 'unsigned long' in drivers/block/brd.c. Fix this inconsistency. Additionally, remove the declarations of rd_image_start, rd_prompt and rd_doload from parse_tag_ramdisk() since these duplicate existing declarations in . Signed-off-by: Bart Van Assche Cc: Russell King Cc: Jens Axboe Cc: Jan Kara Cc: Cc: Cc: Cc: linux-arm-kernel@lists.infradead.org Cc: linux-block@vger.kernel.org --- arch/arm/kernel/atags_parse.c | 3 +-- drivers/block/brd.c | 1 + include/linux/initrd.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c index 68c6ae0b9e4c..98fbfd235ac8 100644 --- a/arch/arm/kernel/atags_parse.c +++ b/arch/arm/kernel/atags_parse.c @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -91,8 +92,6 @@ __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext); #ifdef CONFIG_BLK_DEV_RAM static int __init parse_tag_ramdisk(const struct tag *tag) { - extern int rd_size, rd_image_start, rd_prompt, rd_doload; - rd_image_start = tag->u.ramdisk.start; rd_doload = (tag->u.ramdisk.flags & 1) == 0; rd_prompt = (tag->u.ramdisk.flags & 2) == 0; diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 57b574f2f66a..f8341918a53a 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/include/linux/initrd.h b/include/linux/initrd.h index 55289d261b4f..bc67b767f9ce 100644 --- a/include/linux/initrd.h +++ b/include/linux/initrd.h @@ -10,6 +10,9 @@ extern int rd_prompt; /* starting block # of image */ extern int rd_image_start; +/* size of a single RAM disk */ +extern unsigned long rd_size; + /* 1 if it is not an error if initrd_start < memory_start */ extern int initrd_below_start_ok;