Skip to contentSkip to conversation

Staging:dgnc:dgnc_driver open/close braces

PATCH In review Paul McQuade 2 participants 2 messages Apr 9, 2014 – May 15, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging:dgnc:dgnc_driver open/close braces

ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}
ERROR: space required before the open parenthesis '(
ERROR: trailing whitespace
ERROR: open brace '{' following function declarations go on the next line
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required before the open parenthesis '('

---
 drivers/staging/dgnc/dgnc_driver.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)
drivers/staging/dgnc/dgnc_driver.c +8 -10
index b1a39b2..7c853c4 100644
@@ -88,8 +88,7 @@ module_exit(dgnc_cleanup_module);
 /*
  * File operations permitted on Control/Management major.
  */
-static const struct file_operations dgnc_BoardFops =
-{
+static const struct file_operations dgnc_BoardFops = {
 	.owner		=	THIS_MODULE,
 	.unlocked_ioctl =  	dgnc_mgmt_ioctl,
 	.open		=	dgnc_mgmt_open,
@@ -153,8 +152,7 @@ struct board_id {
 	unsigned int is_pci_express;
 };
 
-static struct board_id dgnc_Ids[] =
-{
+static struct board_id dgnc_Ids[] = {
 	{	PCI_DEVICE_CLASSIC_4_PCI_NAME,		4,	0	},
 	{	PCI_DEVICE_CLASSIC_4_422_PCI_NAME,	4,	0	},
 	{	PCI_DEVICE_CLASSIC_8_PCI_NAME,		8,	0	},
@@ -239,8 +237,7 @@ int dgnc_init_module(void)
 			pr_warn("WARNING: dgnc driver load failed.  No Digi Neo or Classic boards found.\n");
 
 		dgnc_cleanup_module();
-	}
-	else {
+	} else {
 		dgnc_create_driver_sysfiles(&dgnc_driver);
 	}
 
@@ -410,7 +407,7 @@ static void dgnc_cleanup_board(struct dgnc_board *brd)
 {
 	int i = 0;
 
-	if(!brd || brd->magic != DGNC_BOARD_MAGIC)
+	if (!brd || brd->magic != DGNC_BOARD_MAGIC)
 		return;
 
 	switch (brd->device) {
@@ -488,7 +485,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
 	/* get the board structure and prep it */
 	brd = dgnc_Board[dgnc_NumBoards] =
 		kzalloc(sizeof(*brd), GFP_KERNEL);
-	if (!brd) 
+	if (!brd)
 		return -ENOMEM;
 
 	/* make a temporary message buffer for the boot messages */
@@ -532,7 +529,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
 	brd->irq = pci_irq;
 
 
-	switch(brd->device) {
+	switch (brd->device) {
 
 	case PCI_DEVICE_CLASSIC_4_DID:
 	case PCI_DEVICE_CLASSIC_8_DID:
@@ -719,7 +716,8 @@ failed:
 }
 
 
-static int dgnc_finalize_board_init(struct dgnc_board *brd) {
+static int dgnc_finalize_board_init(struct dgnc_board *brd)
+{
 	int rc = 0;
 
 	DPR_INIT(("dgnc_finalize_board_init() - start\n"));

@@ -895,7 +893,7 @@ int dgnc_ms_sleep(ulong ms)
*/
char *dgnc_ioctl_name(int cmd)
{
- switch(cmd) {
+ switch (cmd) {

case TCGETA: return "TCGETA";
case TCGETS: return "TCGETS";

Signature · 1 line
1.8.3.2
maintainer
#1 lore raw
Quoted 8 lines · Paul McQuade

ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}
ERROR: space required before the open parenthesis '(
ERROR: trailing whitespace
ERROR: open brace '{' following function declarations go on the next line
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required before the open parenthesis '('

Quoted 4 lines
---
 drivers/staging/dgnc/dgnc_driver.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

There is something really odd in this patch that git refuses to apply it. Can you please refresh it and send it again, after verifying that it will apply properly on your side?

The error I get is:

Applying: Staging:dgnc:dgnc_driver open/close braces
fatal: patch fragment without header at line 77: @@ -895,7 +893,7 @@ int dgnc_ms_sleep(ulong ms)

thanks,

greg k-h