* [PATCH] hugetlb: fix sparse warning for hugetlb_register_node
@ 2013-03-04 10:46 Claudiu Ghioc
2013-03-07 12:55 ` Daniel Baluta
0 siblings, 1 reply; 3+ messages in thread
From: Claudiu Ghioc @ 2013-03-04 10:46 UTC (permalink / raw)
To: akpm
Cc: mhocko, aneesh.kumar, dhillf, kamezawa.hiroyu, linux-mm,
linux-kernel, Claudiu Ghioc
Removed the following sparse warnings:
* mm/hugetlb.c:1764:6: warning: symbol
'hugetlb_unregister_node' was not declared.
Should it be static?
* mm/hugetlb.c:1808:6: warning: symbol
'hugetlb_register_node' was not declared.
Should it be static?
Signed-off-by: Claudiu Ghioc <claudiu.ghioc@gmail.com>
---
mm/hugetlb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 0a0be33..c65a8a5 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1761,7 +1761,7 @@ static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp)
* Unregister hstate attributes from a single node device.
* No-op if no hstate attributes attached.
*/
-void hugetlb_unregister_node(struct node *node)
+static void hugetlb_unregister_node(struct node *node)
{
struct hstate *h;
struct node_hstate *nhs = &node_hstates[node->dev.id];
@@ -1805,7 +1805,7 @@ static void hugetlb_unregister_all_nodes(void)
* Register hstate attributes for a single node device.
* No-op if attributes already registered.
*/
-void hugetlb_register_node(struct node *node)
+static void hugetlb_register_node(struct node *node)
{
struct hstate *h;
struct node_hstate *nhs = &node_hstates[node->dev.id];
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hugetlb: fix sparse warning for hugetlb_register_node
2013-03-04 10:46 [PATCH] hugetlb: fix sparse warning for hugetlb_register_node Claudiu Ghioc
@ 2013-03-07 12:55 ` Daniel Baluta
2013-03-07 14:11 ` Jiri Kosina
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Baluta @ 2013-03-07 12:55 UTC (permalink / raw)
To: Claudiu Ghioc, trivial, jkosina
Cc: akpm, mhocko, aneesh.kumar, dhillf, kamezawa.hiroyu, linux-mm,
linux-kernel, Claudiu Ghioc
On Mon, Mar 4, 2013 at 12:46 PM, Claudiu Ghioc <claudiughioc@gmail.com> wrote:
> Removed the following sparse warnings:
> * mm/hugetlb.c:1764:6: warning: symbol
> 'hugetlb_unregister_node' was not declared.
> Should it be static?
> * mm/hugetlb.c:1808:6: warning: symbol
> 'hugetlb_register_node' was not declared.
> Should it be static?
>
> Signed-off-by: Claudiu Ghioc <claudiu.ghioc@gmail.com>
> ---
> mm/hugetlb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 0a0be33..c65a8a5 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -1761,7 +1761,7 @@ static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp)
> * Unregister hstate attributes from a single node device.
> * No-op if no hstate attributes attached.
> */
> -void hugetlb_unregister_node(struct node *node)
> +static void hugetlb_unregister_node(struct node *node)
> {
> struct hstate *h;
> struct node_hstate *nhs = &node_hstates[node->dev.id];
> @@ -1805,7 +1805,7 @@ static void hugetlb_unregister_all_nodes(void)
> * Register hstate attributes for a single node device.
> * No-op if attributes already registered.
> */
> -void hugetlb_register_node(struct node *node)
> +static void hugetlb_register_node(struct node *node)
> {
> struct hstate *h;
> struct node_hstate *nhs = &node_hstates[node->dev.id];
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
Hi Jiri,
Can you pick this up via trivial tree?
thanks,
Daniel.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hugetlb: fix sparse warning for hugetlb_register_node
2013-03-07 12:55 ` Daniel Baluta
@ 2013-03-07 14:11 ` Jiri Kosina
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2013-03-07 14:11 UTC (permalink / raw)
To: Daniel Baluta
Cc: Claudiu Ghioc, akpm, mhocko, aneesh.kumar, dhillf,
kamezawa.hiroyu, linux-mm, linux-kernel, Claudiu Ghioc
On Thu, 7 Mar 2013, Daniel Baluta wrote:
> > Removed the following sparse warnings:
> > * mm/hugetlb.c:1764:6: warning: symbol
> > 'hugetlb_unregister_node' was not declared.
> > Should it be static?
> > * mm/hugetlb.c:1808:6: warning: symbol
> > 'hugetlb_register_node' was not declared.
> > Should it be static?
> >
> > Signed-off-by: Claudiu Ghioc <claudiu.ghioc@gmail.com>
> > ---
> > mm/hugetlb.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> > index 0a0be33..c65a8a5 100644
> > --- a/mm/hugetlb.c
> > +++ b/mm/hugetlb.c
> > @@ -1761,7 +1761,7 @@ static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp)
> > * Unregister hstate attributes from a single node device.
> > * No-op if no hstate attributes attached.
> > */
> > -void hugetlb_unregister_node(struct node *node)
> > +static void hugetlb_unregister_node(struct node *node)
> > {
> > struct hstate *h;
> > struct node_hstate *nhs = &node_hstates[node->dev.id];
> > @@ -1805,7 +1805,7 @@ static void hugetlb_unregister_all_nodes(void)
> > * Register hstate attributes for a single node device.
> > * No-op if attributes already registered.
> > */
> > -void hugetlb_register_node(struct node *node)
> > +static void hugetlb_register_node(struct node *node)
> > {
> > struct hstate *h;
> > struct node_hstate *nhs = &node_hstates[node->dev.id];
>
> Can you pick this up via trivial tree?
Seems like sparse is correct here, as register_hugetlbfs_with_node is
passing pointers to those functions.
Will take it.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-07 14:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 10:46 [PATCH] hugetlb: fix sparse warning for hugetlb_register_node Claudiu Ghioc
2013-03-07 12:55 ` Daniel Baluta
2013-03-07 14:11 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).