public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] block: brd: Staticize 'rd_size'
@ 2013-08-09  4:06 Jingoo Han
  0 siblings, 0 replies; 2+ messages in thread
From: Jingoo Han @ 2013-08-09  4:06 UTC (permalink / raw)
  To: 'Andrew Morton'; +Cc: linux-kernel, 'Nick Piggin', Jingoo Han

'rd_size' is used only in this file.
Fix the following sparse warning:

drivers/block/brd.c:432:5: warning: symbol 'rd_size' was not declared. Should it be static?

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/block/brd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 9bf4371..650530ab 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -429,7 +429,7 @@ static const struct block_device_operations brd_fops = {
  * And now the modules code and kernel interface.
  */
 static int rd_nr;
-int rd_size = CONFIG_BLK_DEV_RAM_SIZE;
+static int rd_size = CONFIG_BLK_DEV_RAM_SIZE;
 static int max_part;
 static int part_shift;
 module_param(rd_nr, int, S_IRUGO);
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread
* Re: [PATCH 3/3] block: brd: Staticize 'rd_size'
@ 2013-08-09  6:07 Jingoo Han
  0 siblings, 0 replies; 2+ messages in thread
From: Jingoo Han @ 2013-08-09  6:07 UTC (permalink / raw)
  To: 'Andrew Morton'; +Cc: linux-kernel, 'Nick Piggin', Jingoo Han

On Friday, August 09, 2013 1:07 PM, Jingoo Han wrote:
> 
> 'rd_size' is used only in this file.
> Fix the following sparse warning:
> 
> drivers/block/brd.c:432:5: warning: symbol 'rd_size' was not declared. Should it be static?
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/block/brd.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Sorry, please ignore this patch.
It makes link error as below:

arch/arm/kernel/built-in.o: In function `parse_tag_ramdisk':
/home/jin9/mainline/linux-next_130806_sparse/arch/arm/kernel/atags_parse.c:103: undefined reference to `rd_size'

Best regards,
Jingoo Han

> 
> diff --git a/drivers/block/brd.c b/drivers/block/brd.c
> index 9bf4371..650530ab 100644
> --- a/drivers/block/brd.c
> +++ b/drivers/block/brd.c
> @@ -429,7 +429,7 @@ static const struct block_device_operations brd_fops = {
>   * And now the modules code and kernel interface.
>   */
>  static int rd_nr;
> -int rd_size = CONFIG_BLK_DEV_RAM_SIZE;
> +static int rd_size = CONFIG_BLK_DEV_RAM_SIZE;
>  static int max_part;
>  static int part_shift;
>  module_param(rd_nr, int, S_IRUGO);
> --
> 1.7.10.4



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-09  6:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09  4:06 [PATCH 3/3] block: brd: Staticize 'rd_size' Jingoo Han
  -- strict thread matches above, loose matches on Subject: below --
2013-08-09  6:07 Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox