* [PATCH -next] brd: make symbol rd_size static
@ 2016-10-29 16:10 Wei Yongjun
2016-10-30 3:57 ` Jens Axboe
2016-10-30 9:46 ` Jan Kara
0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-10-29 16:10 UTC (permalink / raw)
To: Jens Axboe, Jan Kara; +Cc: Wei Yongjun, linux-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
Fixes the following sparse warning:
drivers/block/brd.c:411:15: warning:
symbol 'rd_size' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.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 ad793f3..d1edf42 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -408,7 +408,7 @@ static int rd_nr = CONFIG_BLK_DEV_RAM_COUNT;
module_param(rd_nr, int, S_IRUGO);
MODULE_PARM_DESC(rd_nr, "Maximum number of brd devices");
-unsigned long rd_size = CONFIG_BLK_DEV_RAM_SIZE;
+static unsigned long rd_size = CONFIG_BLK_DEV_RAM_SIZE;
module_param(rd_size, ulong, S_IRUGO);
MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] brd: make symbol rd_size static
2016-10-29 16:10 [PATCH -next] brd: make symbol rd_size static Wei Yongjun
@ 2016-10-30 3:57 ` Jens Axboe
2016-10-30 12:40 ` Wei Yongjun
2016-10-30 9:46 ` Jan Kara
1 sibling, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2016-10-30 3:57 UTC (permalink / raw)
To: Wei Yongjun, Jan Kara; +Cc: Wei Yongjun, linux-kernel
On 10/29/2016 10:10 AM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fixes the following sparse warning:
>
> drivers/block/brd.c:411:15: warning:
> symbol 'rd_size' was not declared. Should it be static?
We just tried this, it's used in arm:
arch/arm/kernel/atags_parse.c
static int __init parse_tag_ramdisk(const struct tag *tag)
{
extern int rd_size, rd_image_start, rd_prompt, rd_doload;
[...]
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] brd: make symbol rd_size static
2016-10-29 16:10 [PATCH -next] brd: make symbol rd_size static Wei Yongjun
2016-10-30 3:57 ` Jens Axboe
@ 2016-10-30 9:46 ` Jan Kara
1 sibling, 0 replies; 4+ messages in thread
From: Jan Kara @ 2016-10-30 9:46 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Jens Axboe, Jan Kara, Wei Yongjun, linux-kernel
On Sat 29-10-16 16:10:27, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fixes the following sparse warning:
>
> drivers/block/brd.c:411:15: warning:
> symbol 'rd_size' was not declared. Should it be static?
It should not. It is used in arch/arm/.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] brd: make symbol rd_size static
2016-10-30 3:57 ` Jens Axboe
@ 2016-10-30 12:40 ` Wei Yongjun
0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-10-30 12:40 UTC (permalink / raw)
To: Jens Axboe, Jan Kara; +Cc: Wei Yongjun, linux-kernel
On 10/30/2016 11:57 AM, Jens Axboe wrote:
> On 10/29/2016 10:10 AM, Wei Yongjun wrote:
>> From: Wei Yongjun <weiyongjun1@huawei.com>
>>
>> Fixes the following sparse warning:
>>
>> drivers/block/brd.c:411:15: warning:
>> symbol 'rd_size' was not declared. Should it be static?
>
> We just tried this, it's used in arm:
>
> arch/arm/kernel/atags_parse.c
>
> static int __init parse_tag_ramdisk(const struct tag *tag)
> {
> extern int rd_size, rd_image_start, rd_prompt, rd_doload;
> [...]
>
Oh, yeah, got it.
Thank you very much.
Regards,
Yongjun Wei
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-30 12:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-29 16:10 [PATCH -next] brd: make symbol rd_size static Wei Yongjun
2016-10-30 3:57 ` Jens Axboe
2016-10-30 12:40 ` Wei Yongjun
2016-10-30 9:46 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®