public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: dgnc: replace EXTRA_CFLAGS
@ 2015-03-01  8:41 Matteo Semenzato
  2015-03-01 16:41 ` Greg KH
  2015-03-01 17:19 ` [PATCH V2] " Matteo Semenzato
  0 siblings, 2 replies; 8+ messages in thread
From: Matteo Semenzato @ 2015-03-01  8:41 UTC (permalink / raw)
  To: lidza.louina, markh, gregkh
  Cc: driverdev-devel, linux-kernel, Matteo Semenzato

From: Matteo Semenzato <mattew8898@gmail.com>

This patch fixes the following warning:
Use of EXTRA_CFLAGS is deprecated, please use `ccflags-y instead.

Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
---
 drivers/staging/dgnc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile
index b69f7b6..d70323e 100644
--- a/drivers/staging/dgnc/Makefile
+++ b/drivers/staging/dgnc/Makefile
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"
+ccflags-y += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"
 
 obj-$(CONFIG_DGNC) += dgnc.o
 
-- 
2.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: dgnc: replace EXTRA_CFLAGS
  2015-03-01  8:41 [PATCH] Staging: dgnc: replace EXTRA_CFLAGS Matteo Semenzato
@ 2015-03-01 16:41 ` Greg KH
  2015-03-01 17:19 ` [PATCH V2] " Matteo Semenzato
  1 sibling, 0 replies; 8+ messages in thread
From: Greg KH @ 2015-03-01 16:41 UTC (permalink / raw)
  To: Matteo Semenzato; +Cc: lidza.louina, markh, driverdev-devel, linux-kernel

On Sun, Mar 01, 2015 at 09:41:26AM +0100, Matteo Semenzato wrote:
> From: Matteo Semenzato <mattew8898@gmail.com>
> 
> This patch fixes the following warning:
> Use of EXTRA_CFLAGS is deprecated, please use `ccflags-y instead.
> 
> Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
> ---
>  drivers/staging/dgnc/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile
> index b69f7b6..d70323e 100644
> --- a/drivers/staging/dgnc/Makefile
> +++ b/drivers/staging/dgnc/Makefile
> @@ -1,4 +1,4 @@
> -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"
> +ccflags-y += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"

Please fix the code to not need these flags at all.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH V2] Staging: dgnc: replace EXTRA_CFLAGS
  2015-03-01  8:41 [PATCH] Staging: dgnc: replace EXTRA_CFLAGS Matteo Semenzato
  2015-03-01 16:41 ` Greg KH
@ 2015-03-01 17:19 ` Matteo Semenzato
  2015-03-01 17:26   ` Greg KH
  1 sibling, 1 reply; 8+ messages in thread
From: Matteo Semenzato @ 2015-03-01 17:19 UTC (permalink / raw)
  To: lidza.louina, markh, gregkh
  Cc: driverdev-devel, linux-kernel, Matteo Semenzato

From: Matteo Semenzato <mattew8898@gmail.com>

This patch removes EXTRA_CFLAGS from the Makefile and defines DDG_PART
in dgnc_driver.h

Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
---
 drivers/staging/dgnc/Makefile      | 2 --
 drivers/staging/dgnc/dgnc_driver.h | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile
index b69f7b6..995c874 100644
--- a/drivers/staging/dgnc/Makefile
+++ b/drivers/staging/dgnc/Makefile
@@ -1,5 +1,3 @@
-EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"
-
 obj-$(CONFIG_DGNC) += dgnc.o
 
 dgnc-objs :=   dgnc_cls.o dgnc_driver.o\
diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h
index a8157eb..0b718a8 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -46,6 +46,7 @@
 #define	PROCSTR		"dgnc"			/* /proc entries	 */
 #define	DEVSTR		"/dev/dg/dgnc"		/* /dev entries		 */
 #define	DRVSTR		"dgnc"			/* Driver name string	 */
+#define DG_PART		"40002369_F"
 
 #define TRC_TO_CONSOLE 1
 
-- 
2.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] Staging: dgnc: replace EXTRA_CFLAGS
  2015-03-01 17:19 ` [PATCH V2] " Matteo Semenzato
@ 2015-03-01 17:26   ` Greg KH
  2015-03-01 17:40     ` Matteo Semenzato
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2015-03-01 17:26 UTC (permalink / raw)
  To: Matteo Semenzato; +Cc: lidza.louina, markh, driverdev-devel, linux-kernel

On Sun, Mar 01, 2015 at 06:19:57PM +0100, Matteo Semenzato wrote:
> From: Matteo Semenzato <mattew8898@gmail.com>
> 
> This patch removes EXTRA_CFLAGS from the Makefile and defines DDG_PART
> in dgnc_driver.h
> 
> Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
> ---
>  drivers/staging/dgnc/Makefile      | 2 --
>  drivers/staging/dgnc/dgnc_driver.h | 1 +
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile
> index b69f7b6..995c874 100644
> --- a/drivers/staging/dgnc/Makefile
> +++ b/drivers/staging/dgnc/Makefile
> @@ -1,5 +1,3 @@
> -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"
> -
>  obj-$(CONFIG_DGNC) += dgnc.o
>  
>  dgnc-objs :=   dgnc_cls.o dgnc_driver.o\
> diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h
> index a8157eb..0b718a8 100644
> --- a/drivers/staging/dgnc/dgnc_driver.h
> +++ b/drivers/staging/dgnc/dgnc_driver.h
> @@ -46,6 +46,7 @@
>  #define	PROCSTR		"dgnc"			/* /proc entries	 */
>  #define	DEVSTR		"/dev/dg/dgnc"		/* /dev entries		 */
>  #define	DRVSTR		"dgnc"			/* Driver name string	 */
> +#define DG_PART		"40002369_F"

Why do we need this define?

And why doesn't it use the same formatting as the other ones in this
list?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] Staging: dgnc: replace EXTRA_CFLAGS
  2015-03-01 17:26   ` Greg KH
@ 2015-03-01 17:40     ` Matteo Semenzato
  2015-03-01 18:05       ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Matteo Semenzato @ 2015-03-01 17:40 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel@vger.kernel.org

Il giorno dom, 01/03/2015 alle 09.26 -0800, Greg KH ha scritto:
> On Sun, Mar 01, 2015 at 06:19:57PM +0100, Matteo Semenzato wrote:
> > From: Matteo Semenzato <mattew8898@gmail.com>
> > 
> > This patch removes EXTRA_CFLAGS from the Makefile and defines DDG_PART
> > in dgnc_driver.h
> > 
> > Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
> > ---
> >  drivers/staging/dgnc/Makefile      | 2 --
> >  drivers/staging/dgnc/dgnc_driver.h | 1 +
> >  2 files changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile
> > index b69f7b6..995c874 100644
> > --- a/drivers/staging/dgnc/Makefile
> > +++ b/drivers/staging/dgnc/Makefile
> > @@ -1,5 +1,3 @@
> > -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"
> > -
> >  obj-$(CONFIG_DGNC) += dgnc.o
> >  
> >  dgnc-objs :=   dgnc_cls.o dgnc_driver.o\
> > diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h
> > index a8157eb..0b718a8 100644
> > --- a/drivers/staging/dgnc/dgnc_driver.h
> > +++ b/drivers/staging/dgnc/dgnc_driver.h
> > @@ -46,6 +46,7 @@
> >  #define	PROCSTR		"dgnc"			/* /proc entries	 */
> >  #define	DEVSTR		"/dev/dg/dgnc"		/* /dev entries		 */
> >  #define	DRVSTR		"dgnc"			/* Driver name string	 */
> > +#define DG_PART		"40002369_F"
> 
> Why do we need this define?
> 
> And why doesn't it use the same formatting as the other ones in this
> list?

