Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1293832 > unrolled thread

[PATCH] net/macb: add proper header file

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2015-12-17 13:20 +0100
Last post2015-12-17 15:20 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] net/macb: add proper header file Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-17 13:20 +0100
    Re: [PATCH] net/macb: add proper header file Nicolas Ferre <nicolas.ferre@atmel.com> - 2015-12-17 13:50 +0100
    Re: [PATCH] net/macb: add proper header file Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-17 14:00 +0100
      Re: [PATCH] net/macb: add proper header file Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-17 15:20 +0100

#1293832 — [PATCH] net/macb: add proper header file

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-17 13:20 +0100
Subject[PATCH] net/macb: add proper header file
Message-ID<qGFHk-7JC-7@gated-at.bofh.it>
mips allmodconfig build fails with the error:

drivers/net/ethernet/cadence/macb.c: In function 'macb_probe':
drivers/net/ethernet/cadence/macb.c:2908:2: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]
  bp->reset_gpio = devm_gpiod_get_optional(&bp->pdev->dev, "phy-reset",
  ^
drivers/net/ethernet/cadence/macb.c:2909:8: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function)
        GPIOD_OUT_HIGH);
        ^
drivers/net/ethernet/cadence/macb.c:2909:8: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/ethernet/cadence/macb.c: In function 'macb_remove':
drivers/net/ethernet/cadence/macb.c:2979:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
   gpiod_set_value(bp->reset_gpio, 0);
   ^

Add the proper header file to resolve it.  

Fixes: 5833e0526820 ("net/macb: add support for resetting PHY using GPIO")
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---

build log with next-20151217 is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/97388463

 drivers/net/ethernet/cadence/macb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 0123646..988ee14 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/interrupt.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
-- 
1.9.1

--
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/

[toc] | [next] | [standalone]


#1293858

FromNicolas Ferre <nicolas.ferre@atmel.com>
Date2015-12-17 13:50 +0100
Message-ID<qGGam-7Vm-9@gated-at.bofh.it>
In reply to#1293832
Le 17/12/2015 13:15, Sudip Mukherjee a écrit :
> mips allmodconfig build fails with the error:
> 
> drivers/net/ethernet/cadence/macb.c: In function 'macb_probe':
> drivers/net/ethernet/cadence/macb.c:2908:2: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]
>   bp->reset_gpio = devm_gpiod_get_optional(&bp->pdev->dev, "phy-reset",
>   ^
> drivers/net/ethernet/cadence/macb.c:2909:8: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function)
>         GPIOD_OUT_HIGH);
>         ^
> drivers/net/ethernet/cadence/macb.c:2909:8: note: each undeclared identifier is reported only once for each function it appears in
> drivers/net/ethernet/cadence/macb.c: In function 'macb_remove':
> drivers/net/ethernet/cadence/macb.c:2979:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
>    gpiod_set_value(bp->reset_gpio, 0);
>    ^
> 
> Add the proper header file to resolve it.  
> 
> Fixes: 5833e0526820 ("net/macb: add support for resetting PHY using GPIO")
> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

This one is fixed and handled by Gregory here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/394433.html

Thanks a lot anyay, bye,


> ---
> 
> build log with next-20151217 is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/97388463
> 
>  drivers/net/ethernet/cadence/macb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 0123646..988ee14 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -19,6 +19,7 @@
>  #include <linux/init.h>
>  #include <linux/io.h>
>  #include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/interrupt.h>
>  #include <linux/netdevice.h>
>  #include <linux/etherdevice.h>
> 


-- 
Nicolas Ferre
--
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/

[toc] | [prev] | [next] | [standalone]


#1293867

FromGregory CLEMENT <gregory.clement@free-electrons.com>
Date2015-12-17 14:00 +0100
Message-ID<qGGk2-7YN-19@gated-at.bofh.it>
In reply to#1293832
Hi Sudip,
 
 On jeu., déc. 17 2015, Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:

> mips allmodconfig build fails with the error:
>
> drivers/net/ethernet/cadence/macb.c: In function 'macb_probe':
> drivers/net/ethernet/cadence/macb.c:2908:2: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]
>   bp->reset_gpio = devm_gpiod_get_optional(&bp->pdev->dev, "phy-reset",
>   ^
> drivers/net/ethernet/cadence/macb.c:2909:8: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function)
>         GPIOD_OUT_HIGH);
>         ^
> drivers/net/ethernet/cadence/macb.c:2909:8: note: each undeclared identifier is reported only once for each function it appears in
> drivers/net/ethernet/cadence/macb.c: In function 'macb_remove':
> drivers/net/ethernet/cadence/macb.c:2979:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
>    gpiod_set_value(bp->reset_gpio, 0);
>    ^
>
> Add the proper header file to resolve it.  


A proper fix already has been posted along with the proper device tree
bindinsg too:
http://marc.info/?l=linux-netdev&m=145034590619620&w=2

Thanks,

Gregory

>
> Fixes: 5833e0526820 ("net/macb: add support for resetting PHY using GPIO")
> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>
> build log with next-20151217 is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/97388463
>
>  drivers/net/ethernet/cadence/macb.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 0123646..988ee14 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -19,6 +19,7 @@
>  #include <linux/init.h>
>  #include <linux/io.h>
>  #include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/interrupt.h>
>  #include <linux/netdevice.h>
>  #include <linux/etherdevice.h>
> -- 
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
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/

[toc] | [prev] | [next] | [standalone]


#1293921

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-17 15:20 +0100
Message-ID<qGHzr-wg-1@gated-at.bofh.it>
In reply to#1293867
On Thu, Dec 17, 2015 at 01:41:59PM +0100, Gregory CLEMENT wrote:
> Hi Sudip,
>  
>  On jeu., déc. 17 2015, Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> 
> > mips allmodconfig build fails with the error:
> >
> > drivers/net/ethernet/cadence/macb.c: In function 'macb_probe':
> > drivers/net/ethernet/cadence/macb.c:2908:2: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]
> >   bp->reset_gpio = devm_gpiod_get_optional(&bp->pdev->dev, "phy-reset",
> >   ^
> > drivers/net/ethernet/cadence/macb.c:2909:8: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function)
> >         GPIOD_OUT_HIGH);
> >         ^
> > drivers/net/ethernet/cadence/macb.c:2909:8: note: each undeclared identifier is reported only once for each function it appears in
> > drivers/net/ethernet/cadence/macb.c: In function 'macb_remove':
> > drivers/net/ethernet/cadence/macb.c:2979:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
> >    gpiod_set_value(bp->reset_gpio, 0);
> >    ^
> >
> > Add the proper header file to resolve it.  
> 
> 
> A proper fix already has been posted along with the proper device tree
> bindinsg too:
> http://marc.info/?l=linux-netdev&m=145034590619620&w=2

Thanks, just compiled with it and the build error for which I posted this patch
is now gone.

regards
sudip
--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web