* [PATCH v2 0/3] staging: dgnc: dgnc_driver.c checkpatch modifications @ 2016-11-18 20:18 ` Walt Feasel 0 siblings, 0 replies; 8+ messages in thread From: Walt Feasel @ 2016-11-18 20:18 UTC (permalink / raw) To: lidza.louina Cc: markh, gregkh, driverdev-devel, devel, linux-kernel, Walt Feasel Make Linux kernel coding style modifications for dgnc_driver.c to include: CHECK: Please don't use multiple blank lines CHECK: Blank lines aren't necessary before a close brace '}' Comment style modifications Walt Feasel (3): staging: dgnc: dgnc_driver.c Comment style modifications staging: dgnc: dgnc_driver.c Remove blank lines staging: dgnc: dgnc_driver.c Blank line before } drivers/staging/dgnc/dgnc_driver.c | 60 ++++++++++++-------------------------- 1 file changed, 19 insertions(+), 41 deletions(-) -- v2 makes changes to correct for email format patch submission 2.1.4 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 0/3] staging: dgnc: dgnc_driver.c checkpatch modifications @ 2016-11-18 20:18 ` Walt Feasel 0 siblings, 0 replies; 8+ messages in thread From: Walt Feasel @ 2016-11-18 20:18 UTC (permalink / raw) To: lidza.louina; +Cc: devel, Walt Feasel, gregkh, driverdev-devel, linux-kernel Make Linux kernel coding style modifications for dgnc_driver.c to include: CHECK: Please don't use multiple blank lines CHECK: Blank lines aren't necessary before a close brace '}' Comment style modifications Walt Feasel (3): staging: dgnc: dgnc_driver.c Comment style modifications staging: dgnc: dgnc_driver.c Remove blank lines staging: dgnc: dgnc_driver.c Blank line before } drivers/staging/dgnc/dgnc_driver.c | 60 ++++++++++++-------------------------- 1 file changed, 19 insertions(+), 41 deletions(-) -- v2 makes changes to correct for email format patch submission 2.1.4 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] staging: dgnc: dgnc_driver.c Comment style modifications 2016-11-18 20:18 ` Walt Feasel @ 2016-11-18 20:18 ` Walt Feasel -1 siblings, 0 replies; 8+ messages in thread From: Walt Feasel @ 2016-11-18 20:18 UTC (permalink / raw) To: lidza.louina Cc: markh, gregkh, driverdev-devel, devel, linux-kernel, Walt Feasel Make modifications to comment styles Signed-off-by: Walt Feasel <waltfeasel@gmail.com> --- v2 makes changes to correct for email format patch submission drivers/staging/dgnc/dgnc_driver.c | 57 +++++++++++++------------------------- 1 file changed, 20 insertions(+), 37 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 6f2bffa..d232dd2 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -31,9 +31,8 @@ MODULE_AUTHOR("Digi International, http://www.digi.com"); MODULE_DESCRIPTION("Driver for the Digi International Neo and Classic PCI based product line"); MODULE_SUPPORTED_DEVICE("dgnc"); -/* - * File operations permitted on Control/Management major. - */ +/* File operations permitted on Control/Management major. */ + static const struct file_operations dgnc_board_fops = { .owner = THIS_MODULE, .unlocked_ioctl = dgnc_mgmt_ioctl, @@ -41,9 +40,8 @@ static const struct file_operations dgnc_board_fops = { .release = dgnc_mgmt_close }; -/* - * Globals - */ +/* Globals */ + uint dgnc_num_boards; struct dgnc_board *dgnc_board[MAXBOARDS]; DEFINE_SPINLOCK(dgnc_global_lock); @@ -51,14 +49,12 @@ DEFINE_SPINLOCK(dgnc_poll_lock); /* Poll scheduling lock */ uint dgnc_major; int dgnc_poll_tick = 20; /* Poll interval - 20 ms */ -/* - * Static vars. - */ +/* Static vars. */ + static struct class *dgnc_class; -/* - * Poller stuff - */ +/* Poller stuff */ + static ulong dgnc_poll_time; /* Time of next poll */ static uint dgnc_poll_stop; /* Used to tell poller to stop */ static struct timer_list dgnc_poll_timer; @@ -101,9 +97,8 @@ static const struct board_id dgnc_ids[] = { -/* - * Remap PCI memory. - */ +/* Remap PCI memory. */ + static int dgnc_do_remap(struct dgnc_board *brd) { int rc = 0; @@ -321,7 +316,6 @@ static void dgnc_free_irq(struct dgnc_board *brd) } /* - * * Function: * * dgnc_poll_handler @@ -343,7 +337,6 @@ static void dgnc_free_irq(struct dgnc_board *brd) * As each timer expires, it determines (a) whether the "transmit" * waiter needs to be woken up, and (b) whether the poller needs to * be rescheduled. - * */ static void dgnc_poll_handler(ulong dummy) @@ -371,9 +364,8 @@ static void dgnc_poll_handler(ulong dummy) spin_unlock_irqrestore(&brd->bd_lock, flags); } - /* - * Schedule ourself back at the nominal wakeup interval. - */ + /* Schedule ourself back at the nominal wakeup interval. */ + spin_lock_irqsave(&dgnc_poll_lock, flags); dgnc_poll_time += dgnc_jiffies_from_ms(dgnc_poll_tick); @@ -406,9 +398,7 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (IS_ERR(brd)) return PTR_ERR(brd); - /* - * Do tty device initialization. - */ + /* Do tty device initialization. */ rc = dgnc_tty_register(brd); if (rc < 0) { @@ -454,9 +444,8 @@ static struct pci_driver dgnc_driver = { .id_table = dgnc_pci_tbl, }; -/* - * Start of driver. - */ +/* Start of driver. */ + static int dgnc_start(void) { int rc = 0; @@ -566,11 +555,7 @@ static void dgnc_cleanup_board(struct dgnc_board *brd) kfree(brd); } -/************************************************************************ - * - * Driver load/unload functions - * - ************************************************************************/ +/* Driver load/unload functions */ static void cleanup(bool sysfiles) { @@ -619,17 +604,15 @@ static int __init dgnc_init_module(void) { int rc; - /* - * Initialize global stuff - */ + /* Initialize global stuff */ + rc = dgnc_start(); if (rc < 0) return rc; - /* - * Find and configure all the cards - */ + /* Find and configure all the cards */ + rc = pci_register_driver(&dgnc_driver); if (rc) { pr_warn("WARNING: dgnc driver load failed. No Digi Neo or Classic boards found.\n"); -- 2.1.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] staging: dgnc: dgnc_driver.c Comment style modifications @ 2016-11-18 20:18 ` Walt Feasel 0 siblings, 0 replies; 8+ messages in thread From: Walt Feasel @ 2016-11-18 20:18 UTC (permalink / raw) To: lidza.louina; +Cc: devel, Walt Feasel, gregkh, driverdev-devel, linux-kernel Make modifications to comment styles Signed-off-by: Walt Feasel <waltfeasel@gmail.com> --- v2 makes changes to correct for email format patch submission drivers/staging/dgnc/dgnc_driver.c | 57 +++++++++++++------------------------- 1 file changed, 20 insertions(+), 37 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 6f2bffa..d232dd2 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -31,9 +31,8 @@ MODULE_AUTHOR("Digi International, http://www.digi.com"); MODULE_DESCRIPTION("Driver for the Digi International Neo and Classic PCI based product line"); MODULE_SUPPORTED_DEVICE("dgnc"); -/* - * File operations permitted on Control/Management major. - */ +/* File operations permitted on Control/Management major. */ + static const struct file_operations dgnc_board_fops = { .owner = THIS_MODULE, .unlocked_ioctl = dgnc_mgmt_ioctl, @@ -41,9 +40,8 @@ static const struct file_operations dgnc_board_fops = { .release = dgnc_mgmt_close }; -/* - * Globals - */ +/* Globals */ + uint dgnc_num_boards; struct dgnc_board *dgnc_board[MAXBOARDS]; DEFINE_SPINLOCK(dgnc_global_lock); @@ -51,14 +49,12 @@ DEFINE_SPINLOCK(dgnc_poll_lock); /* Poll scheduling lock */ uint dgnc_major; int dgnc_poll_tick = 20; /* Poll interval - 20 ms */ -/* - * Static vars. - */ +/* Static vars. */ + static struct class *dgnc_class; -/* - * Poller stuff - */ +/* Poller stuff */ + static ulong dgnc_poll_time; /* Time of next poll */ static uint dgnc_poll_stop; /* Used to tell poller to stop */ static struct timer_list dgnc_poll_timer; @@ -101,9 +97,8 @@ static const struct board_id dgnc_ids[] = { -/* - * Remap PCI memory. - */ +/* Remap PCI memory. */ + static int dgnc_do_remap(struct dgnc_board *brd) { int rc = 0; @@ -321,7 +316,6 @@ static void dgnc_free_irq(struct dgnc_board *brd) } /* - * * Function: * * dgnc_poll_handler @@ -343,7 +337,6 @@ static void dgnc_free_irq(struct dgnc_board *brd) * As each timer expires, it determines (a) whether the "transmit" * waiter needs to be woken up, and (b) whether the poller needs to * be rescheduled. - * */ static void dgnc_poll_handler(ulong dummy) @@ -371,9 +364,8 @@ static void dgnc_poll_handler(ulong dummy) spin_unlock_irqrestore(&brd->bd_lock, flags); } - /* - * Schedule ourself back at the nominal wakeup interval. - */ + /* Schedule ourself back at the nominal wakeup interval. */ + spin_lock_irqsave(&dgnc_poll_lock, flags); dgnc_poll_time += dgnc_jiffies_from_ms(dgnc_poll_tick); @@ -406,9 +398,7 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (IS_ERR(brd)) return PTR_ERR(brd); - /* - * Do tty device initialization. - */ + /* Do tty device initialization. */ rc = dgnc_tty_register(brd); if (rc < 0) { @@ -454,9 +444,8 @@ static struct pci_driver dgnc_driver = { .id_table = dgnc_pci_tbl, }; -/* - * Start of driver. - */ +/* Start of driver. */ + static int dgnc_start(void) { int rc = 0; @@ -566,11 +555,7 @@ static void dgnc_cleanup_board(struct dgnc_board *brd) kfree(brd); } -/************************************************************************ - * - * Driver load/unload functions - * - ************************************************************************/ +/* Driver load/unload functions */ static void cleanup(bool sysfiles) { @@ -619,17 +604,15 @@ static int __init dgnc_init_module(void) { int rc; - /* - * Initialize global stuff - */ + /* Initialize global stuff */ + rc = dgnc_start(); if (rc < 0) return rc; - /* - * Find and configure all the cards - */ + /* Find and configure all the cards */ + rc = pci_register_driver(&dgnc_driver); if (rc) { pr_warn("WARNING: dgnc driver load failed. No Digi Neo or Classic boards found.\n"); -- 2.1.4 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] staging: dgnc: dgnc_driver.c Remove blank lines 2016-11-18 20:18 ` Walt Feasel @ 2016-11-18 20:18 ` Walt Feasel -1 siblings, 0 replies; 8+ messages in thread From: Walt Feasel @ 2016-11-18 20:18 UTC (permalink / raw) To: lidza.louina Cc: markh, gregkh, driverdev-devel, devel, linux-kernel, Walt Feasel Make suggested checkpatch modification for CHECK: Please don't use multiple blank lines Signed-off-by: Walt Feasel <waltfeasel@gmail.com> --- v2 makes changes to correct for email format patch submission drivers/staging/dgnc/dgnc_driver.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index d232dd2..e80d2345 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -95,8 +95,6 @@ static const struct board_id dgnc_ids[] = { { NULL, 0, 0 } }; - - /* Remap PCI memory. */ static int dgnc_do_remap(struct dgnc_board *brd) @@ -626,5 +624,3 @@ static int __init dgnc_init_module(void) module_init(dgnc_init_module); module_exit(dgnc_cleanup_module); - - -- 2.1.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] staging: dgnc: dgnc_driver.c Remove blank lines @ 2016-11-18 20:18 ` Walt Feasel 0 siblings, 0 replies; 8+ messages in thread From: Walt Feasel @ 2016-11-18 20:18 UTC (permalink / raw) To: lidza.louina; +Cc: devel, Walt Feasel, gregkh, driverdev-devel, linux-kernel Make suggested checkpatch modification for CHECK: Please don't use multiple blank lines Signed-off-by: Walt Feasel <waltfeasel@gmail.com> --- v2 makes changes to correct for email format patch submission drivers/staging/dgnc/dgnc_driver.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index d232dd2..e80d2345 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -95,8 +95,6 @@ static const struct board_id dgnc_ids[] = { { NULL, 0, 0 } }; - - /* Remap PCI memory. */ static int dgnc_do_remap(struct dgnc_board *brd) @@ -626,5 +624,3 @@ static int __init dgnc_init_module(void) module_init(dgnc_init_module); module_exit(dgnc_cleanup_module); - - -- 2.1.4 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] staging: dgnc: dgnc_driver.c Blank line before } 2016-11-18 20:18 ` Walt Feasel @ 2016-11-18 20:18 ` Walt Feasel -1 siblings, 0 replies; 8+ messages in thread From: Walt Feasel @ 2016-11-18 20:18 UTC (permalink / raw) To: lidza.louina Cc: markh, gregkh, driverdev-devel, devel, linux-kernel, Walt Feasel Make suggested checkpatch modification for CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> --- v2 makes changes to correct for email format patch submission drivers/staging/dgnc/dgnc_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index e80d2345..91c9047 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -579,7 +579,6 @@ static void cleanup(bool sysfiles) dgnc_cleanup_tty(dgnc_board[i]); dgnc_cleanup_board(dgnc_board[i]); } - } /* -- 2.1.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] staging: dgnc: dgnc_driver.c Blank line before } @ 2016-11-18 20:18 ` Walt Feasel 0 siblings, 0 replies; 8+ messages in thread From: Walt Feasel @ 2016-11-18 20:18 UTC (permalink / raw) To: lidza.louina; +Cc: devel, Walt Feasel, gregkh, driverdev-devel, linux-kernel Make suggested checkpatch modification for CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> --- v2 makes changes to correct for email format patch submission drivers/staging/dgnc/dgnc_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index e80d2345..91c9047 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -579,7 +579,6 @@ static void cleanup(bool sysfiles) dgnc_cleanup_tty(dgnc_board[i]); dgnc_cleanup_board(dgnc_board[i]); } - } /* -- 2.1.4 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-11-18 20:19 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-11-18 20:18 [PATCH v2 0/3] staging: dgnc: dgnc_driver.c checkpatch modifications Walt Feasel 2016-11-18 20:18 ` Walt Feasel 2016-11-18 20:18 ` [PATCH v2 1/3] staging: dgnc: dgnc_driver.c Comment style modifications Walt Feasel 2016-11-18 20:18 ` Walt Feasel 2016-11-18 20:18 ` [PATCH v2 2/3] staging: dgnc: dgnc_driver.c Remove blank lines Walt Feasel 2016-11-18 20:18 ` Walt Feasel 2016-11-18 20:18 ` [PATCH v2 3/3] staging: dgnc: dgnc_driver.c Blank line before } Walt Feasel 2016-11-18 20:18 ` Walt Feasel
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.