re: staging: et131x: Implement NAPI support
Hello Mark Einon, The patch c2ebf58ba089: "staging: et131x: Implement NAPI support" from Aug 21, 2014, leads to the following static checker warning: drivers/staging/et131x/et131x.c:4004 et131x_isr() warn: we tested 'status' before and it was 'true' drivers/staging/et131x/et131x.c 3853 status &= ~(ET_INTR_TXDMA_ISR | ET_INTR_RXDMA_XFR_DONE); 3854 3855 if (!status) 3856 goto out; 3857 [ snip ] 4003 4004 if (!status) { This is dead code. 4005 /* This interrupt has in some way been "handled" by 4006 * the ISR. Either it was a spurious Rx interrupt, or 4007 * it was a Tx interrupt that has been filtered by 4008 * the ISR. 4009 */ 4010 et131x_enable_interrupts(adapter); 4011 } 4012 4013 out: 4014 return IRQ_RETVAL(handled); 4015 } regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
On Tue, Sep 02, 2014 at 11:46:35PM +0530, Sudip Mukherjee wrote: > From: Sudip Mukherjee I really would prefer if you just figured out your email settings so this isn't needed. The From: header is mostly used for people forwarding patches from other people. We have allowed people to use the From header like this if they can't get their corporate email configured properly but I try to discorage it. If everyone starts using >From headers like this then it becomes a pain to deal with. > > removed unused variables > fixed sparse warning of context imbalance in 'do_locked_client_insert' > different lock contexts for basic block > > Signed-off-by: Sudip Mukherjee > --- > This patch is much better and more interesting, but I still want some more changes. > v1 of the patch of the patch just fixed the sparse warning. > On suggestion of Dan Carpenter v2 is the total rewrite of the function. > Two of the function arguments (interruptHandle,channelId) are also not used. > Wanted to remove them as well , > but then thought maybe the original author have planned for some use of those > variables. In the kernel we don't put code in until we are ready to use it. Don't worry about future changes. But on the other hand, don't remove the parameters in this patch because that is doing too many changes in one patch. It would have to be done in a follow on patch if you decide to do it. > - if (locked) { > - spin_unlock_irqrestore((spinlock_t *) lock, flags); > - locked = 0; > + goto unlock; > + visor_signalqueue_empty(queueinfo->chan, whichqueue); Just remove this function. But mention it in the changelog in case there are side effects. > + /*visor_signal_insert() only return 0 or 1 */ Don't put obvious comments like this. A normal reader will assume that this function is boolean based on how it is used. > + if (visor_signal_insert(queueinfo->chan, whichqueue, pSignal) == 1) { Don't put the == 1. In terms of English, 1 really is intended as "success" and not the number one. Also don't test for == true or == false. if (foo) { if (foo == true) { These two statement *mean* the same thing in terms of English, but the first one is simpler and less wordy. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
From: Sudip Mukherjee removed unused variables fixed sparse warning of context imbalance in 'do_locked_client_insert' different lock contexts for basic block Signed-off-by: Sudip Mukherjee --- v1 of the patch of the patch just fixed the sparse warning. On suggestion of Dan Carpenter v2 is the total rewrite of the function. Two of the function arguments (interruptHandle,channelId) are also not used. Wanted to remove them as well , but then thought maybe the original author have planned for some use of those variables. change from v2 to v3 : i messed up in writing a comment , which greg k-h pointed out. The comment was actually not needed , so that has been removed. drivers/staging/unisys/uislib/uisqueue.c | 38 +++- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/drivers/staging/unisys/uislib/uisqueue.c b/drivers/staging/unisys/uislib/uisqueue.c index f52bca1..91bc855 100644 --- a/drivers/staging/unisys/uislib/uisqueue.c +++ b/drivers/staging/unisys/uislib/uisqueue.c @@ -78,41 +78,19 @@ do_locked_client_insert(struct uisqueue_info *queueinfo, u64 interruptHandle, u8 *channelId) { unsigned long flags; - unsigned char queueWasEmpty; - unsigned int locked = 0; - unsigned int acquired = 0; u8 rc = 0; spin_lock_irqsave(lock, flags); - locked = 1; - if (!ULTRA_CHANNEL_CLIENT_ACQUIRE_OS(queueinfo->chan, channelId, NULL)) - goto Away; - - acquired = 1; - - queueWasEmpty = visor_signalqueue_empty(queueinfo->chan, whichqueue); - if (!visor_signal_insert(queueinfo->chan, whichqueue, pSignal)) - goto Away; - ULTRA_CHANNEL_CLIENT_RELEASE_OS(queueinfo->chan, channelId, NULL); - acquired = 0; - spin_unlock_irqrestore(lock, flags); - locked = 0; - - queueinfo->packets_sent++; - - rc = 1; -Away: - if (acquired) { - ULTRA_CHANNEL_CLIENT_RELEASE_OS(queueinfo->chan, channelId, - NULL); - acquired = 0; + goto unlock; + visor_signalqueue_empty(queueinfo->chan, whichqueue); + if (visor_signal_insert(queueinfo->chan, whichqueue, pSignal) == 1) { + queueinfo->packets_sent++; + rc = 1; } - if (locked) { - spin_unlock_irqrestore((spinlock_t *) lock, flags); - locked = 0; - } - + ULTRA_CHANNEL_CLIENT_RELEASE_OS(queueinfo->chan, channelId, NULL); +unlock: + spin_unlock_irqrestore((spinlock_t *)lock, flags); return rc; } -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
On Wed, Sep 03, 2014 at 11:40:38AM +0300, Dan Carpenter wrote: > On Tue, Sep 02, 2014 at 11:46:35PM +0530, Sudip Mukherjee wrote: > > From: Sudip Mukherjee > > I really would prefer if you just figured out your email settings so > this isn't needed. The From: header is mostly used for people > forwarding patches from other people. We have allowed people to use > the From header like this if they can't get their corporate email > configured properly but I try to discorage it. If everyone starts using > From headers like this then it becomes a pain to deal with. > I will configure the corporate mail. I am the server admin , so there should not be any problem in settings. :) > > > > removed unused variables > > fixed sparse warning of context imbalance in 'do_locked_client_insert' > > different lock contexts for basic block > > > > Signed-off-by: Sudip Mukherjee > > --- > > > > This patch is much better and more interesting, but I still want some > more changes. > I have already sent v3 of the patch just before your mail , based on what greg k-h has suggested about the commnent. Please discard that. > > v1 of the patch of the patch just fixed the sparse warning. > > On suggestion of Dan Carpenter v2 is the total rewrite of the function. > > Two of the function arguments (interruptHandle,channelId) are also not > > used. Wanted to remove them as well , > > but then thought maybe the original author have planned for some use of > > those variables. > > In the kernel we don't put code in until we are ready to use it. Don't > worry about future changes. But on the other hand, don't remove the > parameters in this patch because that is doing too many changes in one > patch. It would have to be done in a follow on patch if you decide to > do it. > > > - if (locked) { > > - spin_unlock_irqrestore((spinlock_t *) lock, flags); > > - locked = 0; > > + goto unlock; > > + visor_signalqueue_empty(queueinfo->chan, whichqueue); > > Just remove this function. But mention it in the changelog in case > there are side effects. > > > + /*visor_signal_insert() only return 0 or 1 */ > > Don't put obvious comments like this. A normal reader will assume that > this function is boolean based on how it is used. > > > + if (visor_signal_insert(queueinfo->chan, whichqueue, pSignal) == 1) { > > Don't put the == 1. In terms of English, 1 really is intended as > "success" and not the number one. Also don't test for == true or > == false. > > if (foo) { > if (foo == true) { > > These two statement *mean* the same thing in terms of English, but the > first one is simpler and less wordy. > > regards, > dan carpenter thanks sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: skel: remove driver
On 2014-09-02 18:01, H Hartley Sweeten wrote: The comedi skeleton driver is one of the few "hybrid" drivers with both legacy and PCI attach mechanisms. Instead of splitting this driver, just remove it. There are many other comedi drivers that provide better examples. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 8 - drivers/staging/comedi/drivers/Makefile | 1 - drivers/staging/comedi/drivers/skel.c | 730 3 files changed, 739 deletions(-) delete mode 100644 drivers/staging/comedi/drivers/skel.c Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
On Wed, Sep 03, 2014 at 02:29:44PM +0530, Sudip Mukherjee wrote: > > This patch is much better and more interesting, but I still want some > > more changes. > > > I have already sent v3 of the patch just before your mail , based on > what greg k-h has suggested about the commnent. Please discard that. Greg has a million emails in his inbox so you need to reply to the patch itself if you want him to discard it. If it's in a different thread he can't keep track. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
1) removed unused variables 2) fixed sparse warning of context imbalance in 'do_locked_client_insert' different lock contexts for basic block 3) removed the call to visor_signalqueue_empty() , this function is checking whether a signal queue is empty, but the return value of the function is not beeing used, so it is safe to remove. Signed-off-by: Sudip Mukherjee --- v1 of the patch of the patch just fixed the sparse warning. On suggestion of Dan Carpenter v2 is the total rewrite of the function. change from v2 to v3 : i messed up in writing a comment , which greg k-h pointed out. The comment was actually not needed , so that has been removed. change from v3 to v4 : call to visor_signalqueue_empty() was removed and in the if condition comparison with 1 was removed. drivers/staging/unisys/uislib/uisqueue.c | 37 ++-- 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/drivers/staging/unisys/uislib/uisqueue.c b/drivers/staging/unisys/uislib/uisqueue.c index f52bca1..83f8761 100644 --- a/drivers/staging/unisys/uislib/uisqueue.c +++ b/drivers/staging/unisys/uislib/uisqueue.c @@ -78,41 +78,18 @@ do_locked_client_insert(struct uisqueue_info *queueinfo, u64 interruptHandle, u8 *channelId) { unsigned long flags; - unsigned char queueWasEmpty; - unsigned int locked = 0; - unsigned int acquired = 0; u8 rc = 0; spin_lock_irqsave(lock, flags); - locked = 1; - if (!ULTRA_CHANNEL_CLIENT_ACQUIRE_OS(queueinfo->chan, channelId, NULL)) - goto Away; - - acquired = 1; - - queueWasEmpty = visor_signalqueue_empty(queueinfo->chan, whichqueue); - if (!visor_signal_insert(queueinfo->chan, whichqueue, pSignal)) - goto Away; - ULTRA_CHANNEL_CLIENT_RELEASE_OS(queueinfo->chan, channelId, NULL); - acquired = 0; - spin_unlock_irqrestore(lock, flags); - locked = 0; - - queueinfo->packets_sent++; - - rc = 1; -Away: - if (acquired) { - ULTRA_CHANNEL_CLIENT_RELEASE_OS(queueinfo->chan, channelId, - NULL); - acquired = 0; + goto unlock; + if (visor_signal_insert(queueinfo->chan, whichqueue, pSignal)) { + queueinfo->packets_sent++; + rc = 1; } - if (locked) { - spin_unlock_irqrestore((spinlock_t *) lock, flags); - locked = 0; - } - + ULTRA_CHANNEL_CLIENT_RELEASE_OS(queueinfo->chan, channelId, NULL); +unlock: + spin_unlock_irqrestore((spinlock_t *)lock, flags); return rc; } -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
On Wed, Sep 03, 2014 at 02:59:21PM +0530, Sudip Mukherjee wrote: > 1) removed unused variables > 2) fixed sparse warning of context imbalance in 'do_locked_client_insert' > different lock contexts for basic block > 3) removed the call to visor_signalqueue_empty() , this function is >checking whether a signal queue is empty, but the return value >of the function is not beeing used, so it is safe to remove. > > Signed-off-by: Sudip Mukherjee Looks good. Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Drivers: hv: util: Properly pack the data for file copy functionality
On 09/03/2014 10:21 AM, K. Y. Srinivasan wrote: > Properly pack the data for file copy functionality. Patch based on > investigation done by Matej Muzila > > Signed-off-by: K. Y. Srinivasan > Reported-by: q...@redhat.com > Cc: > --- > include/uapi/linux/hyperv.h |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h > index 78e4a86..0a8e6ba 100644 > --- a/include/uapi/linux/hyperv.h > +++ b/include/uapi/linux/hyperv.h > @@ -137,7 +137,7 @@ struct hv_do_fcopy { > __u64 offset; > __u32 size; > __u8data[DATA_FRAGMENT]; > -}; > +} __attribute__((packed)); > > /* > * An implementation of HyperV key value pair (KVP) functionality for Linux. Acked-by: Jason Wang ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
hi, please do not consider this patch. v4 has been sent with some changes as suggested by Dan Carpenter. thanks sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: goldfish: avoid multiple assignments
Coding style: avoid multiple assignments Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index f177911..17cd439 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -328,9 +328,10 @@ static int goldfish_nand_init_device(struct platform_device *pdev, mtd->priv = nand; - mtd->name = name = devm_kzalloc(&pdev->dev, name_len + 1, GFP_KERNEL); + name = devm_kzalloc(&pdev->dev, name_len + 1, GFP_KERNEL); if (name == NULL) return -ENOMEM; + mtd->name = name; result = goldfish_nand_cmd(mtd, NAND_CMD_GET_DEV_NAME, 0, name_len, name); -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: goldfish: fix alignment to match open parenthesis
Coding style: fix alignment to match open parenthesis Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 21 +- drivers/staging/goldfish/goldfish_nand.c | 36 +++ 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index ab723ab..c858876 100644 --- a/drivers/staging/goldfish/goldfish_audio.c +++ b/drivers/staging/goldfish/goldfish_audio.c @@ -111,7 +111,7 @@ enum { static atomic_t open_count = ATOMIC_INIT(0); static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, - size_t count, loff_t *pos) + size_t count, loff_t *pos) { struct goldfish_audio *data = fp->private_data; int length; @@ -124,11 +124,10 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, length = (count > READ_BUFFER_SIZE ? READ_BUFFER_SIZE : count); AUDIO_WRITE(data, AUDIO_START_READ, length); - wait_event_interruptible(data->wait, - (data->buffer_status & AUDIO_INT_READ_BUFFER_FULL)); + wait_event_interruptible(data->wait, (data->buffer_status & +AUDIO_INT_READ_BUFFER_FULL)); - length = AUDIO_READ(data, - AUDIO_READ_BUFFER_AVAILABLE); + length = AUDIO_READ(data, AUDIO_READ_BUFFER_AVAILABLE); /* copy data to user space */ if (copy_to_user(buf, data->read_buffer, length)) @@ -142,7 +141,7 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, } static ssize_t goldfish_audio_write(struct file *fp, const char __user *buf, -size_t count, loff_t *pos) + size_t count, loff_t *pos) { struct goldfish_audio *data = fp->private_data; unsigned long irq_flags; @@ -216,7 +215,7 @@ static int goldfish_audio_release(struct inode *ip, struct file *fp) } static long goldfish_audio_ioctl(struct file *fp, unsigned int cmd, - unsigned long arg) +unsigned long arg) { /* temporary workaround, until we switch to the ALSA API */ if (cmd == 315) @@ -305,7 +304,7 @@ static int goldfish_audio_probe(struct platform_device *pdev) data->read_buffer = data->buffer_virt + 2 * WRITE_BUFFER_SIZE; ret = devm_request_irq(&pdev->dev, data->irq, goldfish_audio_interrupt, - IRQF_SHARED, pdev->name, data); + IRQF_SHARED, pdev->name, data); if (ret) { dev_err(&pdev->dev, "request_irq failed\n"); return ret; @@ -320,18 +319,18 @@ static int goldfish_audio_probe(struct platform_device *pdev) } AUDIO_WRITE64(data, AUDIO_SET_WRITE_BUFFER_1, - AUDIO_SET_WRITE_BUFFER_1_HIGH, buf_addr); + AUDIO_SET_WRITE_BUFFER_1_HIGH, buf_addr); buf_addr += WRITE_BUFFER_SIZE; AUDIO_WRITE64(data, AUDIO_SET_WRITE_BUFFER_2, - AUDIO_SET_WRITE_BUFFER_2_HIGH, buf_addr); + AUDIO_SET_WRITE_BUFFER_2_HIGH, buf_addr); buf_addr += WRITE_BUFFER_SIZE; data->read_supported = AUDIO_READ(data, AUDIO_READ_SUPPORTED); if (data->read_supported) AUDIO_WRITE64(data, AUDIO_SET_READ_BUFFER, - AUDIO_SET_READ_BUFFER_HIGH, buf_addr); + AUDIO_SET_READ_BUFFER_HIGH, buf_addr); audio_data = data; return 0; diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index aac8e20..3f13ef0 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -39,8 +39,8 @@ struct goldfish_nand { }; static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd, - enum nand_cmd cmd, u64 addr, u32 len, - void *ptr, u32 *rv) +enum nand_cmd cmd, u64 addr, u32 len, +void *ptr, u32 *rv) { u32 cmdp; struct goldfish_nand *nand = mtd->priv; @@ -74,7 +74,7 @@ static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd, } static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd, - u64 addr, u32 len, void *ptr) +u64 addr, u32 len, void *ptr) { struct goldfish_nand *nand = mtd->priv; u32 rv; @@ -113,7 +113,7 @@ static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr) if (goldfi
[PATCH 2/6] staging: goldfish: remove useless space after a cast
Coding style: remove useless space after a cast Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 092604c..aac8e20 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -340,7 +340,7 @@ static int goldfish_nand_init_device(struct platform_device *pdev, result, name_len); return -ENODEV; } - ((char *) mtd->name)[name_len] = '\0'; + ((char *)mtd->name)[name_len] = '\0'; /* Setup the MTD structure */ mtd->type = MTD_NANDFLASH; -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging: goldfish: suppress consecutive blank lines
Coding style: suppress consecutive blank lines Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index c89d0b8..23a206d 100644 --- a/drivers/staging/goldfish/goldfish_audio.c +++ b/drivers/staging/goldfish/goldfish_audio.c @@ -108,10 +108,8 @@ enum { AUDIO_INT_READ_BUFFER_FULL, }; - static atomic_t open_count = ATOMIC_INIT(0); - static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, size_t count, loff_t *pos) { -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/6] staging: goldfish: document mutex usage
Coding style: document mutex usage Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 3f13ef0..f177911 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -31,7 +31,7 @@ #include "goldfish_nand_reg.h" struct goldfish_nand { - struct mutexlock; + struct mutexlock; /* Serialize device operations */ unsigned char __iomem *base; struct cmd_params *cmd_params; size_t mtd_count; -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/6] staging: goldfish: document spinlock usage
Coding style: document spinlock usage Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index 23a206d..ab723ab 100644 --- a/drivers/staging/goldfish/goldfish_audio.c +++ b/drivers/staging/goldfish/goldfish_audio.c @@ -36,7 +36,7 @@ MODULE_VERSION("1.0"); struct goldfish_audio { char __iomem *reg_base; int irq; - spinlock_t lock; + spinlock_t lock;/* Serialize access to device */ wait_queue_head_t wait; char __iomem *buffer_virt; /* combined buffer virtual address */ -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] staging: goldfish: fix coding style warnings
Hi, This patchset (for next-20140902) fixes several coding style warnings found by checkpatch.pl: -CHECK: Please don't use multiple blank lines -CHECK: No space is necessary after a cast -CHECK: spinlock_t definition without comment -CHECK: Alignment should match open parenthesis -CHECK: struct mutex definition without comment Loic Pefferkorn (6): staging: goldfish: suppress consecutive blank lines staging: goldfish: remove useless space after a cast staging: goldfish: document spinlock usage staging: goldfish: fix alignment to match open parenthesis staging: goldfish: document mutex usage staging: goldfish: avoid multiple assignments drivers/staging/goldfish/goldfish_audio.c | 25 -- drivers/staging/goldfish/goldfish_nand.c | 43 --- 2 files changed, 33 insertions(+), 35 deletions(-) -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8723au: type casting corrections
Greg KH writes: > On Sun, Aug 17, 2014 at 10:19:28AM -0300, Raphael Silva wrote: >> Type casting corrections in order to solve warnings of the sparce static >> analyser. >> >> Signed-off-by: Raphael Silva >> --- >> drivers/staging/rtl8723au/hal/usb_halinit.c | 4 ++-- >> drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 2 +- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c >> b/drivers/staging/rtl8723au/hal/usb_halinit.c >> index b49bf33..969e4f3 100644 >> --- a/drivers/staging/rtl8723au/hal/usb_halinit.c >> +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c >> @@ -1228,9 +1228,9 @@ static void Hal_EfuseParsePIDVID_8723AU(struct >> rtw_adapter *pAdapter, >> } else { >> /* VID, PID */ >> pHalData->EEPROMVID = >> -le16_to_cpu(*(u16 *)&hwinfo[EEPROM_VID_8723AU]); >> +le16_to_cpu(*(__le16 *)&hwinfo[EEPROM_VID_8723AU]); > > Shouldn't the structure bt of type __le16 so that there is no warning > here? We can't really make it an array of __le16 as it's the content of the EEPROM and it contains various different elements. To get it right, it would require defining it as a struct and declaring the various elements correctly within the struct. However we could get rid of this portion completely since pHalData->EEPROM[PV]ID aren't used for anything in the code, besides printing the values in debug mode. Cheers, Jes ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8723au: Remove write-only variables hal_data_8723a.EEPROM[VP]ID
From: Jes Sorensen Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/hal/usb_halinit.c | 22 -- drivers/staging/rtl8723au/include/rtl8723a_hal.h | 4 2 files changed, 26 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index b49bf33..26be40d 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -1217,26 +1217,6 @@ static void _ReadLEDSetting(struct rtw_adapter *Adapter, u8 *PROMContent, pledpriv->LedStrategy = HW_LED; } -static void Hal_EfuseParsePIDVID_8723AU(struct rtw_adapter *pAdapter, - u8 *hwinfo, bool AutoLoadFail) -{ - struct hal_data_8723a *pHalData = GET_HAL_DATA(pAdapter); - - if (AutoLoadFail) { - pHalData->EEPROMVID = 0; - pHalData->EEPROMPID = 0; - } else { - /* VID, PID */ - pHalData->EEPROMVID = - le16_to_cpu(*(u16 *)&hwinfo[EEPROM_VID_8723AU]); - pHalData->EEPROMPID = - le16_to_cpu(*(u16 *)&hwinfo[EEPROM_PID_8723AU]); - } - - MSG_8723A("EEPROM VID = 0x%4x\n", pHalData->EEPROMVID); - MSG_8723A("EEPROM PID = 0x%4x\n", pHalData->EEPROMPID); -} - static void Hal_EfuseParseMACAddr_8723AU(struct rtw_adapter *padapter, u8 *hwinfo, bool AutoLoadFail) { @@ -1269,8 +1249,6 @@ static void readAdapterInfo(struct rtw_adapter *padapter) Hal_InitPGData(padapter, hwinfo); Hal_EfuseParseIDCode(padapter, hwinfo); - Hal_EfuseParsePIDVID_8723AU(padapter, hwinfo, - pEEPROM->bautoload_fail_flag); Hal_EfuseParseEEPROMVer(padapter, hwinfo, pEEPROM->bautoload_fail_flag); Hal_EfuseParseMACAddr_8723AU(padapter, hwinfo, diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h index 3b0b06d..ee203a5 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h @@ -280,10 +280,6 @@ struct hal_data_8723a { /* EEPROM setting. */ /* */ u8 EEPROMVersion; - u16 EEPROMVID; - u16 EEPROMPID; - u16 EEPROMSVID; - u16 EEPROMSDID; u8 EEPROMCustomerID; u8 EEPROMSubCustomerID; u8 EEPROMRegulatory; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/6] staging: goldfish: document spinlock usage
On Wed, 3 Sep 2014 13:13:44 +0200 Loic Pefferkorn wrote: > Coding style: document spinlock usage > > Signed-off-by: Loic Pefferkorn > --- > drivers/staging/goldfish/goldfish_audio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/goldfish/goldfish_audio.c > b/drivers/staging/goldfish/goldfish_audio.c > index 23a206d..ab723ab 100644 > --- a/drivers/staging/goldfish/goldfish_audio.c > +++ b/drivers/staging/goldfish/goldfish_audio.c > @@ -36,7 +36,7 @@ MODULE_VERSION("1.0"); > struct goldfish_audio { > char __iomem *reg_base; > int irq; > - spinlock_t lock; > + spinlock_t lock;/* Serialize access to device */ This tells the reader nothing. It's good to document locking models but - you lock data not code (which is a detail a lot of programmers get wrong in th design stage too) - you need to document what objects are protected by the lock So it should tell the reader what the lock must be held to do If you look at the audio code it actually protects the status field and status register of the "hardware" ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/37] staging: comedi: das1800: use CMDF_PRIORITY
Replace use of `TRIG_RT` command flag with the equivalent flag `CMDF_PRIORITY`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das1800.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index 0cfca339..f9e4f72 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c @@ -1088,9 +1088,9 @@ static int das1800_ai_do_cmd(struct comedi_device *dev, struct comedi_async *async = s->async; const struct comedi_cmd *cmd = &async->cmd; - /* disable dma on TRIG_WAKE_EOS, or TRIG_RT + /* disable dma on TRIG_WAKE_EOS, or CMDF_PRIORITY * (because dma in handler is unsafe at hard real-time priority) */ - if (cmd->flags & (TRIG_WAKE_EOS | TRIG_RT)) + if (cmd->flags & (TRIG_WAKE_EOS | CMDF_PRIORITY)) devpriv->irq_dma_bits &= ~DMA_ENABLED; else devpriv->irq_dma_bits |= devpriv->dma_bits; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/37] staging: comedi: ni_labpc_common: use CMDF_PRIORITY
Replace use of `TRIG_RT` command flag with the equivalent flag `CMDF_PRIORITY`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_labpc_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc_common.c b/drivers/staging/comedi/drivers/ni_labpc_common.c index 9e76a36..5238a98 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_common.c +++ b/drivers/staging/comedi/drivers/ni_labpc_common.c @@ -690,7 +690,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) if (labpc_have_dma_chan(dev) && /* dma unsafe at RT priority, * and too much setup time for TRIG_WAKE_EOS */ - (cmd->flags & (TRIG_WAKE_EOS | TRIG_RT)) == 0) + (cmd->flags & (TRIG_WAKE_EOS | CMDF_PRIORITY)) == 0) xfer = isa_dma_transfer; else if (/* pc-plus has no fifo-half full interrupt */ board->is_labpc1200 && -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/37] staging: comedi: rename command flags for consistency
The various macros in "comedi.h" used to construct values for the `flags` member of `struct comedi_cmd` are named inconsistently. Some of the macros with the `TRIG_` prefix are from a long defunct Comedi trigger interface that was replaced with the current Comedi asynchronous command interface many years ago, co-opting most of the `TRIG_` macros in the process. Some of them are still used with various other members of `struct comedi_cmd` to select trigger sources. Others are used with the `flags` member. There are other macros for use with the command `flags` member using the prefix `CMDF_`, and some of the old `TRIG_` macros have been renamed already, keeping the old names around as synonyms for backwards compatibility. For consistency, rename the `TRIG_` prefixed macros used with the command `flags` member to use the prefix `CMDF_` and redefine the renamed macros as synonyms for backwards compatibilty. There are still some left-over `TRIG_` macros unused by the Comedi kernel code, but the user-space Comedilib library may still be trying to use them, so hang onto them for now. 01) staging: comedi: comedi_test: use CMDF_PRIORITY 02) staging: comedi: das16: use CMDF_PRIORITY 03) staging: comedi: das1800: use CMDF_PRIORITY 04) staging: comedi: ni_at_a2150: use CMDF_PRIORITY 05) staging: comedi: ni_labpc_common: use CMDF_PRIORITY 06) staging: comedi: add CMDF_WAKE_EOS as synonym for TRIG_WAKE_EOS 07) staging: comedi: use CMDF_WAKE_EOS in do_cmd_ioctl() 08) staging: comedi: addi_apci_3120: use CMDF_WAKE_EOS 09) staging: comedi: adl_pci9118: use CMDF_WAKE_EOS 10) staging: comedi: adv_pci1710: use CMDF_WAKE_EOS 11) staging: comedi: amplc_pci230: use CMDF_WAKE_EOS 12) staging: comedi: cb_pcidas: use CMDF_WAKE_EOS 13) staging: comedi: cb_pcidas64: use CMDF_WAKE_EOS 14) staging: comedi: das1800: use CMDF_WAKE_EOS 15) staging: comedi: ni_labpc_common: use CMDF_WAKE_EOS 16) staging: comedi: ni_mio_common: use CMDF_WAKE_EOS 17) staging: comedi: ni_tiocmd: use CMDF_WAKE_EOS 18) staging: comedi: pcl812: use CMDF_WAKE_EOS 19) staging: comedi: rtd520: use CMDF_WAKE_EOS 20) staging: comedi: add CMDF_BOGUS as synonym for TRIG_BOGUS 21) staging: comedi: use CMDF_BOGUS in do_cmd_ioctl() 22) staging: comedi: add CMDF_ROUND_... as synonyms for TRIG_ROUND_... 23) staging: comedi: 8253.h: use CMDF_ROUND_... 24) staging: comedi: addi_apci_3xxx: use CMDF_ROUND_... 25) staging: comedi: adl_pci9118: use CMDF_ROUND_... 26) staging: comedi: amplc_pci230: use CMDF_ROUND_... 27) staging: comedi: cb_pcidas64: use CMDF_ROUND_... 28) staging: comedi: das1800: use CMDF_ROUND_... 29) staging: comedi: dt282x: use CMDF_ROUND_... 30) staging: comedi: dt3000: use CMDF_ROUND_... 31) staging: comedi: me4000: use CMDF_ROUND_... 32) staging: comedi: ni_at_a2150: use CMDF_ROUND_... 33) staging: comedi: ni_labpc_common: use CMDF_ROUND_... 34) staging: comedi: ni_mio_common: use CMDF_ROUND_... 35) staging: comedi: ni_pcidio: use CMDF_ROUND_... 36) staging: comedi: rtd520: use CMDF_ROUND_... 37) staging: comedi: s626: use CMDF_ROUND_... drivers/staging/comedi/comedi.h| 32 +++-- drivers/staging/comedi/comedi_fops.c | 4 +-- drivers/staging/comedi/drivers/8253.h | 8 ++--- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 4 +-- drivers/staging/comedi/drivers/addi_apci_3xxx.c| 8 ++--- drivers/staging/comedi/drivers/adl_pci9118.c | 26 +++--- drivers/staging/comedi/drivers/adv_pci1710.c | 4 +-- drivers/staging/comedi/drivers/amplc_pci230.c | 14 drivers/staging/comedi/drivers/cb_pcidas.c | 2 +- drivers/staging/comedi/drivers/cb_pcidas64.c | 18 +- drivers/staging/comedi/drivers/comedi_test.c | 2 +- drivers/staging/comedi/drivers/das16.c | 4 +-- drivers/staging/comedi/drivers/das1800.c | 16 - drivers/staging/comedi/drivers/dt282x.c| 8 ++--- drivers/staging/comedi/drivers/dt3000.c| 8 ++--- drivers/staging/comedi/drivers/me4000.c| 14 drivers/staging/comedi/drivers/ni_at_a2150.c | 12 +++ drivers/staging/comedi/drivers/ni_labpc_common.c | 14 drivers/staging/comedi/drivers/ni_mio_common.c | 40 +++--- drivers/staging/comedi/drivers/ni_pcidio.c | 10 +++--- drivers/staging/comedi/drivers/ni_tiocmd.c | 2 +- drivers/staging/comedi/drivers/pcl812.c| 2 +- drivers/staging/comedi/drivers/rtd520.c| 30 drivers/staging/comedi/drivers/s626.c | 8 ++--- 24 files changed, 150 insertions(+), 140 deletions(-) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/37] staging: comedi: ni_at_a2150: use CMDF_PRIORITY
Replace use of `TRIG_RT` command flag with the equivalent flag `CMDF_PRIORITY`. The numeric value is unchanged. Also replace "TRIG_RT" with "CMDF_PRIORITY" in the kernel messages. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_at_a2150.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index de67161..fca22c5 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -511,9 +511,9 @@ static int a2150_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) unsigned int old_config_bits = devpriv->config_bits; unsigned int trigger_bits; - if (cmd->flags & TRIG_RT) { + if (cmd->flags & CMDF_PRIORITY) { dev_err(dev->class_dev, - "dma incompatible with hard real-time interrupt (TRIG_RT), aborting\n"); + "dma incompatible with hard real-time interrupt (CMDF_PRIORITY), aborting\n"); return -1; } /* clear fifo and reset triggering circuitry */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/37] staging: comedi: comedi_test: use CMDF_PRIORITY
Replace use of `TRIG_RT` command flag with the equivalent flag `CMDF_PRIORITY`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/comedi_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index 7aa23db..00c03df 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -302,7 +302,7 @@ static int waveform_ai_cmd(struct comedi_device *dev, struct waveform_private *devpriv = dev->private; struct comedi_cmd *cmd = &s->async->cmd; - if (cmd->flags & TRIG_RT) { + if (cmd->flags & CMDF_PRIORITY) { dev_err(dev->class_dev, "commands at RT priority not supported in this driver\n"); return -1; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/37] staging: comedi: addi_apci_3120: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 77cee87..87dff80 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -1114,7 +1114,7 @@ static int apci3120_cyclic_ai(int mode, dmalen0; } - if (cmd->flags & TRIG_WAKE_EOS) { + if (cmd->flags & CMDF_WAKE_EOS) { /* don't we want wake up every scan? */ if (dmalen0 > scan_bytes) { dmalen0 = scan_bytes; @@ -1433,7 +1433,7 @@ static void apci3120_interrupt_dma(int irq, void *d) devpriv->ul_DmaBufferVirtual[devpriv-> ui_DmaActualBuffer], samplesinbuf); - if (!(cmd->flags & TRIG_WAKE_EOS)) { + if (!(cmd->flags & CMDF_WAKE_EOS)) { s->async->events |= COMEDI_CB_EOS; comedi_event(dev, s); } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/37] staging: comedi: das16: use CMDF_PRIORITY
Replace use of `TRIG_RT` command flag with the equivalent flag `CMDF_PRIORITY`. The numeric value is unchanged. Also replace "TRIG_RT" with "CMDF_PRIORITY" in kernel log messages. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das16.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index a7b4981..aa52a5b 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -756,9 +756,9 @@ static int das16_cmd_exec(struct comedi_device *dev, struct comedi_subdevice *s) unsigned long flags; int range; - if (cmd->flags & TRIG_RT) { + if (cmd->flags & CMDF_PRIORITY) { dev_err(dev->class_dev, -"isa dma transfers cannot be performed with TRIG_RT, aborting\n"); +"isa dma transfers cannot be performed with CMDF_PRIORITY, aborting\n"); return -1; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/37] staging: comedi: use CMDF_WAKE_EOS in do_cmd_ioctl()
`TRIG_WAKE_EOS` is now just a synonym for `CMDF_WAKE_EOS`. Change `do_cmd_ioctl()` to use the new name. Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 2182c74..9d60a39 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -1558,7 +1558,7 @@ static int do_cmd_ioctl(struct comedi_device *dev, async->cb_mask = COMEDI_CB_EOA | COMEDI_CB_BLOCK | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW; - if (async->cmd.flags & TRIG_WAKE_EOS) + if (async->cmd.flags & CMDF_WAKE_EOS) async->cb_mask |= COMEDI_CB_EOS; comedi_set_subdevice_runflags(s, SRF_ERROR | SRF_RUNNING, SRF_RUNNING); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/37] staging: comedi: adv_pci1710: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/adv_pci1710.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 3e37b0b..b368962 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -907,7 +907,7 @@ static irqreturn_t interrupt_service_pci1710(int irq, void *d) return IRQ_HANDLED; } - if (cmd->flags & TRIG_WAKE_EOS) + if (cmd->flags & CMDF_WAKE_EOS) pci1710_handle_every_sample(dev, s); else pci1710_handle_fifo(dev, s); @@ -932,7 +932,7 @@ static int pci171x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) s->async->cur_chan = 0; devpriv->CntrlReg &= Control_CNT0; - if ((cmd->flags & TRIG_WAKE_EOS) == 0) + if ((cmd->flags & CMDF_WAKE_EOS) == 0) devpriv->CntrlReg |= Control_ONEFH; devpriv->divisor1 = devpriv->next_divisor1; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/37] staging: comedi: use CMDF_BOGUS in do_cmd_ioctl()
`TRIG_BOGUS` is now just a synonym for `CMDF_BOGUS`. Change `do_cmd_ioctl()` to use the new name. Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 9d60a39..495969f 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -1532,7 +1532,7 @@ static int do_cmd_ioctl(struct comedi_device *dev, ret = s->do_cmdtest(dev, s, &async->cmd); - if (async->cmd.flags & TRIG_BOGUS || ret) { + if (async->cmd.flags & CMDF_BOGUS || ret) { dev_dbg(dev->class_dev, "test returned %d\n", ret); cmd = async->cmd; /* restore chanlist pointer before copying back */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/37] staging: comedi: add CMDF_BOGUS as synonym for TRIG_BOGUS
`TRIG_BOGUS` is one of the values that can be OR-ed into the `flags` member of `struct comedi_cmd`. It causes the comedi core to go through some of the motions of setting up an asynchronous command without actually setting it up. If all goes well, it causes the command set-up to fail with an `EAGAIN` error. The name `TRIG_BOGUS` is a bit of a left-over from earlier times. A better name would be `CMDF_BOGUS` to match various other command flags. Define `CMDF_BOGUS` with the same numeric value as the old `TRIG_BOGUS` and redefine `TRIG_BOGUS` as a synonym of it. Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index dfaa935..3d2801d 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -123,7 +123,6 @@ /* trigger flags */ /* These flags are used in comedi_trig structures */ -#define TRIG_BOGUS 0x0001 /* do the motions */ #define TRIG_DITHER0x0002 /* enable dithering */ #define TRIG_DEGLITCH 0x0004 /* enable deglitching */ #define TRIG_CONFIG0x0010 /* perform configuration, not triggering */ @@ -131,6 +130,8 @@ /* command flags */ /* These flags are used in comedi_cmd structures */ +#define CMDF_BOGUS 0x0001 /* do the motions */ + /* try to use a real-time interrupt while performing command */ #define CMDF_PRIORITY 0x0008 @@ -154,6 +155,7 @@ #define TRIG_ROUND_UP_NEXT 0x0003 /* compatibility definitions */ +#define TRIG_BOGUS CMDF_BOGUS #define TRIG_RTCMDF_PRIORITY #define TRIG_WAKE_EOS CMDF_WAKE_EOS #define TRIG_WRITE CMDF_WRITE -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/37] staging: comedi: adl_pci9118: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/adl_pci9118.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 3e16b5f..b71b0cf 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -761,7 +761,7 @@ static void pci9118_calc_divisors(char mode, struct comedi_device *dev, *tim2 = this_board->ai_ns_min; i8253_cascade_ns_to_timer(I8254_OSC_BASE_4MHZ, div1, div2, - tim2, flags & TRIG_ROUND_NEAREST); + tim2, flags & CMDF_ROUND_NEAREST); break; case 2: if (*tim2 < this_board->ai_ns_min) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/37] staging: comedi: ni_labpc_common: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is the same. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_labpc_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc_common.c b/drivers/staging/comedi/drivers/ni_labpc_common.c index 5238a98..1881510 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_common.c +++ b/drivers/staging/comedi/drivers/ni_labpc_common.c @@ -689,13 +689,13 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* figure out what method we will use to transfer data */ if (labpc_have_dma_chan(dev) && /* dma unsafe at RT priority, -* and too much setup time for TRIG_WAKE_EOS */ - (cmd->flags & (TRIG_WAKE_EOS | CMDF_PRIORITY)) == 0) +* and too much setup time for CMDF_WAKE_EOS */ + (cmd->flags & (CMDF_WAKE_EOS | CMDF_PRIORITY)) == 0) xfer = isa_dma_transfer; else if (/* pc-plus has no fifo-half full interrupt */ board->is_labpc1200 && /* wake-end-of-scan should interrupt on fifo not empty */ -(cmd->flags & TRIG_WAKE_EOS) == 0 && +(cmd->flags & CMDF_WAKE_EOS) == 0 && /* make sure we are taking more than just a few points */ (cmd->stop_src != TRIG_COUNT || devpriv->count > 256)) xfer = fifo_half_full_transfer; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/37] staging: comedi: ni_mio_common: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is the same. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 237e3f8..584de17 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -2610,7 +2610,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) interrupt_a_enable |= AI_FIFO_Interrupt_Enable; #endif - if (cmd->flags & TRIG_WAKE_EOS + if (cmd->flags & CMDF_WAKE_EOS || (devpriv->ai_cmd2 & AI_End_On_End_Of_Scan)) { /* wake on end-of-scan */ devpriv->aimode = AIMODE_SCAN; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/37] staging: comedi: cb_pcidas: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/cb_pcidas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c index a0bb4c8..f5dd7dd 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas.c +++ b/drivers/staging/comedi/drivers/cb_pcidas.c @@ -981,7 +981,7 @@ static int cb_pcidas_ai_cmd(struct comedi_device *dev, spin_lock_irqsave(&dev->spinlock, flags); devpriv->adc_fifo_bits |= INTE; devpriv->adc_fifo_bits &= ~INT_MASK; - if (cmd->flags & TRIG_WAKE_EOS) { + if (cmd->flags & CMDF_WAKE_EOS) { if (cmd->convert_src == TRIG_NOW && cmd->chanlist_len > 1) { /* interrupt end of burst */ devpriv->adc_fifo_bits |= INT_EOS; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/37] staging: comedi: das1800: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das1800.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index f9e4f72..951292d 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c @@ -1088,14 +1088,14 @@ static int das1800_ai_do_cmd(struct comedi_device *dev, struct comedi_async *async = s->async; const struct comedi_cmd *cmd = &async->cmd; - /* disable dma on TRIG_WAKE_EOS, or CMDF_PRIORITY + /* disable dma on CMDF_WAKE_EOS, or CMDF_PRIORITY * (because dma in handler is unsafe at hard real-time priority) */ - if (cmd->flags & (TRIG_WAKE_EOS | CMDF_PRIORITY)) + if (cmd->flags & (CMDF_WAKE_EOS | CMDF_PRIORITY)) devpriv->irq_dma_bits &= ~DMA_ENABLED; else devpriv->irq_dma_bits |= devpriv->dma_bits; - /* interrupt on end of conversion for TRIG_WAKE_EOS */ - if (cmd->flags & TRIG_WAKE_EOS) { + /* interrupt on end of conversion for CMDF_WAKE_EOS */ + if (cmd->flags & CMDF_WAKE_EOS) { /* interrupt fifo not empty */ devpriv->irq_dma_bits &= ~FIMD; } else { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/37] staging: comedi: pcl812: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/pcl812.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index 55620c9..61549e3 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c @@ -812,7 +812,7 @@ static int pcl812_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) s->async->cur_chan = 0; /* don't we want wake up every scan? */ - if (cmd->flags & TRIG_WAKE_EOS) { + if (cmd->flags & CMDF_WAKE_EOS) { devpriv->ai_eos = 1; /* DMA is useless for this situation */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/37] staging: comedi: addi_apci_3xxx: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/addi_apci_3xxx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index 57e6f88..f26e4ec 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -496,15 +496,15 @@ static int apci3xxx_ai_ns_to_timer(struct comedi_device *dev, break; } - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: timer = (*ns + base / 2) / base; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: timer = *ns / base; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: timer = (*ns + base - 1) / base; break; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/37] staging: comedi: adl_pci9118: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Also change diagnostic messages to use "CMDF_WAKE_EOS" instead of "TRIG_WAKE_EOS" and change the Comedi driver description comment to use "CMDF_WAKE_EOS". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/adl_pci9118.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 6fc50b3..3e16b5f 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -36,8 +36,8 @@ * b) DMA transfers must have the length aligned to two samples (32 bit), * so there is some problems if cmd->chanlist_len is odd. This driver tries * bypass this with adding one sample to the end of the every scan and discard - * it on output but this cann't be used if cmd->scan_begin_src=TRIG_FOLLOW - * and is used flag TRIG_WAKE_EOS, then driver switch to interrupt driven mode + * it on output but this can't be used if cmd->scan_begin_src=TRIG_FOLLOW + * and is used flag CMDF_WAKE_EOS, then driver switch to interrupt driven mode * with interrupt after every sample. * c) If isn't used DMA then you can use only mode where * cmd->scan_begin_src=TRIG_FOLLOW. @@ -1294,12 +1294,12 @@ static int Compute_and_setup_dma(struct comedi_device *dev, } /* we want wake up every scan? */ - if (devpriv->ai_flags & TRIG_WAKE_EOS) { + if (devpriv->ai_flags & CMDF_WAKE_EOS) { if (dmalen0 < (devpriv->ai_n_realscanlen << 1)) { /* uff, too short DMA buffer, disable EOS support! */ - devpriv->ai_flags &= (~TRIG_WAKE_EOS); + devpriv->ai_flags &= (~CMDF_WAKE_EOS); dev_info(dev->class_dev, -"WAR: DMA0 buf too short, can't support TRIG_WAKE_EOS (%d<%d)\n", +"WAR: DMA0 buf too short, can't support CMDF_WAKE_EOS (%d<%d)\n", dmalen0, devpriv->ai_n_realscanlen << 1); } else { /* short first DMA buffer to one scan */ @@ -1312,12 +1312,12 @@ static int Compute_and_setup_dma(struct comedi_device *dev, } } } - if (devpriv->ai_flags & TRIG_WAKE_EOS) { + if (devpriv->ai_flags & CMDF_WAKE_EOS) { if (dmalen1 < (devpriv->ai_n_realscanlen << 1)) { /* uff, too short DMA buffer, disable EOS support! */ - devpriv->ai_flags &= (~TRIG_WAKE_EOS); + devpriv->ai_flags &= (~CMDF_WAKE_EOS); dev_info(dev->class_dev, -"WAR: DMA1 buf too short, can't support TRIG_WAKE_EOS (%d<%d)\n", +"WAR: DMA1 buf too short, can't support CMDF_WAKE_EOS (%d<%d)\n", dmalen1, devpriv->ai_n_realscanlen << 1); } else { /* short second DMA buffer to one scan */ @@ -1331,8 +1331,8 @@ static int Compute_and_setup_dma(struct comedi_device *dev, } } - /* transfer without TRIG_WAKE_EOS */ - if (!(devpriv->ai_flags & TRIG_WAKE_EOS)) { + /* transfer without CMDF_WAKE_EOS */ + if (!(devpriv->ai_flags & CMDF_WAKE_EOS)) { /* if it's possible then align DMA buffers to length of scan */ i = dmalen0; dmalen0 = @@ -1570,7 +1570,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->ai_add_back = 0; if (devpriv->master) { devpriv->usedma = 1; - if ((cmd->flags & TRIG_WAKE_EOS) && + if ((cmd->flags & CMDF_WAKE_EOS) && (cmd->scan_end_arg == 1)) { if (cmd->convert_src == TRIG_NOW) devpriv->ai_add_back = 1; @@ -1582,7 +1582,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) */ } } - if ((cmd->flags & TRIG_WAKE_EOS) && + if ((cmd->flags & CMDF_WAKE_EOS) && (cmd->scan_end_arg & 1) && (cmd->scan_end_arg > 1)) { if (cmd->scan_begin_src == TRIG_FOLLOW) { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/37] staging: comedi: cb_pcidas64: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/cb_pcidas64.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 34771c3..f1b2744 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1243,8 +1243,8 @@ static void enable_ai_interrupts(struct comedi_device *dev, bits = EN_ADC_OVERRUN_BIT | EN_ADC_DONE_INTR_BIT | EN_ADC_ACTIVE_INTR_BIT | EN_ADC_STOP_INTR_BIT; /* Use pio transfer and interrupt on end of conversion -* if TRIG_WAKE_EOS flag is set. */ - if (cmd->flags & TRIG_WAKE_EOS) { +* if CMDF_WAKE_EOS flag is set. */ + if (cmd->flags & CMDF_WAKE_EOS) { /* 4020 doesn't support pio transfers except for fifo dregs */ if (thisboard->layout != LAYOUT_4020) bits |= ADC_INTR_EOSCAN_BITS | EN_ADC_INTR_SRC_BIT; @@ -2579,7 +2579,7 @@ static int ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* clear adc buffer */ writew(0, devpriv->main_iobase + ADC_BUFFER_CLEAR_REG); - if ((cmd->flags & TRIG_WAKE_EOS) == 0 || + if ((cmd->flags & CMDF_WAKE_EOS) == 0 || thisboard->layout == LAYOUT_4020) { devpriv->ai_dma_index = 0; @@ -2613,7 +2613,7 @@ static int ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* enable pacing, triggering, etc */ bits = ADC_ENABLE_BIT | ADC_SOFT_GATE_BITS | ADC_GATE_LEVEL_BIT; - if (cmd->flags & TRIG_WAKE_EOS) + if (cmd->flags & CMDF_WAKE_EOS) bits |= ADC_DMA_DISABLE_BIT; /* set start trigger */ if (cmd->start_src == TRIG_EXT) { @@ -2820,7 +2820,7 @@ static void handle_ai_interrupt(struct comedi_device *dev, /* drain fifo with pio */ if ((status & ADC_DONE_BIT) || - ((cmd->flags & TRIG_WAKE_EOS) && + ((cmd->flags & CMDF_WAKE_EOS) && (status & ADC_INTR_PENDING_BIT) && (thisboard->layout != LAYOUT_4020))) { spin_lock_irqsave(&dev->spinlock, flags); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/37] staging: comedi: amplc_pci230: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/amplc_pci230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c index 66e7a47..6642744 100644 --- a/drivers/staging/comedi/drivers/amplc_pci230.c +++ b/drivers/staging/comedi/drivers/amplc_pci230.c @@ -1765,7 +1765,7 @@ static void pci230_ai_update_fifo_trigger_level(struct comedi_device *dev, unsigned short triglev; unsigned short adccon; - if (cmd->flags & TRIG_WAKE_EOS) + if (cmd->flags & CMDF_WAKE_EOS) wake = scanlen - devpriv->ai_scan_pos; else if (cmd->stop_src != TRIG_COUNT || devpriv->ai_scan_count >= PCI230_ADC_FIFOLEVEL_HALFFULL || -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/37] staging: comedi: rtd520: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/rtd520.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 7c7911b..cb02698e 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -955,7 +955,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) if (TRIG_TIMER == cmd->scan_begin_src) { /* scan_begin_arg is in nanoseconds */ /* find out how many samples to wait before transferring */ - if (cmd->flags & TRIG_WAKE_EOS) { + if (cmd->flags & CMDF_WAKE_EOS) { /* * this may generate un-sustainable interrupt rates * the application is responsible for doing the -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/37] staging: comedi: 8253.h: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/8253.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h index f8e1eba..9f4c141 100644 --- a/drivers/staging/comedi/drivers/8253.h +++ b/drivers/staging/comedi/drivers/8253.h @@ -90,8 +90,8 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base, } } - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: ns_high = div1_lub * div2_lub * i8253_osc_base; ns_low = div1_glb * div2_glb * i8253_osc_base; @@ -103,11 +103,11 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base, div2 = div2_glb; } break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: div1 = div1_lub; div2 = div2_lub; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: div1 = div1_glb; div2 = div2_glb; break; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/37] staging: comedi: amplc_pci230: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/amplc_pci230.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c index 6642744..eb75012 100644 --- a/drivers/staging/comedi/drivers/amplc_pci230.c +++ b/drivers/staging/comedi/drivers/amplc_pci230.c @@ -649,14 +649,14 @@ static unsigned int pci230_divide_ns(uint64_t ns, unsigned int timebase, div = ns; rem = do_div(div, timebase); - switch (flags & TRIG_ROUND_MASK) { + switch (flags & CMDF_ROUND_MASK) { default: - case TRIG_ROUND_NEAREST: + case CMDF_ROUND_NEAREST: div += (rem + (timebase / 2)) / timebase; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: div += (rem + timebase - 1) / timebase; break; } @@ -1735,7 +1735,7 @@ static int pci230_ai_cmdtest(struct comedi_device *dev, if (!pci230_ai_check_scan_period(cmd)) { /* Was below minimum required. Round up. */ pci230_ns_to_single_timer(&cmd->scan_begin_arg, - TRIG_ROUND_UP); + CMDF_ROUND_UP); pci230_ai_check_scan_period(cmd); } if (tmp != cmd->scan_begin_arg) @@ -2334,7 +2334,7 @@ static int pci230_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) pci230_ct_setup_ns_mode(dev, 0, I8254_MODE1, ((uint64_t)cmd->convert_arg * cmd->scan_end_arg), - TRIG_ROUND_UP); + CMDF_ROUND_UP); if (cmd->scan_begin_src == TRIG_TIMER) { /* * Monostable on CT0 will be triggered by -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/37] staging: comedi: add CMDF_WAKE_EOS as synonym for TRIG_WAKE_EOS
`TRIG_WAKE_EOS` is one of the values that can be OR-ed into the `flags` member of `struct comedi_cmd`. It's intended action is tune the asynchronous command to interrupt at the end of every "scan". The name is a bit of a left-over from earlier times. A better name would be `CMDF_WAKE_EOS` to match various other command flags. Define `CMDF_WAKE_EOS` with the same numeric value as the old `TRIG_WAKE_EOS` and redefine `TRIG_WAKE_EOS` as a synonym of it. Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi.h | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index 217baf8..dfaa935 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -126,10 +126,7 @@ #define TRIG_BOGUS 0x0001 /* do the motions */ #define TRIG_DITHER0x0002 /* enable dithering */ #define TRIG_DEGLITCH 0x0004 /* enable deglitching */ - /*#define TRIG_RT 0x0008 *//* perform op in real time */ #define TRIG_CONFIG0x0010 /* perform configuration, not triggering */ -#define TRIG_WAKE_EOS 0x0020 /* wake up on end-of-scan events */ - /*#define TRIG_WRITE0x0040*//* write to bidirectional devices */ /* command flags */ /* These flags are used in comedi_cmd structures */ @@ -137,10 +134,10 @@ /* try to use a real-time interrupt while performing command */ #define CMDF_PRIORITY 0x0008 -#define TRIG_RTCMDF_PRIORITY /* compatibility definition */ +/* wake up on end-of-scan events */ +#define CMDF_WAKE_EOS 0x0020 #define CMDF_WRITE 0x0040 -#define TRIG_WRITE CMDF_WRITE /* compatibility definition */ #define CMDF_RAWDATA 0x0080 @@ -156,6 +153,11 @@ #define TRIG_ROUND_UP 0x0002 #define TRIG_ROUND_UP_NEXT 0x0003 +/* compatibility definitions */ +#define TRIG_RTCMDF_PRIORITY +#define TRIG_WAKE_EOS CMDF_WAKE_EOS +#define TRIG_WRITE CMDF_WRITE + /* trigger sources */ #define TRIG_ANY 0x -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 27/37] staging: comedi: cb_pcidas64: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/cb_pcidas64.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index f1b2744..56069d6 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1958,14 +1958,14 @@ static unsigned int get_divisor(unsigned int ns, unsigned int flags) { unsigned int divisor; - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_UP: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_UP: divisor = (ns + TIMER_BASE - 1) / TIMER_BASE; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: divisor = ns / TIMER_BASE; break; - case TRIG_ROUND_NEAREST: + case CMDF_ROUND_NEAREST: default: divisor = (ns + TIMER_BASE / 2) / TIMER_BASE; break; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/37] staging: comedi: ni_tiocmd: use CMDF_WAKE_EOS
Replace use of `TRIG_WAKE_EOS` command flag with the new name `CMDF_WAKE_EOS`. The numeric value is unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_tiocmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c index c1e3966..26e7291 100644 --- a/drivers/staging/comedi/drivers/ni_tiocmd.c +++ b/drivers/staging/comedi/drivers/ni_tiocmd.c @@ -185,7 +185,7 @@ static int ni_tio_cmd_setup(struct comedi_subdevice *s) } if (set_gate_source) retval = ni_tio_set_gate_src(counter, 0, gate_source); - if (cmd->flags & TRIG_WAKE_EOS) { + if (cmd->flags & CMDF_WAKE_EOS) { ni_tio_set_bits(counter, NITIO_INT_ENA_REG(cidx), GI_GATE_INTERRUPT_ENABLE(cidx), GI_GATE_INTERRUPT_ENABLE(cidx)); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 29/37] staging: comedi: dt282x: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/dt282x.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c index b989691..4017fcb 100644 --- a/drivers/staging/comedi/drivers/dt282x.c +++ b/drivers/staging/comedi/drivers/dt282x.c @@ -403,15 +403,15 @@ static unsigned int dt282x_ns_to_timer(unsigned int *ns, unsigned int flags) if (prescale == 1) continue; base = 250 * (1 << prescale); - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: divider = (*ns + base / 2) / base; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: divider = (*ns) / base; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: divider = (*ns + base - 1) / base; break; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 31/37] staging: comedi: me4000: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/me4000.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index 5b74b36..3b0df6b 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -650,10 +650,10 @@ static int ai_round_cmd_args(struct comedi_device *dev, *init_ticks = (cmd->start_arg * 33) / 1000; rest = (cmd->start_arg * 33) % 1000; - if ((cmd->flags & TRIG_ROUND_MASK) == TRIG_ROUND_NEAREST) { + if ((cmd->flags & CMDF_ROUND_MASK) == CMDF_ROUND_NEAREST) { if (rest > 33) (*init_ticks)++; - } else if ((cmd->flags & TRIG_ROUND_MASK) == TRIG_ROUND_UP) { + } else if ((cmd->flags & CMDF_ROUND_MASK) == CMDF_ROUND_UP) { if (rest) (*init_ticks)++; } @@ -663,10 +663,10 @@ static int ai_round_cmd_args(struct comedi_device *dev, *scan_ticks = (cmd->scan_begin_arg * 33) / 1000; rest = (cmd->scan_begin_arg * 33) % 1000; - if ((cmd->flags & TRIG_ROUND_MASK) == TRIG_ROUND_NEAREST) { + if ((cmd->flags & CMDF_ROUND_MASK) == CMDF_ROUND_NEAREST) { if (rest > 33) (*scan_ticks)++; - } else if ((cmd->flags & TRIG_ROUND_MASK) == TRIG_ROUND_UP) { + } else if ((cmd->flags & CMDF_ROUND_MASK) == CMDF_ROUND_UP) { if (rest) (*scan_ticks)++; } @@ -676,10 +676,10 @@ static int ai_round_cmd_args(struct comedi_device *dev, *chan_ticks = (cmd->convert_arg * 33) / 1000; rest = (cmd->convert_arg * 33) % 1000; - if ((cmd->flags & TRIG_ROUND_MASK) == TRIG_ROUND_NEAREST) { + if ((cmd->flags & CMDF_ROUND_MASK) == CMDF_ROUND_NEAREST) { if (rest > 33) (*chan_ticks)++; - } else if ((cmd->flags & TRIG_ROUND_MASK) == TRIG_ROUND_UP) { + } else if ((cmd->flags & CMDF_ROUND_MASK) == CMDF_ROUND_UP) { if (rest) (*chan_ticks)++; } @@ -849,7 +849,7 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev, int err = 0; /* Only rounding flags are implemented */ - cmd->flags &= TRIG_ROUND_NEAREST | TRIG_ROUND_UP | TRIG_ROUND_DOWN; + cmd->flags &= CMDF_ROUND_NEAREST | CMDF_ROUND_UP | CMDF_ROUND_DOWN; /* Round the timer arguments */ ai_round_cmd_args(dev, s, cmd, &init_ticks, &scan_ticks, &chan_ticks); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 28/37] staging: comedi: das1800: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das1800.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index 951292d..9d0150d 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c @@ -731,15 +731,15 @@ static unsigned int burst_convert_arg(unsigned int convert_arg, int flags) convert_arg = 64000; /* the conversion time must be an integral number of microseconds */ - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: micro_sec = (convert_arg + 500) / 1000; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: micro_sec = convert_arg / 1000; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: micro_sec = (convert_arg - 1) / 1000 + 1; break; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/37] staging: comedi: dt3000: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/dt3000.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c index ab1fe4a..0abe64a 100644 --- a/drivers/staging/comedi/drivers/dt3000.c +++ b/drivers/staging/comedi/drivers/dt3000.c @@ -377,15 +377,15 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec, for (prescale = 0; prescale < 16; prescale++) { base = timer_base * (prescale + 1); - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: divider = (*nanosec + base / 2) / base; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: divider = (*nanosec) / base; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: divider = (*nanosec) / base; break; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 34/37] staging: comedi: ni_mio_common: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_mio_common.c | 38 +- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 584de17..b34df3a 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -2206,15 +2206,15 @@ static int ni_ns_to_timer(const struct comedi_device *dev, unsigned nanosec, struct ni_private *devpriv = dev->private; int divider; - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: divider = (nanosec + devpriv->clock_ns / 2) / devpriv->clock_ns; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: divider = (nanosec) / devpriv->clock_ns; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: divider = (nanosec + devpriv->clock_ns - 1) / devpriv->clock_ns; break; } @@ -2541,7 +2541,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* load SI */ timer = ni_ns_to_timer(dev, cmd->scan_begin_arg, - TRIG_ROUND_NEAREST); + CMDF_ROUND_NEAREST); ni_stc_writel(dev, timer, AI_SI_Load_A_Registers); ni_stc_writew(dev, AI_SI_Load, AI_Command_1_Register); break; @@ -2569,7 +2569,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) timer = 1; else timer = ni_ns_to_timer(dev, cmd->convert_arg, - TRIG_ROUND_NEAREST); + CMDF_ROUND_NEAREST); /* 0,0 does not work */ ni_stc_writew(dev, 1, AI_SI2_Load_A_Register); ni_stc_writew(dev, timer, AI_SI2_Load_B_Register); @@ -3190,7 +3190,7 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->ao_cmd2 &= ~AO_BC_Gate_Enable; trigvar = ni_ns_to_timer(dev, cmd->scan_begin_arg, - TRIG_ROUND_NEAREST); + CMDF_ROUND_NEAREST); ni_stc_writel(dev, 1, AO_UI_Load_A_Register); ni_stc_writew(dev, AO_UI_Load, AO_Command_1_Register); ni_stc_writel(dev, trigvar, AO_UI_Load_A_Register); @@ -4187,15 +4187,15 @@ static int ni_m_series_pwm_config(struct comedi_device *dev, switch (data[0]) { case INSN_CONFIG_PWM_OUTPUT: switch (data[1]) { - case TRIG_ROUND_NEAREST: + case CMDF_ROUND_NEAREST: up_count = (data[2] + devpriv->clock_ns / 2) / devpriv->clock_ns; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: up_count = data[2] / devpriv->clock_ns; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: up_count = (data[2] + devpriv->clock_ns - 1) / devpriv->clock_ns; @@ -4204,15 +4204,15 @@ static int ni_m_series_pwm_config(struct comedi_device *dev, return -EINVAL; } switch (data[3]) { - case TRIG_ROUND_NEAREST: + case CMDF_ROUND_NEAREST: down_count = (data[4] + devpriv->clock_ns / 2) / devpriv->clock_ns; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: down_count = data[4] / devpriv->clock_ns; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: down_count = (data[4] + devpriv->clock_ns - 1) / devpriv->clock_ns; @@ -4251,15 +4251,15 @@ static int ni_6143_pwm_config(struct comedi_device *dev, switch (data[0]) { case INSN_CONFIG_PWM_OUTPUT: switch (data[1]) { - case TRIG_ROUND_NEAREST: + case CMDF_ROUND_NEAREST: up_count = (data[2] + devpriv->clock_ns / 2) / devpriv->clock_ns; break; - case TRIG_ROUND_DOWN: +
[PATCH 33/37] staging: comedi: ni_labpc_common: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_labpc_common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc_common.c b/drivers/staging/comedi/drivers/ni_labpc_common.c index 1881510..c54c88d 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_common.c +++ b/drivers/staging/comedi/drivers/ni_labpc_common.c @@ -397,21 +397,21 @@ static void labpc_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd, base_period = I8254_OSC_BASE_2MHZ * devpriv->divisor_b0; /* set a0 for conversion frequency and b1 for scan frequency */ - switch (cmd->flags & TRIG_ROUND_MASK) { + switch (cmd->flags & CMDF_ROUND_MASK) { default: - case TRIG_ROUND_NEAREST: + case CMDF_ROUND_NEAREST: devpriv->divisor_a0 = (convert_period + (base_period / 2)) / base_period; devpriv->divisor_b1 = (scan_period + (base_period / 2)) / base_period; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: devpriv->divisor_a0 = (convert_period + (base_period - 1)) / base_period; devpriv->divisor_b1 = (scan_period + (base_period - 1)) / base_period; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: devpriv->divisor_a0 = convert_period / base_period; devpriv->divisor_b1 = scan_period / base_period; break; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 37/37] staging: comedi: s626: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/s626.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index a868d73..051a727 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -1967,15 +1967,15 @@ static int s626_ns_to_timer(unsigned int *nanosec, unsigned int flags) base = 500; /* 2MHz internal clock */ - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: divider = (*nanosec + base / 2) / base; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: divider = (*nanosec) / base; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: divider = (*nanosec + base - 1) / base; break; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/37] staging: comedi: add CMDF_ROUND_... as synonyms for TRIG_ROUND_...
The `TRIG_ROUND_...` macros are some of the values that can be OR-ed into the `flags` member of `struct comedi_cmd`. They may influence the rounding of sample timings during operation of the asynchronous command. The names are a bit of a left-over from earlier times. It would be better to use the names `CMDF_ROUND_...` to match various other command flags. Define `CMDF_ROUND_MASK`, `CMDF_ROUND_NEAREST`, `CMDF_ROUND_DOWN`, `CMDF_ROUND_UP` and `CMDF_ROUND_UP_NEXT` with the same numeric values as `TRIG_ROUND_MASK`, `TRIG_ROUND_NEAREST`, `TRIG_ROUND_DOWN`, `TRIG_ROUND_UP` and `TRIG_ROUND_UP_NEXT`, and redefine the `TRIG_ROUND_...` macros as synonyms of the `CMDF_ROUND_...` macros. Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index 3d2801d..c8c99e6 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -142,23 +142,29 @@ #define CMDF_RAWDATA 0x0080 +/* timer rounding definitions */ +#define CMDF_ROUND_MASK0x0003 +#define CMDF_ROUND_NEAREST 0x +#define CMDF_ROUND_DOWN0x0001 +#define CMDF_ROUND_UP 0x0002 +#define CMDF_ROUND_UP_NEXT 0x0003 + #define COMEDI_EV_START0x0004 #define COMEDI_EV_SCAN_BEGIN 0x0008 #define COMEDI_EV_CONVERT 0x0010 #define COMEDI_EV_SCAN_END 0x0020 #define COMEDI_EV_STOP 0x0040 -#define TRIG_ROUND_MASK0x0003 -#define TRIG_ROUND_NEAREST 0x -#define TRIG_ROUND_DOWN0x0001 -#define TRIG_ROUND_UP 0x0002 -#define TRIG_ROUND_UP_NEXT 0x0003 - /* compatibility definitions */ #define TRIG_BOGUS CMDF_BOGUS #define TRIG_RTCMDF_PRIORITY #define TRIG_WAKE_EOS CMDF_WAKE_EOS #define TRIG_WRITE CMDF_WRITE +#define TRIG_ROUND_MASKCMDF_ROUND_MASK +#define TRIG_ROUND_NEAREST CMDF_ROUND_NEAREST +#define TRIG_ROUND_DOWNCMDF_ROUND_DOWN +#define TRIG_ROUND_UP CMDF_ROUND_UP +#define TRIG_ROUND_UP_NEXT CMDF_ROUND_UP_NEXT /* trigger sources */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 35/37] staging: comedi: ni_pcidio: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_pcidio.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index b5b36af..ede8e41 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -530,15 +530,15 @@ static int ni_pcidio_ns_to_timer(int *nanosec, unsigned int flags) base = TIMER_BASE; - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: divider = (*nanosec + base / 2) / base; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: divider = (*nanosec) / base; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: divider = (*nanosec + base - 1) / base; break; } @@ -669,7 +669,7 @@ static int ni_pcidio_cmd(struct comedi_device *dev, struct comedi_subdevice *s) writeb(3, dev->mmio + LinePolarities); writeb(0xc0, dev->mmio + AckSer); writel(ni_pcidio_ns_to_timer(&cmd->scan_begin_arg, -TRIG_ROUND_NEAREST), +CMDF_ROUND_NEAREST), dev->mmio + StartDelay); writeb(1, dev->mmio + ReqDelay); writeb(1, dev->mmio + ReqNotDelay); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 36/37] staging: comedi: rtd520: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/rtd520.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index cb02698e..2ea4a5c 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -399,15 +399,15 @@ static int rtd_ns_to_timer_base(unsigned int *nanosec, { int divider; - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: divider = (*nanosec + base / 2) / base; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: divider = (*nanosec) / base; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: divider = (*nanosec + base - 1) / base; break; } @@ -808,26 +808,26 @@ static int rtd_ai_cmdtest(struct comedi_device *dev, if (cfc_check_trigger_arg_min(&cmd->scan_begin_arg, RTD_MAX_SPEED_1)) { rtd_ns_to_timer(&cmd->scan_begin_arg, - TRIG_ROUND_UP); + CMDF_ROUND_UP); err |= -EINVAL; } if (cfc_check_trigger_arg_max(&cmd->scan_begin_arg, RTD_MIN_SPEED_1)) { rtd_ns_to_timer(&cmd->scan_begin_arg, - TRIG_ROUND_DOWN); + CMDF_ROUND_DOWN); err |= -EINVAL; } } else { if (cfc_check_trigger_arg_min(&cmd->scan_begin_arg, RTD_MAX_SPEED)) { rtd_ns_to_timer(&cmd->scan_begin_arg, - TRIG_ROUND_UP); + CMDF_ROUND_UP); err |= -EINVAL; } if (cfc_check_trigger_arg_max(&cmd->scan_begin_arg, RTD_MIN_SPEED)) { rtd_ns_to_timer(&cmd->scan_begin_arg, - TRIG_ROUND_DOWN); + CMDF_ROUND_DOWN); err |= -EINVAL; } } @@ -843,26 +843,26 @@ static int rtd_ai_cmdtest(struct comedi_device *dev, if (cfc_check_trigger_arg_min(&cmd->convert_arg, RTD_MAX_SPEED_1)) { rtd_ns_to_timer(&cmd->convert_arg, - TRIG_ROUND_UP); + CMDF_ROUND_UP); err |= -EINVAL; } if (cfc_check_trigger_arg_max(&cmd->convert_arg, RTD_MIN_SPEED_1)) { rtd_ns_to_timer(&cmd->convert_arg, - TRIG_ROUND_DOWN); + CMDF_ROUND_DOWN); err |= -EINVAL; } } else { if (cfc_check_trigger_arg_min(&cmd->convert_arg, RTD_MAX_SPEED)) { rtd_ns_to_timer(&cmd->convert_arg, - TRIG_ROUND_UP); + CMDF_ROUND_UP); err |= -EINVAL; } if (cfc_check_trigger_arg_max(&cmd->convert_arg, RTD_MIN_SPEED)) { rtd_ns_to_timer(&cmd->convert_arg, - TRIG_ROUND_DOWN); + CMDF_ROUND_DOWN); err |= -EINVAL; } } @@ -1019,7 +1019,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) switch (cmd->scan_begin_src) { case TRIG_TIMER:/* periodic scanning */ timer = rtd_ns_to_timer(&cmd->scan_begin_arg, -
[PATCH 32/37] staging: comedi: ni_at_a2150: use CMDF_ROUND_...
Replace use of the `TRIG_ROUND_...` macros with the new names `CMDF_ROUND_...`. The numeric values are unchanged. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_at_a2150.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index fca22c5..c494e4e 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -326,8 +326,8 @@ static int a2150_get_timing(struct comedi_device *dev, unsigned int *period, } } } - switch (flags & TRIG_ROUND_MASK) { - case TRIG_ROUND_NEAREST: + switch (flags & CMDF_ROUND_MASK) { + case CMDF_ROUND_NEAREST: default: /* if least upper bound is better approximation */ if (lub - *period < *period - glb) @@ -335,10 +335,10 @@ static int a2150_get_timing(struct comedi_device *dev, unsigned int *period, else *period = glb; break; - case TRIG_ROUND_UP: + case CMDF_ROUND_UP: *period = lub; break; - case TRIG_ROUND_DOWN: + case CMDF_ROUND_DOWN: *period = glb; break; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] drivers: staging: dgap: fix the checkpatch.pl issue "Warning: line over 80 characters"
Done as Eudyptula task 10. Signed-off-by: Piotr Witoslawski --- drivers/staging/dgap/dgap.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 8929dbf..67da1d5 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -88,7 +88,8 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file, struct channel_t *ch); static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg); -static int dgap_tty_digigeta(struct channel_t *ch, struct digi_t __user *retinfo); +static int dgap_tty_digigeta(struct channel_t *ch, +struct digi_t __user *retinfo); static int dgap_tty_digiseta(struct channel_t *ch, struct board_t *bd, struct un_t *un, struct digi_t __user *new_info); static int dgap_tty_digigetedelay(struct tty_struct *tty, int __user *retinfo); @@ -104,8 +105,9 @@ static void dgap_tty_flush_chars(struct tty_struct *tty); static void dgap_tty_flush_buffer(struct tty_struct *tty); static void dgap_tty_hangup(struct tty_struct *tty); static int dgap_wait_for_drain(struct tty_struct *tty); -static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, struct un_t *un, - unsigned int command, unsigned int __user *value); +static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, + struct un_t *un, unsigned int command, + unsigned int __user *value); static int dgap_get_modem_info(struct channel_t *ch, unsigned int __user *value); static int dgap_tty_digisetcustombaud(struct channel_t *ch, struct board_t *bd, @@ -3076,8 +3078,9 @@ static int dgap_get_modem_info(struct channel_t *ch, unsigned int __user *value) * * Set modem signals, called by ld. */ -static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, struct un_t *un, - unsigned int command, unsigned int __user *value) +static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, + struct un_t *un, unsigned int command, + unsigned int __user *value) { int ret; unsigned int arg; @@ -3153,7 +3156,8 @@ static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, struct * * */ -static int dgap_tty_digigeta(struct channel_t *ch, struct digi_t __user *retinfo) +static int dgap_tty_digigeta(struct channel_t *ch, +struct digi_t __user *retinfo) { struct digi_t tmp; ulong lock_flags; -- 1.8.5.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
On Wed, Sep 03, 2014 at 02:29:44PM +0530, Sudip Mukherjee wrote: > On Wed, Sep 03, 2014 at 11:40:38AM +0300, Dan Carpenter wrote: > > On Tue, Sep 02, 2014 at 11:46:35PM +0530, Sudip Mukherjee wrote: > > > From: Sudip Mukherjee > > > > I really would prefer if you just figured out your email settings so > > this isn't needed. The From: header is mostly used for people > > forwarding patches from other people. We have allowed people to use > > the From header like this if they can't get their corporate email > > configured properly but I try to discorage it. If everyone starts using > > From headers like this then it becomes a pain to deal with. > > > I will configure the corporate mail. I am the server admin , so there should > not be any problem in settings. :) > v4 of the patch was sent from the corporate mail. The settings were done. But the problem is coming in a different area. I have given strict DMARC check for the corporate mail server. DMARC = domain based message authentication. So the mail i sent reached all the list subscriber from a different server than our designated server , and as a result it has been marked as spam in many places. I have already received a few complaints regarding that. Is there any other way that i send the patch from my personal account , and use my corporate mail in Signed-off-by ... thanks sudip > > > > > > removed unused variables > > > fixed sparse warning of context imbalance in 'do_locked_client_insert' > > > different lock contexts for basic block > > > > > > Signed-off-by: Sudip Mukherjee > > > --- > > > > > > > This patch is much better and more interesting, but I still want some > > more changes. > > > I have already sent v3 of the patch just before your mail , based on > what greg k-h has suggested about the commnent. Please discard that. > > > > v1 of the patch of the patch just fixed the sparse warning. > > > On suggestion of Dan Carpenter v2 is the total rewrite of the function. > > > Two of the function arguments (interruptHandle,channelId) are also not > > > used. Wanted to remove them as well , > > > but then thought maybe the original author have planned for some use of > > > those variables. > > > > In the kernel we don't put code in until we are ready to use it. Don't > > worry about future changes. But on the other hand, don't remove the > > parameters in this patch because that is doing too many changes in one > > patch. It would have to be done in a follow on patch if you decide to > > do it. > > > > > - if (locked) { > > > - spin_unlock_irqrestore((spinlock_t *) lock, flags); > > > - locked = 0; > > > + goto unlock; > > > + visor_signalqueue_empty(queueinfo->chan, whichqueue); > > > > Just remove this function. But mention it in the changelog in case > > there are side effects. > > > > > + /*visor_signal_insert() only return 0 or 1 */ > > > > Don't put obvious comments like this. A normal reader will assume that > > this function is boolean based on how it is used. > > > > > + if (visor_signal_insert(queueinfo->chan, whichqueue, pSignal) == 1) { > > > > Don't put the == 1. In terms of English, 1 really is intended as > > "success" and not the number one. Also don't test for == true or > > == false. > > > > if (foo) { > > if (foo == true) { > > > > These two statement *mean* the same thing in terms of English, but the > > first one is simpler and less wordy. > > > > regards, > > dan carpenter > > thanks > sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] drivers: staging: dgap: fix the checkpatch.pl issue "Warning: line over 80 characters"
On Wed, Sep 03, 2014 at 04:09:59PM +0200, Piotr Witoslawski wrote: > Done as Eudyptula task 10. use proper commit message mentioning what changes you have done. and you have not sent the patch to all the people who were supposed to be sent. thanks sudip > Signed-off-by: Piotr Witoslawski > --- > drivers/staging/dgap/dgap.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c > index 8929dbf..67da1d5 100644 > --- a/drivers/staging/dgap/dgap.c > +++ b/drivers/staging/dgap/dgap.c > @@ -88,7 +88,8 @@ static int dgap_block_til_ready(struct tty_struct *tty, > struct file *file, > struct channel_t *ch); > static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, > unsigned long arg); > -static int dgap_tty_digigeta(struct channel_t *ch, struct digi_t __user > *retinfo); > +static int dgap_tty_digigeta(struct channel_t *ch, > + struct digi_t __user *retinfo); > static int dgap_tty_digiseta(struct channel_t *ch, struct board_t *bd, >struct un_t *un, struct digi_t __user *new_info); > static int dgap_tty_digigetedelay(struct tty_struct *tty, int __user > *retinfo); > @@ -104,8 +105,9 @@ static void dgap_tty_flush_chars(struct tty_struct *tty); > static void dgap_tty_flush_buffer(struct tty_struct *tty); > static void dgap_tty_hangup(struct tty_struct *tty); > static int dgap_wait_for_drain(struct tty_struct *tty); > -static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, > struct un_t *un, > -unsigned int command, unsigned int __user > *value); > +static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, > +struct un_t *un, unsigned int command, > +unsigned int __user *value); > static int dgap_get_modem_info(struct channel_t *ch, > unsigned int __user *value); > static int dgap_tty_digisetcustombaud(struct channel_t *ch, struct board_t > *bd, > @@ -3076,8 +3078,9 @@ static int dgap_get_modem_info(struct channel_t *ch, > unsigned int __user *value) > * > * Set modem signals, called by ld. > */ > -static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, > struct un_t *un, > -unsigned int command, unsigned int __user *value) > +static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, > +struct un_t *un, unsigned int command, > +unsigned int __user *value) > { > int ret; > unsigned int arg; > @@ -3153,7 +3156,8 @@ static int dgap_set_modem_info(struct channel_t *ch, > struct board_t *bd, struct > * > * > */ > -static int dgap_tty_digigeta(struct channel_t *ch, struct digi_t __user > *retinfo) > +static int dgap_tty_digigeta(struct channel_t *ch, > + struct digi_t __user *retinfo) > { > struct digi_t tmp; > ulong lock_flags; > -- > 1.8.5.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
On Wed, Sep 03, 2014 at 08:13:25PM +0530, Sudip Mukherjee wrote: > On Wed, Sep 03, 2014 at 02:29:44PM +0530, Sudip Mukherjee wrote: > > On Wed, Sep 03, 2014 at 11:40:38AM +0300, Dan Carpenter wrote: > > > On Tue, Sep 02, 2014 at 11:46:35PM +0530, Sudip Mukherjee wrote: > > > > From: Sudip Mukherjee > > > > > > I really would prefer if you just figured out your email settings so > > > this isn't needed. The From: header is mostly used for people > > > forwarding patches from other people. We have allowed people to use > > > the From header like this if they can't get their corporate email > > > configured properly but I try to discorage it. If everyone starts using > > > From headers like this then it becomes a pain to deal with. > > > > > I will configure the corporate mail. I am the server admin , so there should > > not be any problem in settings. :) > > > v4 of the patch was sent from the corporate mail. The settings were done. > But the problem is coming in a different area. I have given strict DMARC > check > for the corporate mail server. DMARC = domain based message authentication. > So the mail i sent reached all the list subscriber from a different server > than > our designated server , and as a result it has been marked as spam in many > places. > I have already received a few complaints regarding that. > Is there any other way that i send the patch from my personal account , > and use my corporate mail in Signed-off-by ... I guess it's ok by me. It's up to Greg. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/6] staging: goldfish: document spinlock usage
On Wed, Sep 03, 2014 at 01:13:19PM +0100, One Thousand Gnomes wrote: > > This tells the reader nothing. It's good to document locking models but > > - you lock data not code (which is a detail a lot of programmers get wrong > in th design stage too) > - you need to document what objects are protected by the lock > > > So it should tell the reader what the lock must be held to do > > If you look at the audio code it actually protects the status field and > status register of the "hardware" Hello, Thank you for the feedback, I will send a v2. -- Cheers, Loïc ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: unisys: uislib: uisqueue.c: rewrite of do_locked_client_insert
On Wed, Sep 03, 2014 at 06:41:30PM +0300, Dan Carpenter wrote: > On Wed, Sep 03, 2014 at 08:13:25PM +0530, Sudip Mukherjee wrote: > > On Wed, Sep 03, 2014 at 02:29:44PM +0530, Sudip Mukherjee wrote: > > > On Wed, Sep 03, 2014 at 11:40:38AM +0300, Dan Carpenter wrote: > > > > On Tue, Sep 02, 2014 at 11:46:35PM +0530, Sudip Mukherjee wrote: > > > > > From: Sudip Mukherjee > > > > > > > > I really would prefer if you just figured out your email settings so > > > > this isn't needed. The From: header is mostly used for people > > > > forwarding patches from other people. We have allowed people to use > > > > the From header like this if they can't get their corporate email > > > > configured properly but I try to discorage it. If everyone starts using > > > > From headers like this then it becomes a pain to deal with. > > > > > > > I will configure the corporate mail. I am the server admin , so there > > > should > > > not be any problem in settings. :) > > > > > v4 of the patch was sent from the corporate mail. The settings were done. > > But the problem is coming in a different area. I have given strict DMARC > > check > > for the corporate mail server. DMARC = domain based message authentication. > > So the mail i sent reached all the list subscriber from a different server > > than > > our designated server , and as a result it has been marked as spam in many > > places. > > I have already received a few complaints regarding that. > > Is there any other way that i send the patch from my personal account , > > and use my corporate mail in Signed-off-by ... > > I guess it's ok by me. It's up to Greg. > Greh K-H has already accepted some of my patches and some are still pending :( , where from was my personal email and Signed-off-by as my corporate email. So i guess its ok for him also. . thanks sudip > regards, > dan carpenter > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] staging: comedi: ni_at_a2150: range check board index
On Monday, September 01, 2014 6:14 AM, Ian Abbott wrote: > The "ni_at_a2150" driver determines the board type by calling > `a2150_probe()`. This reads a register and converts it to a board index > in the range 0 to 3. However, the board table array it indexes into > (`a2150_boards[]`) only has 2 entries. Return an error from the > Comedi driver "attach" handler `a2150_attach()` if the probed board > index is beyond the end of the array. > > Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 00/37] staging: comedi: rename command flags for consistency
On Wednesday, September 03, 2014 5:45 AM, Ian Abbott wrote: > > The various macros in "comedi.h" used to construct values for the > `flags` member of `struct comedi_cmd` are named inconsistently. Some of > the macros with the `TRIG_` prefix are from a long defunct Comedi > trigger interface that was replaced with the current Comedi asynchronous > command interface many years ago, co-opting most of the `TRIG_` macros > in the process. Some of them are still used with various other members > of `struct comedi_cmd` to select trigger sources. Others are used with > the `flags` member. There are other macros for use with the command > `flags` member using the prefix `CMDF_`, and some of the old `TRIG_` > macros have been renamed already, keeping the old names around as > synonyms for backwards compatibility. > > For consistency, rename the `TRIG_` prefixed macros used with the > command `flags` member to use the prefix `CMDF_` and redefine the > renamed macros as synonyms for backwards compatibilty. > > There are still some left-over `TRIG_` macros unused by the Comedi > kernel code, but the user-space Comedilib library may still be trying to > use them, so hang onto them for now. Reviewed-by: H Hartley Sweeten ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
FROM: Husam Al Sayed.
FROM: Husam Al Sayed. EMAIL:alsayedh...@hotmail.com Hello, I decided to write you this proposal in good faith, believing that you will not betray me. I am Mr. Husam Al Sayed, a Bank officer here in U.A.E. One Mr. Peter Adams, a citizen of your country and Crude Oil dealer made a fixed deposit with my bank in 2005 for 108 calendar months, valued at US$30,000,000.00 (Thirty Million United State Dollars) the due date for this deposit contract was last 22nd of January 2014. Sadly Peter was among the death victims in the May 27 2006 Earthquake disaster in Java, Indonesia that killed over 5,000 people. He was in Indonesia on a business trip and that was how he met his untimely end. My bank management is yet to know about his death, I knew about it because he was my friend and I am his Account Officer. Peter did not mention any Next of Kin/ Heir when the account was opened, he was not married and no children. Last week my Bank Management requested that Peter should give instructions on what to do about his funds, if to renew the contract. I know this will happen and that is why I have been looking for a means to handle the situation, because if my Bank Directors happens to know that Peter is dead and do not have any Heir, they will take the funds for their personal use, so I don't want such to happen. That is why I am seeking your co-operation to present you as the Next of Kin/ Heir to the account, since you are a foreigner and my bank head quarters will release the account to you. There is no risk involved; the transaction will be executed under a legitimate arrangement that will protect us from any breach of law. It is better that we claim the money, than allowing the Bank Directors to take it, they are rich already. I am not a greedy person, so I am suggesting we share the funds in this ratio, 50/50%, equal sharing. Let me know your mind on this and please do treat this information highly confidential. We shall go over the details once I receive your urgent response. Please Urgently get back to me through t his email address as soon as possible: Have a nice day and God bless. Anticipating your communication. Regards, FROM: Husam Al Sayed. EMAIL: alsayedh...@hotmail.com _ http://ad.sme.sk/ Reklama na Sme.sk vam prinasa viac. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 3/6] staging: goldfish: document spinlock usage
Coding style: document spinlock usage Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index 23a206d..b360d07 100644 --- a/drivers/staging/goldfish/goldfish_audio.c +++ b/drivers/staging/goldfish/goldfish_audio.c @@ -36,6 +36,7 @@ MODULE_VERSION("1.0"); struct goldfish_audio { char __iomem *reg_base; int irq; + /* lock protects access to buffer_status and to device registers */ spinlock_t lock; wait_queue_head_t wait; -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 0/6] staging: goldfish: fix coding style
Hi, This patchset fixes several coding style warnings detected by checkpatch.pl: -CHECK: Please don't use multiple blank lines -CHECK: No space is necessary after a cast -CHECK: spinlock_t definition without comment -CHECK: Alignment should match open parenthesis -CHECK: struct mutex definition without comment -CHECK: multiple assignments should be avoided v2 changes: -document more specifically the usage of mutex and spinlock Loic Pefferkorn (6): staging: goldfish: suppress consecutive blank lines staging: goldfish: remove useless space after a cast staging: goldfish: document spinlock usage staging: goldfish: fix alignment to match open parenthesis staging: goldfish: document mutex usage staging: goldfish: avoid multiple assignments drivers/staging/goldfish/goldfish_audio.c | 24 -- drivers/staging/goldfish/goldfish_nand.c | 42 --- 2 files changed, 33 insertions(+), 33 deletions(-) -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 4/6] staging: goldfish: fix alignment to match open parenthesis
Coding style: fix alignment to match open parenthesis Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 21 +- drivers/staging/goldfish/goldfish_nand.c | 36 +++ 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index b360d07..f200359 100644 --- a/drivers/staging/goldfish/goldfish_audio.c +++ b/drivers/staging/goldfish/goldfish_audio.c @@ -112,7 +112,7 @@ enum { static atomic_t open_count = ATOMIC_INIT(0); static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, - size_t count, loff_t *pos) + size_t count, loff_t *pos) { struct goldfish_audio *data = fp->private_data; int length; @@ -125,11 +125,10 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, length = (count > READ_BUFFER_SIZE ? READ_BUFFER_SIZE : count); AUDIO_WRITE(data, AUDIO_START_READ, length); - wait_event_interruptible(data->wait, - (data->buffer_status & AUDIO_INT_READ_BUFFER_FULL)); + wait_event_interruptible(data->wait, (data->buffer_status & +AUDIO_INT_READ_BUFFER_FULL)); - length = AUDIO_READ(data, - AUDIO_READ_BUFFER_AVAILABLE); + length = AUDIO_READ(data, AUDIO_READ_BUFFER_AVAILABLE); /* copy data to user space */ if (copy_to_user(buf, data->read_buffer, length)) @@ -143,7 +142,7 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, } static ssize_t goldfish_audio_write(struct file *fp, const char __user *buf, -size_t count, loff_t *pos) + size_t count, loff_t *pos) { struct goldfish_audio *data = fp->private_data; unsigned long irq_flags; @@ -217,7 +216,7 @@ static int goldfish_audio_release(struct inode *ip, struct file *fp) } static long goldfish_audio_ioctl(struct file *fp, unsigned int cmd, - unsigned long arg) +unsigned long arg) { /* temporary workaround, until we switch to the ALSA API */ if (cmd == 315) @@ -306,7 +305,7 @@ static int goldfish_audio_probe(struct platform_device *pdev) data->read_buffer = data->buffer_virt + 2 * WRITE_BUFFER_SIZE; ret = devm_request_irq(&pdev->dev, data->irq, goldfish_audio_interrupt, - IRQF_SHARED, pdev->name, data); + IRQF_SHARED, pdev->name, data); if (ret) { dev_err(&pdev->dev, "request_irq failed\n"); return ret; @@ -321,18 +320,18 @@ static int goldfish_audio_probe(struct platform_device *pdev) } AUDIO_WRITE64(data, AUDIO_SET_WRITE_BUFFER_1, - AUDIO_SET_WRITE_BUFFER_1_HIGH, buf_addr); + AUDIO_SET_WRITE_BUFFER_1_HIGH, buf_addr); buf_addr += WRITE_BUFFER_SIZE; AUDIO_WRITE64(data, AUDIO_SET_WRITE_BUFFER_2, - AUDIO_SET_WRITE_BUFFER_2_HIGH, buf_addr); + AUDIO_SET_WRITE_BUFFER_2_HIGH, buf_addr); buf_addr += WRITE_BUFFER_SIZE; data->read_supported = AUDIO_READ(data, AUDIO_READ_SUPPORTED); if (data->read_supported) AUDIO_WRITE64(data, AUDIO_SET_READ_BUFFER, - AUDIO_SET_READ_BUFFER_HIGH, buf_addr); + AUDIO_SET_READ_BUFFER_HIGH, buf_addr); audio_data = data; return 0; diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index aac8e20..3f13ef0 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -39,8 +39,8 @@ struct goldfish_nand { }; static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd, - enum nand_cmd cmd, u64 addr, u32 len, - void *ptr, u32 *rv) +enum nand_cmd cmd, u64 addr, u32 len, +void *ptr, u32 *rv) { u32 cmdp; struct goldfish_nand *nand = mtd->priv; @@ -74,7 +74,7 @@ static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd, } static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd, - u64 addr, u32 len, void *ptr) +u64 addr, u32 len, void *ptr) { struct goldfish_nand *nand = mtd->priv; u32 rv; @@ -113,7 +113,7 @@ static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr) if (goldfi
[PATCH v2 2/6] staging: goldfish: remove useless space after a cast
Coding style: remove useless space after a cast Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 092604c..aac8e20 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -340,7 +340,7 @@ static int goldfish_nand_init_device(struct platform_device *pdev, result, name_len); return -ENODEV; } - ((char *) mtd->name)[name_len] = '\0'; + ((char *)mtd->name)[name_len] = '\0'; /* Setup the MTD structure */ mtd->type = MTD_NANDFLASH; -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 5/6] staging: goldfish: document mutex usage
Coding style: document mutex usage Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 3f13ef0..c6c85d3 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -31,6 +31,7 @@ #include "goldfish_nand_reg.h" struct goldfish_nand { + /* lock protects access to the device registers */ struct mutexlock; unsigned char __iomem *base; struct cmd_params *cmd_params; -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 6/6] staging: goldfish: avoid multiple assignments
Coding style: avoid multiple assignments Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index c6c85d3..d68f216 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -329,9 +329,10 @@ static int goldfish_nand_init_device(struct platform_device *pdev, mtd->priv = nand; - mtd->name = name = devm_kzalloc(&pdev->dev, name_len + 1, GFP_KERNEL); + name = devm_kzalloc(&pdev->dev, name_len + 1, GFP_KERNEL); if (name == NULL) return -ENOMEM; + mtd->name = name; result = goldfish_nand_cmd(mtd, NAND_CMD_GET_DEV_NAME, 0, name_len, name); -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/6] staging: goldfish: suppress consecutive blank lines
Coding style: suppress consecutive blank lines Signed-off-by: Loic Pefferkorn --- drivers/staging/goldfish/goldfish_audio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c index c89d0b8..23a206d 100644 --- a/drivers/staging/goldfish/goldfish_audio.c +++ b/drivers/staging/goldfish/goldfish_audio.c @@ -108,10 +108,8 @@ enum { AUDIO_INT_READ_BUFFER_FULL, }; - static atomic_t open_count = ATOMIC_INIT(0); - static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, size_t count, loff_t *pos) { -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greetings
Greetings How are you doing today? i hope all is well with you and your family. Please i am contacting you for good and betterment of us. I am a staff of a financial firm here in Asia and you are my first contact, and I am contacting you because I need to do this deal with someone outside my country who is not known to my co staffs, friends and my family because is not the type of deal you let someone around you to be aware of as people can be greedy, even my bank do not even know about my communication with you as this will be a deal between me and you. I will explain better when I get your response, I shall wait for days and if I do not hear from you, I shall look for another person. Thanks, Nhak Kosal ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging: et131x: Remove spinlock fbr_lock
The spinlock fbr_lock is only used in a single call sequence staring from et131x_poll. As this call is already locked by napi->poll_lock, we can remove it. Signed-off-by: Mark Einon --- drivers/staging/et131x/et131x.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 7a1df8a..9819e0e 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -490,7 +490,6 @@ struct et131x_adapter { spinlock_t send_hw_lock; spinlock_t rcv_lock; - spinlock_t fbr_lock; /* Packet Filter and look ahead size */ u32 packet_filter; @@ -2325,8 +2324,6 @@ static void nic_return_rfd(struct et131x_adapter *adapter, struct rfd *rfd) u32 __iomem *offset; struct fbr_desc *next; - spin_lock_irqsave(&adapter->fbr_lock, flags); - if (ring_index == 0) offset = &rx_dma->fbr0_full_offset; else @@ -2346,8 +2343,6 @@ static void nic_return_rfd(struct et131x_adapter *adapter, struct rfd *rfd) free_buff_ring = bump_free_buff_ring(&fbr->local_full, fbr->num_entries - 1); writel(free_buff_ring, offset); - - spin_unlock_irqrestore(&adapter->fbr_lock, flags); } else { dev_err(&adapter->pdev->dev, "%s illegal Buffer Index returned\n", __func__); @@ -3691,7 +3686,6 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev, spin_lock_init(&adapter->tcb_ready_qlock); spin_lock_init(&adapter->send_hw_lock); spin_lock_init(&adapter->rcv_lock); - spin_lock_init(&adapter->fbr_lock); adapter->registry_jumbo_packet = 1514; /* 1514-9216 */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging: et131x: Fix whitespace - alignment matching open parenthesis
Fix occurrences in et131x.c of: CHECK: Alignment should match open parenthesis Signed-off-by: Mark Einon --- drivers/staging/et131x/et131x.c | 130 +--- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 1ac9e7e..2543ac0 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -594,11 +594,11 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data) *byte addressing). */ if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER, - LBCIF_CONTROL_LBCIF_ENABLE | LBCIF_CONTROL_I2C_WRITE)) + LBCIF_CONTROL_LBCIF_ENABLE | + LBCIF_CONTROL_I2C_WRITE)) return -EIO; /* Prepare EEPROM address for Step 3 */ - for (retries = 0; retries < MAX_NUM_WRITE_RETRIES; retries++) { /* Write the address to the LBCIF Address Register */ if (pci_write_config_dword(pdev, LBCIF_ADDRESS_REGISTER, addr)) @@ -654,7 +654,7 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data) while (1) { if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER, - LBCIF_CONTROL_LBCIF_ENABLE)) + LBCIF_CONTROL_LBCIF_ENABLE)) writeok = 0; /* Do read until internal ACK_ERROR goes away meaning write @@ -666,7 +666,8 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data) addr); do { pci_read_config_dword(pdev, - LBCIF_DATA_REGISTER, &val); + LBCIF_DATA_REGISTER, + &val); } while ((val & 0x0001) == 0); } while (val & 0x0004); @@ -747,7 +748,7 @@ static int et131x_init_eeprom(struct et131x_adapter *adapter) */ if (pci_read_config_byte(pdev, ET1310_PCI_EEPROM_STATUS, &eestatus)) { dev_err(&pdev->dev, - "Could not read PCI config space for EEPROM Status\n"); + "Could not read PCI config space for EEPROM Status\n"); return -EIO; } @@ -771,7 +772,8 @@ static int et131x_init_eeprom(struct et131x_adapter *adapter) } if (pdev->revision != 0x01 || write_failed) { dev_err(&pdev->dev, - "Fatal EEPROM Status Error - 0x%04x\n", eestatus); + "Fatal EEPROM Status Error - 0x%04x\n", + eestatus); /* This error could mean that there was an error * reading the eeprom or that the eeprom doesn't exist. @@ -829,7 +831,7 @@ static void et131x_rx_dma_enable(struct et131x_adapter *adapter) csr = readl(&adapter->regs->rxdma.csr); if (csr & ET_RXDMA_CSR_HALT_STATUS) { dev_err(&adapter->pdev->dev, - "RX Dma failed to exit halt state. CSR 0x%08x\n", + "RX Dma failed to exit halt state. CSR 0x%08x\n", csr); } } @@ -850,8 +852,8 @@ static void et131x_rx_dma_disable(struct et131x_adapter *adapter) csr = readl(&adapter->regs->rxdma.csr); if (!(csr & ET_RXDMA_CSR_HALT_STATUS)) dev_err(&adapter->pdev->dev, - "RX Dma failed to enter halt state. CSR 0x%08x\n", - csr); + "RX Dma failed to enter halt state. CSR 0x%08x\n", + csr); } } @@ -865,8 +867,8 @@ static void et131x_tx_dma_enable(struct et131x_adapter *adapter) /* Setup the transmit dma configuration register for normal * operation */ - writel(ET_TXDMA_SNGL_EPKT|(PARM_DMA_CACHE_DEF << ET_TXDMA_CACHE_SHIFT), - &adapter->regs->txdma.csr); + writel(ET_TXDMA_SNGL_EPKT | (PARM_DMA_CACHE_DEF << ET_TXDMA_CACHE_SHIFT), + &adapter->regs->txdma.csr); } static inline void add_10bit(u32 *v, int n) @@ -976,7 +978,7 @@ static void et1310_config_mac_regs2(struct et131x_adapter *adapter) /* Initialize loop back to off */ cfg1 &= ~(ET_MAC_CFG1_LOOPBACK | ET_MAC_CFG1_RX_FLOW); if (adapter->flowcontrol == FLOW_RXONLY || - adapter->flowcontrol == FLOW_BOTH) + adapter->flowcontrol == FLOW_BOTH) cfg1 |= ET_MAC_CFG1_RX_FLOW; wr
[PATCH 3/4] staging: et131x: Add auto-negotiation and 1000BT_Half as supported protocols
The driver supports auto-negotiation and 100BaetT_Half but doesn't advertise or list it in it's phydev. Fix that. Signed-off-by: Mark Einon --- drivers/staging/et131x/et131x.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 9819e0e..1ac9e7e 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -3643,18 +3643,20 @@ static int et131x_mii_probe(struct net_device *netdev) return PTR_ERR(phydev); } - phydev->supported &= (SUPPORTED_10baseT_Half - | SUPPORTED_10baseT_Full - | SUPPORTED_100baseT_Half - | SUPPORTED_100baseT_Full - | SUPPORTED_Autoneg - | SUPPORTED_MII - | SUPPORTED_TP); + phydev->supported &= (SUPPORTED_10baseT_Half | + SUPPORTED_10baseT_Full | + SUPPORTED_100baseT_Half | + SUPPORTED_100baseT_Full | + SUPPORTED_Autoneg | + SUPPORTED_MII | + SUPPORTED_TP); if (adapter->pdev->device != ET131X_PCI_DEVICE_ID_FAST) - phydev->supported |= SUPPORTED_1000baseT_Full; + phydev->supported |= SUPPORTED_1000baseT_Half | +SUPPORTED_1000baseT_Full; phydev->advertising = phydev->supported; + phydev->autoneg = AUTONEG_ENABLE; adapter->phydev = phydev; dev_info(&adapter->pdev->dev, -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: et131x: Remove dead code in isr
Dan Carpenter reports: The patch c2ebf58ba089: "staging: et131x: Implement NAPI support" from Aug 21, 2014, leads to the following static checker warning: drivers/staging/et131x/et131x.c:4004 et131x_isr() warn: we tested 'status' before and it was 'true' We don't actually need the dead code, as we're now using NAPI to handle enabling interrupts - but we do need to enable interrupts if NAPI is not scheduled - so enable interrupts if this is the case. Reported-by: Dan Carpenter Signed-off-by: Mark Einon --- drivers/staging/et131x/et131x.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 1037d93..7a1df8a 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -3793,6 +3793,7 @@ static SIMPLE_DEV_PM_OPS(et131x_pm_ops, et131x_suspend, et131x_resume); static irqreturn_t et131x_isr(int irq, void *dev_id) { bool handled = true; + bool enable_interrupts = true; struct net_device *netdev = (struct net_device *)dev_id; struct et131x_adapter *adapter = netdev_priv(netdev); struct address_map __iomem *iomem = adapter->regs; @@ -3802,6 +3803,7 @@ static irqreturn_t et131x_isr(int irq, void *dev_id) if (!netif_device_present(netdev)) { handled = false; + enable_interrupts = false; goto out; } @@ -3847,8 +3849,10 @@ static irqreturn_t et131x_isr(int irq, void *dev_id) status &= ~ET_INTR_WATCHDOG; } - if (status & (ET_INTR_RXDMA_XFR_DONE | ET_INTR_TXDMA_ISR)) + if (status & (ET_INTR_RXDMA_XFR_DONE | ET_INTR_TXDMA_ISR)) { + enable_interrupts = false; napi_schedule(&adapter->napi); + } status &= ~(ET_INTR_TXDMA_ISR | ET_INTR_RXDMA_XFR_DONE); @@ -4001,16 +4005,10 @@ static irqreturn_t et131x_isr(int irq, void *dev_id) */ } - if (!status) { - /* This interrupt has in some way been "handled" by -* the ISR. Either it was a spurious Rx interrupt, or -* it was a Tx interrupt that has been filtered by -* the ISR. -*/ +out: + if (enable_interrupts) et131x_enable_interrupts(adapter); - } -out: return IRQ_RETVAL(handled); } @@ -4257,7 +4255,7 @@ static void et131x_multicast(struct net_device *netdev) } /* et131x_tx - The handler to tx a packet on the device */ -static int et131x_tx(struct sk_buff *skb, struct net_device *netdev) +static netdev_tx_t et131x_tx(struct sk_buff *skb, struct net_device *netdev) { int status = 0; struct et131x_adapter *adapter = netdev_priv(netdev); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8821ae: base: add missing blank line after declaration
Add a missing blank line after declaration to fix coding style issue. Signed-off-by: An Ha --- drivers/staging/rtl8821ae/base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/rtl8821ae/base.c b/drivers/staging/rtl8821ae/base.c index 4a36da0..dbf28ce 100644 --- a/drivers/staging/rtl8821ae/base.c +++ b/drivers/staging/rtl8821ae/base.c @@ -364,6 +364,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) SET_IEEE80211_PERM_ADDR(hw, rtlefuse->dev_addr); } else { u8 rtlmac[] = { 0x00, 0xe0, 0x4c, 0x81, 0x92, 0x00 }; + get_random_bytes((rtlmac + (ETH_ALEN - 1)), 1); SET_IEEE80211_PERM_ADDR(hw, rtlmac); } @@ -553,6 +554,7 @@ static void _rtl_query_shortgi(struct ieee80211_hw *hw, struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); u8 rate_flag = info->control.rates[0].flags; u8 sgi_40 = 0, sgi_20 = 0, bw_40 = 0; + tcb_desc->use_shortgi = false; if (sta == NULL) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: comedi: hwdrv_apci1500: use dev->class_dev in calls to dev_warn()
git-grep reveals that hwdrv_apci1500.c is the only file in comedi that uses dev->hw_dev in calls to dev_{err,warn}(). The rest of the drivers pass dev->class_dev to these macros instead. Switch the dev_warn() calls in this driver to use dev->class_dev as well, for consistency. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- As an aside, it looks like lots of these cases are actually error conditions that might be more appropriate use cases for dev_err(). But they could be changed in a follow on patch, this is enough for this one. .../comedi/drivers/addi-data/hwdrv_apci1500.c | 104 ++--- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c index e637be1..0ea081e 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c @@ -176,7 +176,7 @@ static int apci1500_di_config(struct comedi_device *dev, if (data[0] == 2) { i_MaxChannel = 6; } else { - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "The specified port event does not exist\n"); return -EINVAL; } @@ -192,7 +192,7 @@ static int apci1500_di_config(struct comedi_device *dev, data[1] = APCI1500_OR_PRIORITY; break; default: - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "The specified interrupt logic does not exist\n"); return -EINVAL; } @@ -237,7 +237,7 @@ static int apci1500_di_config(struct comedi_device *dev, case 5: break; default: - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "The option indicated in the event mask does not exist\n"); return -EINVAL; } @@ -254,7 +254,7 @@ static int apci1500_di_config(struct comedi_device *dev, if (data[1] == APCI1500_OR_PRIORITY && i_PatternTransition != 0) { - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "Transition error on an OR PRIORITY logic\n"); return -EINVAL; } @@ -272,7 +272,7 @@ static int apci1500_di_config(struct comedi_device *dev, } if (i_PatternTransitionCount > 1) { - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "Transition error on an AND logic\n"); return -EINVAL; } @@ -346,7 +346,7 @@ static int apci1500_di_config(struct comedi_device *dev, APCI1500_Z8536_CONTROL_REGISTER); } else { - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "The choice for interrupt logic does not exist\n"); return -EINVAL; } @@ -446,7 +446,7 @@ static int apci1500_di_config(struct comedi_device *dev, devpriv->iobase + APCI1500_Z8536_CONTROL_REGISTER); } else { - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "The choice for interrupt logic does not exist\n"); return -EINVAL; } @@ -515,7 +515,7 @@ static int apci1500_di_write(struct comedi_device *dev, APCI1500_Z8536_CONTROL_REGISTER); } else { - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "Event 1 not initialised\n"); return -EINVAL; } @@ -551,13 +551,13 @@ static int apci1500_di_write(struct comedi_device *dev, APCI1500_Z8536_CONTROL_REGISTER); i_Event2InterruptStatus = 1; } else { - dev_warn(dev->hw_dev, + dev_warn(dev->class_dev, "Event 2 not initialised\n");
RE: [PATCH] staging: comedi: hwdrv_apci1500: use dev->class_dev in calls to dev_warn()
On Wednesday, September 03, 2014 4:59 PM, Chase Southwood wrote: > git-grep reveals that hwdrv_apci1500.c is the only file in comedi that uses > dev->hw_dev in calls to dev_{err,warn}(). The rest of the drivers pass > dev->class_dev to these macros instead. Switch the dev_warn() calls in > this driver to use dev->class_dev as well, for consistency. > > Signed-off-by: Chase Southwood > Cc: Ian Abbott > Cc: H Hartley Sweeten Hmm.. I thought I caught all of these. Thanks Reviewed-by: H Hartley Sweeten ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
For A Long Term Business Relationship,
Dear Sir/Madam, We are interested in purchasing your products , and we sincerely hope to establish a long-term business relationship with your esteemed company. Please kindly send me your catalog. Also, inform me about the Minimum Order Quantity,Delivery time or FOB /CIF, and payment terms warranty. Please contact us via email: binasstrad...@gmail.com Your early reply is highly appreciated. Thank You! Kind Attn: Howard Williams Company: Binas Trading Company LTD Address: 541 Jefferson Avenue City: Redwood Pin: 94063 State: California Country: USA Tel: +1-650-2496682 Fax: +1-603-2499360 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: lmv: lmv_internal.h: fix checkpatch.pl spacing errors
lmv_internal.h:96: ERROR: space prohibited after that open parenthesis '(' lmv_internal.h:96: ERROR: space required before the open parenthesis '(' lmv_internal.h:147: WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Juston Li --- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lmv/lmv_internal.h b/drivers/staging/lustre/lustre/lmv/lmv_internal.h index 80e6604..b911e76 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_internal.h +++ b/drivers/staging/lustre/lustre/lmv/lmv_internal.h @@ -93,7 +93,7 @@ static inline struct lmv_stripe_md *lmv_get_mea(struct ptlrpc_request *req) if (mea->mea_count == 0) return NULL; - if( mea->mea_magic != MEA_MAGIC_LAST_CHAR && + if (mea->mea_magic != MEA_MAGIC_LAST_CHAR && mea->mea_magic != MEA_MAGIC_ALL_CHARS && mea->mea_magic != MEA_MAGIC_HASH_SEGMENT) return NULL; @@ -144,7 +144,7 @@ struct lmv_tgt_desc *lmv_locate_mds(struct lmv_obd *lmv, struct md_op_data *op_data, struct lu_fid *fid); /* lproc_lmv.c */ -#if defined (CONFIG_PROC_FS) +#if defined(CONFIG_PROC_FS) void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars); #else static inline void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] drivers: staging: dgap: fix the checkpatch.pl issue "Warning: line over 80 characters"
Break lines exceeding 80 characters Signed-off-by: Piotr Witoslawski --- drivers/staging/dgap/dgap.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 8929dbf..67da1d5 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -88,7 +88,8 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file, struct channel_t *ch); static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg); -static int dgap_tty_digigeta(struct channel_t *ch, struct digi_t __user *retinfo); +static int dgap_tty_digigeta(struct channel_t *ch, +struct digi_t __user *retinfo); static int dgap_tty_digiseta(struct channel_t *ch, struct board_t *bd, struct un_t *un, struct digi_t __user *new_info); static int dgap_tty_digigetedelay(struct tty_struct *tty, int __user *retinfo); @@ -104,8 +105,9 @@ static void dgap_tty_flush_chars(struct tty_struct *tty); static void dgap_tty_flush_buffer(struct tty_struct *tty); static void dgap_tty_hangup(struct tty_struct *tty); static int dgap_wait_for_drain(struct tty_struct *tty); -static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, struct un_t *un, - unsigned int command, unsigned int __user *value); +static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, + struct un_t *un, unsigned int command, + unsigned int __user *value); static int dgap_get_modem_info(struct channel_t *ch, unsigned int __user *value); static int dgap_tty_digisetcustombaud(struct channel_t *ch, struct board_t *bd, @@ -3076,8 +3078,9 @@ static int dgap_get_modem_info(struct channel_t *ch, unsigned int __user *value) * * Set modem signals, called by ld. */ -static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, struct un_t *un, - unsigned int command, unsigned int __user *value) +static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, + struct un_t *un, unsigned int command, + unsigned int __user *value) { int ret; unsigned int arg; @@ -3153,7 +3156,8 @@ static int dgap_set_modem_info(struct channel_t *ch, struct board_t *bd, struct * * */ -static int dgap_tty_digigeta(struct channel_t *ch, struct digi_t __user *retinfo) +static int dgap_tty_digigeta(struct channel_t *ch, +struct digi_t __user *retinfo) { struct digi_t tmp; ulong lock_flags; -- 1.8.5.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel