Skip to contentSkip to conversation

dgnc: Remove superfluous EXTRA_CFLAGS variable

PATCH In review Cass May 2 participants 4 messages Feb 15, 2015 – Feb 16, 2015 Staging

lore
Share & tools
lore

Cass May

author
#0 lore raw

PATCH v3 1/2 dgnc: Remove superfluous EXTRA_CFLAGS variable

Clean up Makefile by removing unnecessary definition of DG_NAME.

---
Having done some build tests, it seems that DG_NAME is not needed, but DG_PART is referenced in dgnc_mgmt.c. I have removed the former, and moved the latter into the appropriate header.

 drivers/staging/dgnc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/Makefile +1 -1
index b69f7b6..84cc98d 100644
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\"
+EXTRA_CFLAGS += -DDG_PART=\"40002369_F\"
 
 obj-$(CONFIG_DGNC) += dgnc.o
 
Signature · 1 line
2.1.4
author
#1 lore raw

PATCH 2/2 dgnc: Move DG_PART definition from Makefile to dgnc_driver.h

Avoid deprecated usage of EXTRA_CFLAGS by moving definition of DG_PART into dgnc_driver.h

---
 drivers/staging/dgnc/Makefile      | 2 --
 drivers/staging/dgnc/dgnc_driver.h | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/dgnc/Makefile +0 -2
index 84cc98d..995c874 100644
@@ -1,5 +1,3 @@
-EXTRA_CFLAGS += -DDG_PART=\"40002369_F\"
-
 obj-$(CONFIG_DGNC) += dgnc.o
 
 dgnc-objs :=   dgnc_cls.o dgnc_driver.o\
drivers/staging/dgnc/dgnc_driver.h +1 -0
index a8157eb..dd715eb 100644
@@ -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"		/* RPM part number	 */
 
 #define TRC_TO_CONSOLE 1
 
Signature · 1 line
2.1.4
#2 lore raw
In reply to Cass May
Quoted 7 lines · Cass May

Clean up Makefile by removing unnecessary definition of DG_NAME.

---
Having done some build tests, it seems that DG_NAME is not needed, but DG_PART is referenced in dgnc_mgmt.c. I have removed the former, and moved the latter into the appropriate header.

Thanks!

Don't resend; this patch is great. But next time just fold both patches together into one patch. It's all part of the same fix really so it falls into the "one thing per patch" rule.

regards,
dan carpenter

author
#3 lore raw
Quoted 9 lines · Dan Carpenter
Quoted 7 lines · Cass May

Clean up Makefile by removing unnecessary definition of DG_NAME.

---
Having done some build tests, it seems that DG_NAME is not needed, but DG_PART is referenced in dgnc_mgmt.c. I have removed the former, and moved the latter into the appropriate header.

Quoted 8 lines

Thanks!

Don't resend; this patch is great. But next time just fold both patches together into one patch. It's all part of the same fix really so it falls into the "one thing per patch" rule.

regards,
dan carpenter

Shall do! Thank you for the guidance.

-cass