Staging: board: Fixed the error for implicit declaration of function
PATCH 1/1 Staging: board: Fixed the error for implicit declaration of function
Fixed the error for implicit declaration of the function 'of_find_all_nodes' by adding the appropriate header file and declaring the function before it has been called.
--- drivers/staging/board/board.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/board/board.c +2 -0
@@ -19,11 +19,13 @@#include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> +#include <asm/prom.h> #include "board.h" static struct device_node *irqc_node__initdata ;static unsigned int irqc_base__initdata ; +struct device_node *of_find_all_nodes (struct device_node *prev);static bool find_by_address (u64 base_address) {
Signature · 1 line
2.1.0
Quoted 3 lines · Shivani Bhardwaj
Fixed the error for implicit declaration of the function '
of_find_all_nodes' by adding the appropriate header file and declaring the function before it has been called.
I haven't looked at the code, but I wonder why you need both the header file and the local declaration?
julia
Quoted 33 lines
Signed-off-by Shivani Bhardwaj: <[email protected]>--- drivers/staging/board/board.c | 2 ++ 1 file changed, 2 insertions(+)drivers/staging/board/board.c +2
-1@@ -19,11 +19,13 @@#include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> +#include <asm/prom.h> #include "board.h" static struct device_node *irqc_node__initdata ;static unsigned int irqc_base__initdata ; +struct device_node *of_find_all_nodes (struct device_node *prev);static bool find_by_address (u64 base_address) { --2.1.0
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151002040637.GA41415%40ubuntu.
For more options, visit https://groups.google.com/d/optout.
I tried declaring it first, it didn't work. I added the header, it worked. Now, when I tried again, it works without header too. I'll update the patch, I must have done something wrong while declaring for the first time. Thanks, Julia. I'm sorry I'm making such petty errors, I'm noting everything, I'll make sure to send a good patch soon.
Quoted 52 lines · Julia Lawall
Quoted 3 lines · Shivani Bhardwaj
Fixed the error for implicit declaration of the function '
of_find_all_nodes' by adding the appropriate header file and declaring the function before it has been called.I haven't looked at the code, but I wonder why you need both the header file and the local declaration?
julia
Review
Quoted 6 lines
Signed-off-by Shivani Bhardwaj: <[email protected] <javascript:>>---
drivers/staging/board/board.c | 2 ++ 1 file changed, 2 insertions(+)(quoted diff) +0
-0
b/drivers/staging/board/board.cQuoted 22 lines
index 29d456e..8d0ac82 100644
drivers/staging/board/board.c +2
-0@@ -19,11 +19,13 @@#include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> +#include <asm/prom.h> #include "board.h" static struct device_node *irqc_node__initdata ;static unsigned int irqc_base__initdata ; +struct device_node *of_find_all_nodes (struct device_node *prev);static bool find_by_address (u64 base_address) {Signature · 4 lines
2.1.0 -- You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected] <javascript:>.
Quoted 1 line
To post to this group, send email to [email protected]
<javascript:>.
Quoted 1 line
To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20151002040637.GA41415%40ubuntu.
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Quoted 5 lines · Shivani Bhardwaj
I tried declaring it first, it didn't work. I added the header, it worked. Now, when I tried again, it works without header too. I'll update the patch, I must have done something wrong while declaring for the first time. Thanks, Julia. I'm sorry I'm making such petty errors, I'm noting everything, I'll make sure to send a good patch soon.
If the header declares the function, then it doesn't seem like a good idea to declare the function locally as well.
julia
Quoted 66 lines · Julia Lawall
On Fri, 2 Oct 2015, Shivani Bhardwaj wrote:
> Fixed the error for implicit declaration of the function > '
of_find_all_nodes' by adding the appropriate header file and declaring
> the function before it has been called.I haven't looked at the code, but I wonder why you need both the header
file and the local declaration?julia
> Signed-off-by: Shivani Bhardwaj: <[email protected]>
> ---
> drivers/staging/board/board.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --gita/drivers/staging/board/board.c
b/drivers/staging/board/board.c
> index 29d456e..8d0ac82 100644
> ---a/drivers/staging/board/board.c
> +++b/drivers/staging/board/board.c
> @@ -19,11 +19,13 @@
> #include <linux/of_irq.h>
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> +#include <asm/prom.h>
>
> #include "board.h"
>
> static structdevice_node*irqc_node__initdata;
> static unsigned intirqc_base__initdata;
> +structdevice_node*of_find_all_nodes(structdevice_node
*prev);
>
> static boolfind_by_address(u64 base_address)
> {
> --
> 2.1.0
>
> --
> You received this message because you are subscribed to the
Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected].
> To post to this group, send email to
[email protected].
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/20151002040637.GA41415%4 0ubuntu.
> For more options, visit https://groups.google.com/d/optout.
>--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/83a1df2c-03c5-456a-9131- 3dca7182d7ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 5 lines · Shivani Bhardwaj
I tried declaring it first, it didn't work. I added the header, it worked. Now, when I tried again, it works without header too. I'll update the patch, I must have done something wrong while declaring for the first time. Thanks, Julia. I'm sorry I'm making such petty errors, I'm noting everything, I'll make sure to send a good patch soon.
We all have done mistakes while starting. Let me point out one more thing - please do not top post.
I am not seeing this build error/warning. How you are building it? Can you please post your .config file.
regards
sudip
PATCH 1/1 Staging: board: Fixed the error for implicit declaration of function
Quoted 18 lines · Sudip Mukherjee
Quoted 8 lines · Shivani Bhardwaj
Quoted 3 lines
Hi Sudip! I'm using sparse to find out the errors and make command to compile a particular module. I'm sending my .config file. Thanks!
I tried declaring it first, it didn't work. I added the header, it worked. Now, when I tried again, it works without header too. I'll update the patch, I must have done something wrong while declaring for the first time. Thanks, Julia. I'm sorry I'm making such petty errors, I'm noting everything, I'll make sure to send a good patch soon.
We all have done mistakes while starting. Let me point out one more thing - please do not top post.
I am not seeing this build error/warning. How you are building it? Can you please post your .config file.
regards
sudip
Hi Sudeep! I'm having trouble with inline mode of communication, I think I'm doing it wrong. I'm not getting exactly difference between top-post and inline way, I've been warned about this before as well. I'll learn as soon as possible. I've sent my .config file. You can check it. Thanks a lot!
Quoted 20 lines · Sudip Mukherjee
Quoted 1 line · Shivani Bhardwaj
I tried declaring it first, it didn't work. I added the header, it
worked.
Quoted 2 lines
Now, when I tried again, it works without header too. I'll update the patch, I must have done something wrong while declaring for the first
time.
Quoted 2 lines
Thanks, Julia. I'm sorry I'm making such petty errors, I'm noting everything, I'll make sure to send a good patch soon.
We all have done mistakes while starting. Let me point out one more thing -
please do not top post.I am not seeing this build error/warning. How you are building it? Can you please post your .config file.
regards
sudip
On Fri, Oct 02, 2015 at 05:01:06AM -0700, Shivani Bhardwaj wrote:
This is top posting .. replying on top of the mail.
Quoted 4 lines
Hi Sudeep! I'm having trouble with inline mode of communication, I think I'm doing it wrong. I'm not getting exactly difference between top-post and inline way, I've been warned about this before as well. I'll learn as soon as possible. I've sent my .config file. You can check it.
And this in inline posting. BTW, are you using gmail web interface for replying? I could not find any reference of client in this mail's header.
regards
sudip
Quoted 4 lines · Shivani Bhardwaj
Hi Sudeep! I'm having trouble with inline mode of communication, I think I'm doing it wrong. I'm not getting exactly difference between top-post and inline way, I've been warned about this before as well. I'll learn as soon as possible. I've sent my .config file. You can check it.
Ok, now I understand why you are getting the warning. :)
In your .config CONFIG_STAGING_BOARD is not selected. So staging/board is not included in the build and as a result the modules on which board is dependent are also not built. So in this scenario when you try to do make M=drivers/staging/board it gives warning. To test properly try with make allmodconfig.
regards
sudip
Thanks, Sudip! And for last two messages I did make use of mutt, I don't know why doesn't it show up.
And, does this mean that every time I compile, I must use allmodconfig? Thank you
Quoted 18 lines · Sudip Mukherjee
Quoted 2 lines · Shivani Bhardwaj
Hi Sudeep! I'm having trouble with inline mode of communication, I think I'm doing it wrong. I'm not getting exactly difference between top-post
and
Quoted 1 line
inline way, I've been warned about this before as well. I'll learn as
soon
Quoted 1 line
as possible. I've sent my .config file. You can check it.
Ok, now I understand why you are getting the warning. :)
In your .configCONFIG_STAGING_BOARDis not selected. So staging/board is not included in the build and as a result the modules on which board is dependent are also not built. So in this scenario when you try to do make M=drivers/staging/board it gives warning. To test properly try with make allmodconfig.regards
sudip
Quoted 3 lines · Shivani Bhardwaj
Thanks, Sudip! And for last two messages I did make use of mutt, I don't know why doesn't it show up.
And, does this mean that every time I compile, I must use allmodconfig?
You have top posted again. Once you make allmodconfig, it should be good enough to leave it as is, at least until you update your kernel and get a new Kconfig file.
julia
Quoted 37 lines
Thank you
On Friday, October 2, 2015 at 6:29:15 PM UTC+5:30, Sudip Mukherjee wrote:
On Fri, Oct 02, 2015 at 05:01:06AM -0700, Shivani Bhardwaj wrote:
> Hi Sudeep! I'm having trouble with inline mode of communication, I think
> I'm doing it wrong. I'm not getting exactly difference between top-post and
> inline way, I've been warned about this before as well. I'll learn as soon
> as possible. I've sent my .config file. You can check it. Ok, now I understand why you are getting the warning. :) In your .configCONFIG_STAGING_BOARDis not selected. So staging/board
is not included in the build and as a result the modules on which board
is dependent are also not built. So in this scenario when you try to do
make M=drivers/staging/board it gives warning. To test properly try with
make allmodconfig.regards
sudip--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/71611fa2-5d15-4032-bd55- b7991ea55a5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 56 lines · Julia Lawall
Quoted 10 lines · Shivani Bhardwaj
Quoted 7 lines
Hi Julia, Sudip! I think after I have used make allmodconfig, something is not working right. Now, when I use sparse, it shows messages and warnings for
arch/andinclude/, is this dues to some change in configuration file? Please respond.
Thank you!Thanks, Sudip! And for last two messages I did make use of mutt, I don't know why doesn't it show up.
And, does this mean that every time I compile, I must use allmodconfig?You have top posted again. Once you make allmodconfig, it should be good enough to leave it as is, at least until you update your kernel and get a new
Kconfigfile.julia
Quoted 37 lines
Thank you
On Friday, October 2, 2015 at 6:29:15 PM UTC+5:30, Sudip Mukherjee wrote:
On Fri, Oct 02, 2015 at 05:01:06AM -0700, Shivani Bhardwaj wrote:
> Hi Sudeep! I'm having trouble with inline mode of communication, I think
> I'm doing it wrong. I'm not getting exactly difference between top-post and
> inline way, I've been warned about this before as well. I'll learn as soon
> as possible. I've sent my .config file. You can check it. Ok, now I understand why you are getting the warning. :) In your .configCONFIG_STAGING_BOARDis not selected. So staging/board
is not included in the build and as a result the modules on which board
is dependent are also not built. So in this scenario when you try to do
make M=drivers/staging/board it gives warning. To test properly try with
make allmodconfig.regards
sudip--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/71611fa2-5d15-4032-bd55- b7991ea55a5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Done. Seems like those folders didn't have much to compile, only one file whose dependencies were compiled.
Thank you
Quoted 68 lines · Shivani Bhardwaj
Quoted 10 lines · Julia Lawall
Quoted 8 lines · Shivani Bhardwaj
Quoted 7 lines
Hi Julia, Sudip! I think after I have used make allmodconfig, something is not working right. Now, when I use sparse, it shows messages and warnings for
arch/andinclude/, is this dues to some change in configuration file? Please respond.
Thank you!Thanks, Sudip! And for last two messages I did make use of mutt, I
don't
Quoted 2 lines
Quoted 2 lines
know why doesn't it show up.
And, does this mean that every time I compile, I must useallmodconfig?
Quoted 2 lines
You have top posted again. Once you make allmodconfig, it should be
good
Quoted 1 line
enough to leave it as is, at least until you update your kernel and get
a
Quoted 7 lines
new
Kconfigfile.julia
Quoted 3 lines
Thank you
On Friday, October 2, 2015 at 6:29:15 PM UTC+5:30, Sudip Mukherjee
Quoted 20 lines · wrote:
Quoted 20 lines
On Fri, Oct 02, 2015 at 05:01:06AM -0700, Shivani Bhardwaj wrote:
> Hi Sudeep! I'm having trouble with inline mode of communication, I think
> I'm doing it wrong. I'm not getting exactly difference between top-post and
> inline way, I've been warned about this before as well. I'll learn as soon
> as possible. I've sent my .config file. You can check it. Ok, now I understand why you are getting the warning. :) In your .configCONFIG_STAGING_BOARDis not selected. So staging/board
is not included in the build and as a result the modules on which board
is dependent are also not built. So in this scenario when you try to do
make M=drivers/staging/board it gives warning. To test properly try with
make allmodconfig.Quoted 5 lines
Quoted 5 lines
regards
sudipSignature · 1 line
You received this message because you are subscribed to the GoogleGroups
Quoted 2 lines
Quoted 2 lines
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, sendan
Quoted 4 lines
Quoted 4 lines
email to [email protected].
To post to this group, send email to [email protected].To view this discussion on the web visithttps://
groups.google.com/d/msgid/outreachy-kernel/71611fa2-5d15-4032-bd55-
Quoted 4 lines
Quoted 4 lines
b7991ea55a5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 4 lines · Shivani Bhardwaj
Done. Seems like those folders didn't have much to compile, only one file whose dependencies were compiled.
Thank you
Hi,
You top posted again even after the explanation from Sudip. :(
Please don't do this. Read this:
http://kernelnewbies.org/mailinglistguidelines
And consider the following line:
'Please do not TOP POST. On almost all open source mailing list top-posting is considered RUDE.'
Thank you.
Quoted 79 lines · Shivani Bhardwaj
Quoted 52 lines · Julia Lawall
Quoted 50 lines · Shivani Bhardwaj
Quoted 8 lines
Quoted 8 lines
Hi Julia, Sudip! I think after I have used make allmodconfig, something is not working right. Now, when I use sparse, it shows messages and warnings for
arch/andinclude/, is this dues to some change in configuration file? Please respond.
Thank you!Quoted 5 lines
Thanks, Sudip! And for last two messages I did make use of mutt, I don't
know why doesn't it show up.
And, does this mean that every time I compile, I must use allmodconfig?You have top posted again. Once you make allmodconfig, it should be good
enough to leave it as is, at least until you update your kernel and get a
newKconfigfile.julia
Quoted 27 lines
Thank you
On Friday, October 2, 2015 at 6:29:15 PM UTC+5:30, Sudip Mukherjee wrote:
On Fri, Oct 02, 2015 at 05:01:06AM -0700, Shivani Bhardwaj wrote:
> Hi Sudeep! I'm having trouble with inline mode of communication, I think
> I'm doing it wrong. I'm not getting exactly difference between top-post and
> inline way, I've been warned about this before as well. I'll learn as soon
> as possible. I've sent my .config file. You can check it. Ok, now I understand why you are getting the warning. :) In your .configCONFIG_STAGING_BOARDis not selected. So staging/board
is not included in the build and as a result the modules on which board
is dependent are also not built. So in this scenario when you try to do
make M=drivers/staging/board it gives warning. To test properly try with
make allmodconfig.regards
sudipQuoted 15 lines
Quoted 7 lines
Quoted 7 lines
--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].Quoted 8 lines
Quoted 8 lines
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/71611fa2-5d15-4032-bd55- b7991ea55a5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/c6724038-bdcb-4813-b49b-22b9d8f5af2b%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.
Signature · 1 line
Vaishali
Quoted 2 lines · Shivani Bhardwaj
Done. Seems like those folders didn't have much to compile, only one file whose dependencies were compiled.
Before you send a patch, at least check that you have a .o file or the .c file that is affected by your patch. You can also compile by saying make path/to/file.o. The only risk with that method is that it won't find missing dependencies between files, if you eg change a function name in one place but not everywhere that it is used. But changes inside functions often don't relate to that. And with make path/to/file.o you will see immediately if it is able to compile your file.
julia
Quoted 68 lines
Thank you
On Tuesday, October 6, 2015 at 9:38:25 AM UTC+5:30, Shivani Bhardwaj wrote:
On Sun, Oct 04, 2015 at 02:59:17PM +0200, Julia Lawall wrote:
> On Sun, 4 Oct 2015, Shivani Bhardwaj wrote:
>
>>>
>>> Hi Julia, Sudip! I think after I have used make allmodconfig,
>>> something is not working right. Now, when I use sparse, it shows
>>> messages and warnings forarch/andinclude/, is this dues to some
>>> change in configuration file? Please respond.
>>> Thank you!
>>>
> > Thanks, Sudip! And for last two messages I did make use of mutt, I don't
> > know why doesn't it show up.
> > And, does this mean that every time I compile, I must use allmodconfig?
>
> You have top posted again. Once you make allmodconfig, it should be good
> enough to leave it as is, at least until you update your kernel and get a
> newKconfigfile.
>
> julia
>
> > Thank you
> >
> > On Friday, October 2, 2015 at 6:29:15 PM UTC+5:30, Sudip Mukherjee wrote:
> > On Fri, Oct 02, 2015 at 05:01:06AM -0700, Shivani Bhardwaj
> > wrote:
> > > Hi Sudeep! I'm having trouble with inline mode of
> > communication, I think
> > > I'm doing it wrong. I'm not getting exactly difference between
> > top-post and
> > > inline way, I've been warned about this before as well. I'll
> > learn as soon
> > > as possible. I've sent my .config file. You can check it.
> > Ok, now I understand why you are getting the warning. :)
> > In your .configCONFIG_STAGING_BOARDis not selected. So
> > staging/board
> > is not included in the build and as a result the modules on
> > which board
> > is dependent are also not built. So in this scenario when you
> > try to do
> > make M=drivers/staging/board it gives warning. To test properly
> > try with
> > make allmodconfig.
> >
> > regards
> > sudip
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/71611fa2-5d15-4032-bd55- > > b7991ea55a5b%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/c6724038-bdcb-4813-b49b-22b9d8f5af2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 5 lines · Julia Lawall
Quoted 2 lines · Shivani Bhardwaj
Done. Seems like those folders didn't have much to compile, only one file whose dependencies were compiled.
Quoted 7 lines
Before you send a patch, at least check that you have a .o file or the .c file that is affected by your patch. You can also compile by saying make
path/to/file.o. The only risk with that method is that it won't find missing dependencies between files, if you eg change a function name in one place but not everywhere that it is used. But changes inside functions often don't relate to that. And with makepath/to/file.oyou will see immediately if it is able to compile your file.
Usually I will compile the whole folder. Suppose I change something in unisys and I want to check it, I will do:
make clean M=drivers/staging/unisys
make M=drivers/staging/unisys
regards
sudip
Quoted 24 lines · Sudip Mukherjee
Quoted 1 line · Julia Lawall
On Mon, 5 Oct 2015, Shivani Bhardwaj wrote:
Thank you, Sudeep! :)
Quoted 11 lines
Quoted 3 lines
Done. Seems like those folders didn't have much to compile, only one file whose dependencies were compiled.
Before you send a patch, at least check that you have a .o file or the .c file that is affected by your patch. You can also compile by saying make
path/to/file.o. The only risk with that method is that it won't find missing dependencies between files, if you eg change a function name in one place but not everywhere that it is used. But changes inside functions often don't relate to that. And with makepath/to/file.oyou will see immediately if it is able to compile your file.Usually I will compile the whole folder. Suppose I change something in unisys and I want to check it, I will do:
make clean M=drivers/staging/unisys
make M=drivers/staging/unisysregards
sudip
Quoted 3 lines · Shivani Bhardwaj
Done. Seems like those folders didn't have much to compile, only one file whose dependencies were compiled.
Top posting.. :(
It will not recompile if the .o files are already there and .c files have not been modified. So if you want to recompile all files do make clean or much better make distclean. make distclean will clean everything even your .config file also. But usually when I am working or checking patches for staging I will just do make clean M=drivers/staging , so it will just clean staging and now when you make again it will compile all files in staging which are in your .config.
With sparse if you use C=2 then it will recompile even .o files are there, but with C=1 the default behaviour of not compiling will take effect.
regard
sudip
Hi Julia! I have a doubt. I think I'm having trouble with the header file because it declares the function prototype with an extern keyword (I'm not sure if memory allocation plays a role in this). And, if the function has been declared in some header file then re-declaration of it won't be a good practice, I suppose. Please tell me whether extern has to do anything with it or not. This is the header file
http://lxr.free-electrons.com/source/include/linux/of.h#L189.
Thank you.
Quoted 32 lines · Shivani Bhardwaj
Fixed the error for implicit declaration of the function '
of_find_all_nodes' by adding the appropriate header file and declaring the function before it has been called.Signed-off-by Shivani Bhardwaj: <[email protected]>---
drivers/staging/board/board.c | 2 ++ 1 file changed, 2 insertions(+)drivers/staging/board/board.c +2
-0@@ -19,11 +19,13 @@#include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> +#include <asm/prom.h> #include "board.h" static struct device_node *irqc_node__initdata ;static unsigned int irqc_base__initdata ; +struct device_node *of_find_all_nodes (struct device_node *prev);static bool find_by_address (u64 base_address) {Signature · 1 line
2.1.0
Quoted 7 lines · Shivani Bhardwaj
Hi Julia! I have a doubt. I think I'm having trouble with the header file because it declares the function prototype with an extern keyword (I'm not sure if memory allocation plays a role in this). And, if the function has been declared in some header file then re-declaration of it won't be a good practice, I suppose. Please tell me whether extern has to do anything with it or not. This is the header file
http://lxr.free-electrons.com/source/include/linux/of.h#L189.
Why did you suggest to add an include of prom.h rather than of of.h?
You shouldn't declare such a generic function in the specific driver.
julia
Quoted 47 lines
Thank you.
On Friday, October 2, 2015 at 9:36:47 AM UTC+5:30, Shivani Bhardwaj wrote:
Fixed the error for implicit declaration of the function 'of_find_all_nodes' by adding the appropriate header file and declaring the function before it has been called. Signed-off-by: Shivani Bhardwaj: <[email protected]> --- drivers/staging/board/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c index 29d456e..8d0ac82 100644 --- a/drivers/staging/board/board.c +++ b/drivers/staging/board/board.c @@ -19,11 +19,13 @@ #include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> +#include <asm/prom.h> #include "board.h" static struct device_node *irqc_node __initdata; static unsigned int irqc_base __initdata; +struct device_node *of_find_all_nodes(struct device_node *prev); static bool find_by_address(u64 base_address) { -- 2.1.0--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/b520f0bf-34b7-41a1-948f- 7ca510325cfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Julia, I'm sorry. I looked for all the places where the function was available, prom.h wasn't the ideal place though. I've removed it and I'm still not able to configure what is causing problems if I do have correct header files and everything needed. I'm working on this. Thank you so much.
Quoted 76 lines · Julia Lawall
Quoted 1 line · Shivani Bhardwaj
Hi Julia! I have a doubt. I think I'm having trouble with the header
file
Quoted 1 line
because it declares the function prototype with an extern keyword (I'm
not
Quoted 1 line
sure if memory allocation plays a role in this). And, if the function
has
Quoted 1 line
been declared in some header file then re-declaration of it won't be a
good
Quoted 1 line
practice, I suppose. Please tell me whether extern has to do anything
with
Quoted 2 lines
it or not. This is the header file
http://lxr.free-electrons.com/source/include/linux/of.h#L189.Why did you suggest to add an include of
prom.hrather than ofof.h?You shouldn't declare such a generic function in the specific driver.
julia
Quoted 3 lines
Thank you.
On Friday, October 2, 2015 at 9:36:47 AM UTC+5:30, Shivani Bhardwaj
Quoted 25 lines · wrote:
Fixed the error for implicit declaration of the function 'of_find_all_nodes' by adding the appropriate header file and declaring the function before it has been called. Signed-off-by: Shivani Bhardwaj: <[email protected] <javascript:>> --- drivers/staging/board/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c index 29d456e..8d0ac82 100644 --- a/drivers/staging/board/board.c +++ b/drivers/staging/board/board.c @@ -19,11 +19,13 @@ #include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> +#include <asm/prom.h> #include "board.h" static struct device_node *irqc_node __initdata;Quoted 11 lines
static unsigned int irqc_base __initdata; +struct device_node *of_find_all_nodes(struct device_node *prev); static bool find_by_address(u64 base_address) { -- 2.1.0Signature · 1 line
You received this message because you are subscribed to the GoogleGroups
Quoted 2 lines
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, sendan
Quoted 2 lines
email to [email protected] <javascript:>. To post to this group, send email to [email protected]
<javascript:>.
Quoted 1 line
To view this discussion on the web visithttps://
groups.google.com/d/msgid/outreachy-kernel/b520f0bf-34b7-41a1-948f-
Quoted 4 lines
7ca510325cfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.