DG_PART is being used in dgnc_mgmt.c and dgnc_sysfs.c


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] Staging: dgnc: replace EXTRA_CFLAGS
  2015-03-01 17:40     ` Matteo Semenzato
@ 2015-03-01 18:05       ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2015-03-01 18:05 UTC (permalink / raw)
  To: 1425199286-16376-1-git-send-email-mattew8898; +Cc: linux-kernel@vger.kernel.org

On Sun, Mar 01, 2015 at 06:40:05PM +0100, Matteo Semenzato wrote:
> Il giorno dom, 01/03/2015 alle 09.26 -0800, Greg KH ha scritto:
> > On Sun, Mar 01, 2015 at 06:19:57PM +0100, Matteo Semenzato wrote:
> > > From: Matteo Semenzato <mattew8898@gmail.com>
> > > 
> > > This patch removes EXTRA_CFLAGS from the Makefile and defines DDG_PART
> > > in dgnc_driver.h
> > > 
> > > Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
> > > ---
> > >  drivers/staging/dgnc/Makefile      | 2 --
> > >  drivers/staging/dgnc/dgnc_driver.h | 1 +
> > >  2 files changed, 1 insertion(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile
> > > index b69f7b6..995c874 100644
> > > --- a/drivers/staging/dgnc/Makefile
> > > +++ b/drivers/staging/dgnc/Makefile
> > > @@ -1,5 +1,3 @@
> > > -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"
> > > -
> > >  obj-$(CONFIG_DGNC) += dgnc.o
> > >  
> > >  dgnc-objs :=   dgnc_cls.o dgnc_driver.o\
> > > diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h
> > > index a8157eb..0b718a8 100644
> > > --- a/drivers/staging/dgnc/dgnc_driver.h
> > > +++ b/drivers/staging/dgnc/dgnc_driver.h
> > > @@ -46,6 +46,7 @@
> > >  #define	PROCSTR		"dgnc"			/* /proc entries	 */
> > >  #define	DEVSTR		"/dev/dg/dgnc"		/* /dev entries		 */
> > >  #define	DRVSTR		"dgnc"			/* Driver name string	 */
> > > +#define DG_PART		"40002369_F"
> > 
> > Why do we need this define?
> > 
> > And why doesn't it use the same formatting as the other ones in this
> > list?
> 
> DG_PART is being used in dgnc_mgmt.c and dgnc_sysfs.c

What it is being used for?  Can it be removed?  Is it just there for
informational purposes or does the code actually do something based on
the value?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] Staging: dgnc: replace EXTRA_CFLAGS
@ 2015-03-01 18:35 Matteo Semenzato
  2015-03-01 19:56 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Matteo Semenzato @ 2015-03-01 18:35 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel@vger.kernel.org

On Sun, 1 Mar 2015 10:05:06 -0800, Greg KH wrote:
> What it is being used for?  Can it be removed?  Is it just there for
> informational purposes or does the code actually do something based on
> the value?

The value is used to create a file called version in the driver's sysfs
directory, the file is read-only.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2] Staging: dgnc: replace EXTRA_CFLAGS
  2015-03-01 18:35 Matteo Semenzato
@ 2015-03-01 19:56 ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2015-03-01 19:56 UTC (permalink / raw)
  To: 20150301180506.GA32433; +Cc: linux-kernel@vger.kernel.org

On Sun, Mar 01, 2015 at 07:35:02PM +0100, Matteo Semenzato wrote:
> On Sun, 1 Mar 2015 10:05:06 -0800, Greg KH wrote:
> > What it is being used for?  Can it be removed?  Is it just there for
> > informational purposes or does the code actually do something based on
> > the value?
> 
> The value is used to create a file called version in the driver's sysfs
> directory, the file is read-only.

That's useless, it is a built-time thing, just remove the sysfs file as
well.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-01 19:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-01  8:41 [PATCH] Staging: dgnc: replace EXTRA_CFLAGS Matteo Semenzato
2015-03-01 16:41 ` Greg KH
2015-03-01 17:19 ` [PATCH V2] " Matteo Semenzato
2015-03-01 17:26   ` Greg KH
2015-03-01 17:40     ` Matteo Semenzato
2015-03-01 18:05       ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2015-03-01 18:35 Matteo Semenzato
2015-03-01 19:56 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox