All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging:dgnc:dgnc_driver open/close braces
@ 2014-04-09 16:30 Paul McQuade
  2014-05-15 20:34 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Paul McQuade @ 2014-04-09 16:30 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, devel, linux-kernel

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 '('

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
---
 drivers/staging/dgnc/dgnc_driver.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index b1a39b2..7c853c4 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -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";
-- 
1.8.3.2


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

* Re: [PATCH] Staging:dgnc:dgnc_driver open/close braces
  2014-04-09 16:30 [PATCH] Staging:dgnc:dgnc_driver open/close braces Paul McQuade
@ 2014-05-15 20:34 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-05-15 20:34 UTC (permalink / raw)
  To: Paul McQuade; +Cc: devel, driverdev-devel, linux-kernel

On Wed, Apr 09, 2014 at 05:30:04PM +0100, Paul McQuade wrote:
> 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 '('
> 
> Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
> ---
>  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

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

end of thread, other threads:[~2014-05-15 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09 16:30 [PATCH] Staging:dgnc:dgnc_driver open/close braces Paul McQuade
2014-05-15 20:34 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.