Skip to contentSkip to conversation

kernel/resource.c: fix sparse non static symbol warning

PATCH In review Daeseok Youn 3 participants 4 messages Feb 13, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/resource.c: fix sparse non static symbol warning

Quoted 1 line

From f8e0752ac80e56bcbfe197a5820692d199822b52 Mon Sep 17 00:00:00 2001

From: Daeseok Youn <[email protected]>
Date: Thu, 13 Feb 2014 10:11:39 +0900
Subject: [PATCH] kernel/resource.c: fix sparse non static symbol warning

kernel/resource.c:518:5: warning:
symbol 'reallocate_resource' was not declared. Should it be static?

---
 kernel/resource.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/resource.c +1 -1
index 3f285dc..b2979c6 100644
@@ -515,7 +515,7 @@ static int find_resource(struct resource *root, struct resource *new,
  * @newsize: new size of the resource descriptor
  * @constraint: the size and alignment constraints to be met.
  */
-int reallocate_resource(struct resource *root, struct resource *old,
+static int reallocate_resource(struct resource *root, struct resource *old,
 			resource_size_t newsize,
 			struct resource_constraint  *constraint)
 {
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Daeseok Youn

From f8e0752ac80e56bcbfe197a5820692d199822b52 Mon Sep 17 00:00:00 2001
From: Daeseok Youn <[email protected]>
Date: Thu, 13 Feb 2014 10:11:39 +0900
Subject: [PATCH] kernel/resource.c: fix sparse non static symbol warning

kernel/resource.c:518:5: warning:
symbol 'reallocate_resource' was not declared. Should it be static?

Changelog would be better if it said it's only referenced in file scope so it can be marked static.

#2 lore raw

OK. If I send a patch like this again, ChangeLog is written as you comment.

Thanks.
Daeseok Youn.

2014-02-13 11:28 GMT+09:00 David Rientjes <[email protected]>:

Quoted 16 lines · Daeseok Youn
Quoted 10 lines

From f8e0752ac80e56bcbfe197a5820692d199822b52 Mon Sep 17 00:00:00 2001
From: Daeseok Youn <[email protected]>
Date: Thu, 13 Feb 2014 10:11:39 +0900
Subject: [PATCH] kernel/resource.c: fix sparse non static symbol warning

kernel/resource.c:518:5: warning:
symbol 'reallocate_resource' was not declared. Should it be static?

Changelog would be better if it said it's only referenced in file scope so it can be marked static.

Reviewed-by on v1 1/1
#3 lore raw
In reply to Daeseok Youn
Quoted 10 lines · Daeseok Youn

From f8e0752ac80e56bcbfe197a5820692d199822b52 Mon Sep 17 00:00:00 2001
From: Daeseok Youn <[email protected]>
Date: Thu, 13 Feb 2014 10:11:39 +0900
Subject: [PATCH] kernel/resource.c: fix sparse non static symbol warning

kernel/resource.c:518:5: warning:
symbol 'reallocate_resource' was not declared. Should it be static?

---

Thanks,
Yasuaki Ishimatsu

Quoted 17 lines
  kernel/resource.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
kernel/resource.c +1 -1
index 3f285dc..b2979c6 100644
@@ -515,7 +515,7 @@ static int find_resource(struct resource *root, struct resource *new,
   * @newsize: new size of the resource descriptor
   * @constraint: the size and alignment constraints to be met.
   */
-int reallocate_resource(struct resource *root, struct resource *old,
+static int reallocate_resource(struct resource *root, struct resource *old,
  			resource_size_t newsize,
  			struct resource_constraint  *constraint)
  {