Re: [PATCH] speakup: Add spinlock in synth_direct_store

2016-09-05 Thread Vaishali Thakkar


On Monday 05 September 2016 06:47 PM, Pavel Andrianov wrote:
> All operations with synth buffer should be protected,
> as there are global pointers, which should be modified atomically.
> 
> Found by Linux Driver Verification project (linuxtesting.org)
> 
> Signed-off-by: Pavel Andrianov 

Acked-by: Vaishali Thakkar 

> ---
>  drivers/staging/speakup/kobjects.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/staging/speakup/kobjects.c 
> b/drivers/staging/speakup/kobjects.c
> index 528cbdc..7fedee3 100644
> --- a/drivers/staging/speakup/kobjects.c
> +++ b/drivers/staging/speakup/kobjects.c
> @@ -411,11 +411,13 @@ static ssize_t synth_direct_store(struct kobject *kobj,
>   int len;
>   int bytes;
>   const char *ptr = buf;
> + unsigned long flags;
>  
>   if (!synth)
>   return -EPERM;
>  
>   len = strlen(buf);
> + spin_lock_irqsave(_info.spinlock, flags);
>   while (len > 0) {
>   bytes = min_t(size_t, len, 250);
>   strncpy(tmp, ptr, bytes);
> @@ -425,6 +427,7 @@ static ssize_t synth_direct_store(struct kobject *kobj,
>   ptr += bytes;
>   len -= bytes;
>   }
> + spin_unlock_irqrestore(_info.spinlock, flags);
>   return count;
>  }
>  
> 

-- 
Vaishali
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-05 Thread Ganesh Mahendran
2016-09-02 3:59 GMT+08:00 Arve Hjønnevåg :
> On Thu, Sep 1, 2016 at 12:02 PM, Greg KH  wrote:
>> On Thu, Sep 01, 2016 at 02:41:04PM +0800, Ganesh Mahendran wrote:
>>> VM_IOREMAP is used to access hardware through a mechanism called
>>> I/O mapped memory. Android binder is a IPC machanism which will
>>> not access I/O memory.
>>>
>>> Also VM_IOREMAP has alignment requiement which may not needed in
>>> binder.
>>> 
>>> __get_vm_area_node()
>>> {
>>> ...
>>> if (flags & VM_IOREMAP)
>>> align = 1ul << clamp_t(int, fls_long(size),
>>>PAGE_SHIFT, IOREMAP_MAX_ORDER);
>>> ...
>>> }
>>> 
>>>
>>> This patch use VM_ALLOC to get vm area.
>>>
>>> Signed-off-by: Ganesh Mahendran 
>>> ---
>>>  drivers/android/binder.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
>>> index 16288e7..3511d5c 100644
>>> --- a/drivers/android/binder.c
>>> +++ b/drivers/android/binder.c
>>> @@ -2885,7 +2885,7 @@ static int binder_mmap(struct file *filp, struct 
>>> vm_area_struct *vma)
>>>   goto err_already_mapped;
>>>   }
>>>
>>> - area = get_vm_area(vma->vm_end - vma->vm_start, VM_IOREMAP);
>>> + area = get_vm_area(vma->vm_end - vma->vm_start, VM_ALLOC);
>>>   if (area == NULL) {
>>>   ret = -ENOMEM;
>>>   failure_string = "get_vm_area";
>>
>> What change have you noticed with this patch?  Have you tested it?
>> Found that previously reserved iomemory is now free for binder to use
>> where it wasn't?  What kind of change does the system now run as because
>> of this?
>>
>> And are you _sure_ the alignment requirement isn't needed for binder?
>> Have you verified this with the userspace binder library?
>>
>> This is messy, tricky, stuff, I'm loath to change it without loads of
>> testing having happened...
>>
>> thanks,
>>
>> greg k-h
>
> There is no alignment requirement on this area unless
> cache_is_vipt_aliasing returns true. In that case the area needs to be
> aligned with vma->vm_start which is done manually in the code right
> after this allocation. If there are no other side effects of changing
> this flag this change should be safe, but please run all the tests at
> https://android.googlesource.com/platform/frameworks/native/+/master/libs/binder/tests/
> to test it.

Thanks for your suggestion.
I only did some android app performance test. I will do more binder test.

Thanks.

>
> --
> Arve Hjønnevåg
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-05 Thread Ganesh Mahendran
Hi, Greg:

2016-09-02 3:02 GMT+08:00 Greg KH :
> On Thu, Sep 01, 2016 at 02:41:04PM +0800, Ganesh Mahendran wrote:
>> VM_IOREMAP is used to access hardware through a mechanism called
>> I/O mapped memory. Android binder is a IPC machanism which will
>> not access I/O memory.
>>
>> Also VM_IOREMAP has alignment requiement which may not needed in
>> binder.
>> 
>> __get_vm_area_node()
>> {
>> ...
>> if (flags & VM_IOREMAP)
>> align = 1ul << clamp_t(int, fls_long(size),
>>PAGE_SHIFT, IOREMAP_MAX_ORDER);
>> ...
>> }
>> 
>>
>> This patch use VM_ALLOC to get vm area.
>>
>> Signed-off-by: Ganesh Mahendran 
>> ---
>>  drivers/android/binder.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
>> index 16288e7..3511d5c 100644
>> --- a/drivers/android/binder.c
>> +++ b/drivers/android/binder.c
>> @@ -2885,7 +2885,7 @@ static int binder_mmap(struct file *filp, struct 
>> vm_area_struct *vma)
>>   goto err_already_mapped;
>>   }
>>
>> - area = get_vm_area(vma->vm_end - vma->vm_start, VM_IOREMAP);
>> + area = get_vm_area(vma->vm_end - vma->vm_start, VM_ALLOC);
>>   if (area == NULL) {
>>   ret = -ENOMEM;
>>   failure_string = "get_vm_area";
>
> What change have you noticed with this patch?  Have you tested it?
> Found that previously reserved iomemory is now free for binder to use
> where it wasn't?  What kind of change does the system now run as because
> of this?

I did some sanity test in Android system.  I will do more test using:
https://android.googlesource.com/platform/frameworks/native/+/master/libs/binder/tests/

>
> And are you _sure_ the alignment requirement isn't needed for binder?
> Have you verified this with the userspace binder library?

I will do the binder test.

Thanks.

>
> This is messy, tricky, stuff, I'm loath to change it without loads of
> testing having happened...
>
> thanks,
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


hello devel

2016-09-05 Thread Nguyn u00c1nh ngc
hiya devel


http://www.izmirservisi.biz/particularly.php?deal=rd1pupds924vnct4e



Take care

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] speakup: Add spinlock in synth_direct_store

2016-09-05 Thread Samuel Thibault
Pavel Andrianov, on Mon 05 Sep 2016 16:17:47 +0300, wrote:
> All operations with synth buffer should be protected,
> as there are global pointers, which should be modified atomically.
> 
> Found by Linux Driver Verification project (linuxtesting.org)
> 
> Signed-off-by: Pavel Andrianov 

Reviewed-by: Samuel Thibault 

> ---
>  drivers/staging/speakup/kobjects.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/staging/speakup/kobjects.c 
> b/drivers/staging/speakup/kobjects.c
> index 528cbdc..7fedee3 100644
> --- a/drivers/staging/speakup/kobjects.c
> +++ b/drivers/staging/speakup/kobjects.c
> @@ -411,11 +411,13 @@ static ssize_t synth_direct_store(struct kobject *kobj,
>   int len;
>   int bytes;
>   const char *ptr = buf;
> + unsigned long flags;
>  
>   if (!synth)
>   return -EPERM;
>  
>   len = strlen(buf);
> + spin_lock_irqsave(_info.spinlock, flags);
>   while (len > 0) {
>   bytes = min_t(size_t, len, 250);
>   strncpy(tmp, ptr, bytes);
> @@ -425,6 +427,7 @@ static ssize_t synth_direct_store(struct kobject *kobj,
>   ptr += bytes;
>   len -= bytes;
>   }
> + spin_unlock_irqrestore(_info.spinlock, flags);
>   return count;
>  }
>  
> -- 
> 2.7.4
> 

-- 
Samuel
Linux, c'est simple : ça s'adresse à une machine qui est parfois un peu
maraboutée mais qui d'habitude n'a pas d'états d'âme. Sur Usenet y'a
plein d'humains et de primates, et ça devient vraiment gore par moment.
-+- TP in : Guide du linuxien pervers - "Le linuxien a-t-il une âme ?" -+-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: dgnc: Fix multi line comment alignment

2016-09-05 Thread Andrey Utkin
On Mon, Sep 05, 2016 at 08:28:32PM +0200, Fernando Apesteguia wrote:
> Fix alignment in multi line comment block.
> 
> Remove extra '*' to use the preferred comment style as in 
> Documentation/CodingStyle
> 
> Signed-off-by: Fernando Apesteguia 
> 
> ---
>  drivers/staging/dgnc/dgnc_driver.c | 50 
> +++---
>  1 file changed, 25 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_driver.c 
> b/drivers/staging/dgnc/dgnc_driver.c
> index cc6105a..01e948c 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -602,31 +602,31 @@ static void dgnc_do_remap(struct dgnc_board *brd)
>   brd->re_map_membase = ioremap(brd->membase, 0x1000);
>  }
>  
> -/*
> -*
> -* Function:
> -*
> -*dgnc_poll_handler
> -*
> -* Author:
> -*
> -*Scott H Kilau
> -*
> -* Parameters:
> -*
> -*dummy -- ignored
> -*
> -* Return Values:
> -*
> -*none
> -*
> -* Description:
> -*
> -*As each timer expires, it determines (a) whether the "transmit"
> -*waiter needs to be woken up, and (b) whether the poller needs to
> -*be rescheduled.
> -*
> -**/
> +/*
> + *
> + * Function:
> + *
> + *dgnc_poll_handler
> + *
> + * Author:
> + *
> + *Scott H Kilau
> + *
> + * Parameters:
> + *
> + *dummy -- ignored
> + *
> + * Return Values:
> + *
> + *none
> + *
> + * Description:
> + *
> + *As each timer expires, it determines (a) whether the "transmit"
> + *waiter needs to be woken up, and (b) whether the poller needs to
> + *be rescheduled.
> + *
> + */
>  
>  static void dgnc_poll_handler(ulong dummy)
>  {
> -- 
> 2.7.4

Changing first and last lines of that comment should be enough, but all
lines got changed. I'd (re)submit it with just first and last lines
changed.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: dgnc: Fix multi line comment alignment

2016-09-05 Thread Fernando Apesteguia
Fix alignment in multi line comment block.

Remove extra '*' to use the preferred comment style as in 
Documentation/CodingStyle

Signed-off-by: Fernando Apesteguia 

---
 drivers/staging/dgnc/dgnc_driver.c | 50 +++---
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.c 
b/drivers/staging/dgnc/dgnc_driver.c
index cc6105a..01e948c 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -602,31 +602,31 @@ static void dgnc_do_remap(struct dgnc_board *brd)
brd->re_map_membase = ioremap(brd->membase, 0x1000);
 }
 
-/*
-*
-* Function:
-*
-*dgnc_poll_handler
-*
-* Author:
-*
-*Scott H Kilau
-*
-* Parameters:
-*
-*dummy -- ignored
-*
-* Return Values:
-*
-*none
-*
-* Description:
-*
-*As each timer expires, it determines (a) whether the "transmit"
-*waiter needs to be woken up, and (b) whether the poller needs to
-*be rescheduled.
-*
-**/
+/*
+ *
+ * Function:
+ *
+ *dgnc_poll_handler
+ *
+ * Author:
+ *
+ *Scott H Kilau
+ *
+ * Parameters:
+ *
+ *dummy -- ignored
+ *
+ * Return Values:
+ *
+ *none
+ *
+ * Description:
+ *
+ *As each timer expires, it determines (a) whether the "transmit"
+ *waiter needs to be woken up, and (b) whether the poller needs to
+ *be rescheduled.
+ *
+ */
 
 static void dgnc_poll_handler(ulong dummy)
 {
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] Staging: comedi: das08_cs: Fix block comments use * on subsequent lines.

2016-09-05 Thread Amit Ghadge
Fixes checkpatch warning in das08_cs.c file:
WARNING: Block comments use * on subsequent lines

Added * in blank line in comment block.

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/das08_cs.c | 76 +++
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das08_cs.c 
b/drivers/staging/comedi/drivers/das08_cs.c
index 9c02b17..1ccaca7 100644
--- a/drivers/staging/comedi/drivers/das08_cs.c
+++ b/drivers/staging/comedi/drivers/das08_cs.c
@@ -1,43 +1,43 @@
 /*
-comedi/drivers/das08_cs.c
-DAS08 driver
-
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 2000 David A. Schleef 
-Copyright (C) 2001,2002,2003 Frank Mori Hess 
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-PCMCIA support code for this driver is adapted from the dummy_cs.c
-driver of the Linux PCMCIA Card Services package.
-
-The initial developer of the original code is David A. Hinds
-.  Portions created by David A. Hinds
-are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
-*/
+ * comedi/drivers/das08_cs.c
+ * DAS08 driver
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2000 David A. Schleef 
+ * Copyright (C) 2001,2002,2003 Frank Mori Hess 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * PCMCIA support code for this driver is adapted from the dummy_cs.c
+ * driver of the Linux PCMCIA Card Services package.
+ *
+ * The initial developer of the original code is David A. Hinds
+ * .  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ */
 /*
-Driver: das08_cs
-Description: DAS-08 PCMCIA boards
-Author: Warren Jasper, ds, Frank Hess
-Devices: [ComputerBoards] PCM-DAS08 (pcm-das08)
-Status: works
-
-This is the PCMCIA-specific support split off from the
-das08 driver.
-
-Options (for pcm-das08):
-   NONE
-
-Command support does not exist, but could be added for this board.
-*/
+ * Driver: das08_cs
+ * Description: DAS-08 PCMCIA boards
+ * Author: Warren Jasper, ds, Frank Hess
+ * Devices: [ComputerBoards] PCM-DAS08 (pcm-das08)
+ * Status: works
+ *
+ * This is the PCMCIA-specific support split off from the
+ * das08 driver.
+ *
+ * Options (for pcm-das08):
+ * NONE
+ *
+ * Command support does not exist, but could be added for this board.
+ */
 
 #include 
 
-- 
2.5.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-05 Thread Amit Ghadge
On Mon, Sep 5, 2016 at 9:42 PM, Ian Abbott  wrote:
> On 05/09/16 17:05, Amit Ghadge wrote:
>>
>> This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
>> WARNING: Block comments use * on subsequent lines
>>
>> Added * in blank line in comment block.
>>
>> Signed-off-by: Amit Ghadge 
>> ---
>>  drivers/staging/comedi/drivers/ni_daq_dio24.c | 60
>> +--
>>  1 file changed, 30 insertions(+), 30 deletions(-)
>
>
> I guess this replaces the other "v2" patch (which had a problem with blank
> lines in the comment blocks).  It looks okay, but could you repost it as
> "v3" to avoid confusion with the other patch?
>
>
> --
> -=( Ian Abbott @ MEV Ltd.E-mail:  )=-
> -=(  Web: http://www.mev.co.uk/  )=-

I have just send latest patch with "V3"

Amit G
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-05 Thread Amit Ghadge
This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
WARNING: Block comments use * on subsequent lines

Added * in blank line in comment block.

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/ni_daq_dio24.c | 60 +--
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c 
b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index d9de83a..32eaf2c 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -1,35 +1,35 @@
 /*
-comedi/drivers/ni_daq_dio24.c
-Driver for National Instruments PCMCIA DAQ-Card DIO-24
-Copyright (C) 2002 Daniel Vecino Castel 
-
-PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
-2001/08/24 12:13:13 from the pcmcia package.
-The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
-.  Portions created by David A. Hinds
-are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * comedi/drivers/ni_daq_dio24.c
+ * Driver for National Instruments PCMCIA DAQ-Card DIO-24
+ * Copyright (C) 2002 Daniel Vecino Castel 
+ *
+ * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
+ * 2001/08/24 12:13:13 from the pcmcia package.
+ * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
+ * .  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 /*
-Driver: ni_daq_dio24
-Description: National Instruments PCMCIA DAQ-Card DIO-24
-Author: Daniel Vecino Castel 
-Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
-Status: ?
-Updated: Thu, 07 Nov 2002 21:53:06 -0800
-
-This is just a wrapper around the 8255.o driver to properly handle
-the PCMCIA interface.
-*/
+ * Driver: ni_daq_dio24
+ * Description: National Instruments PCMCIA DAQ-Card DIO-24
+ * Author: Daniel Vecino Castel 
+ * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
+ * Status: ?
+ * Updated: Thu, 07 Nov 2002 21:53:06 -0800
+ *
+ * This is just a wrapper around the 8255.o driver to properly handle
+ * the PCMCIA interface.
+ */
 
 #include 
 #include "../comedi_pcmcia.h"
-- 
2.5.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-05 Thread Ian Abbott

On 05/09/16 17:05, Amit Ghadge wrote:

This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
WARNING: Block comments use * on subsequent lines

Added * in blank line in comment block.

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/ni_daq_dio24.c | 60 +--
 1 file changed, 30 insertions(+), 30 deletions(-)


I guess this replaces the other "v2" patch (which had a problem with 
blank lines in the comment blocks).  It looks okay, but could you repost 
it as "v3" to avoid confusion with the other patch?


--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: DIRECTOR IN CHARGE: DR.PATRICE TEME

2016-09-05 Thread U N-Headquarters
United Nations Compensation Unit, In Affiliation with World Bank Our Ref: 
U.N.O/W.B.O/20/06/2016/05/09/1982.


Congratulations Beneficiary,



We have been working closely with the INTERPOL, CIA, FBI and other foreign 
international organizations as well as Western Union and Money Gram regarding 
all payments you have made in the past and we have the complete lists and 
amount you have made so far. However, until this moment you have failed to 
receive your payment. We must get you informed that the previous official you 
have dealt with have been apprehended and would soon be charged to court and 
brought to justice.

We have been having a meeting for quit sometime now and we just came to a 
logical conclusion 72 hours ago in affiliation with the World Bank president. 
Your email was listed among those that are yet to receive their compensation 
payment. The United Nations in Affiliation with World Bank have agreed to 
compensate them with the sum of USD100, 000.00 (One Hundred Thousand United 
States Dollars) only.

For this reason you are to receive your payment through a certified ATM MASTER 
CARD. With this Master Card you can withdraw money from any part of the World 
without being disturbed or delay and please for no reason should you disclose 
your account information as your account information is not and can never be 
needed before you receive your card payment.

All that is required of your now is to Contact DR.PATRICE TEME. of MAGNUM BANK 
PLC PAYMENT CENTER Below is her contact information:

DIRECTOR IN CHARGE: DR.PATRICE TEME
E-MAIL:info-magnumb...@smallinvestors.net
TELEPHONE:+234-8102086350
FAX: +234-1-8968850

We write to get you informed that everyone have been receiving their card 
payments and until this moment you have refuses to receives yours.

Below is the tracking number of beneficiaries from USA and BAHRAIN that have 
received their payment in this month of May without any problems.

Beneficiary: Eric Fail
Tracking number: 4174072442
Country: U.S.A
Website: www.dhl.com


And

Beneficiary: Mohammed Al Aswad
Tracking number: 4174074262
Country: Bahrain
Website: www.dhl.com

You can track for yourself for further assurances. Please ensure that you 
follow the directives and instructions of DR.PATRICE TEME so that within 72 
hours you would have received your card payment and your secret pin code issued 
directly to you for security reasons.

We apologize on behalf of the United Nation organization for any delay you 
might have encountered in receiving your fund in the past.


Congratulations, and I look forward to hear from you as soon as you confirm 
your payment making the world a better place.

Yours Faithfully,

Mr. Wu Hongbo

Under-Secretary-General for Economic and Social Affairs
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-05 Thread Amit Ghadge
This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
WARNING: Block comments use * on subsequent lines

Added * in blank line in comment block.

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/ni_daq_dio24.c | 60 +--
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c 
b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index d9de83a..32eaf2c 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -1,35 +1,35 @@
 /*
-comedi/drivers/ni_daq_dio24.c
-Driver for National Instruments PCMCIA DAQ-Card DIO-24
-Copyright (C) 2002 Daniel Vecino Castel 
-
-PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
-2001/08/24 12:13:13 from the pcmcia package.
-The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
-.  Portions created by David A. Hinds
-are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * comedi/drivers/ni_daq_dio24.c
+ * Driver for National Instruments PCMCIA DAQ-Card DIO-24
+ * Copyright (C) 2002 Daniel Vecino Castel 
+ *
+ * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
+ * 2001/08/24 12:13:13 from the pcmcia package.
+ * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
+ * .  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 /*
-Driver: ni_daq_dio24
-Description: National Instruments PCMCIA DAQ-Card DIO-24
-Author: Daniel Vecino Castel 
-Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
-Status: ?
-Updated: Thu, 07 Nov 2002 21:53:06 -0800
-
-This is just a wrapper around the 8255.o driver to properly handle
-the PCMCIA interface.
-*/
+ * Driver: ni_daq_dio24
+ * Description: National Instruments PCMCIA DAQ-Card DIO-24
+ * Author: Daniel Vecino Castel 
+ * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
+ * Status: ?
+ * Updated: Thu, 07 Nov 2002 21:53:06 -0800
+ *
+ * This is just a wrapper around the 8255.o driver to properly handle
+ * the PCMCIA interface.
+ */
 
 #include 
 #include "../comedi_pcmcia.h"
-- 
2.5.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-05 Thread Amit Ghadge
This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
WARNING: Block comments use * on subsequent lines

Added * in blank line in comment block.

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/ni_daq_dio24.c | 52 +--
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c 
b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index d9de83a..ff3716c 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -1,35 +1,35 @@
 /*
-comedi/drivers/ni_daq_dio24.c
-Driver for National Instruments PCMCIA DAQ-Card DIO-24
-Copyright (C) 2002 Daniel Vecino Castel 
+ * comedi/drivers/ni_daq_dio24.c
+ * Driver for National Instruments PCMCIA DAQ-Card DIO-24
+ * Copyright (C) 2002 Daniel Vecino Castel 
 
-PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
-2001/08/24 12:13:13 from the pcmcia package.
-The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
-.  Portions created by David A. Hinds
-are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
+ * 2001/08/24 12:13:13 from the pcmcia package.
+ * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
+ * .  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 /*
-Driver: ni_daq_dio24
-Description: National Instruments PCMCIA DAQ-Card DIO-24
-Author: Daniel Vecino Castel 
-Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
-Status: ?
-Updated: Thu, 07 Nov 2002 21:53:06 -0800
+ * Driver: ni_daq_dio24
+ * Description: National Instruments PCMCIA DAQ-Card DIO-24
+ * Author: Daniel Vecino Castel 
+ * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
+ * Status: ?
+ * Updated: Thu, 07 Nov 2002 21:53:06 -0800
 
-This is just a wrapper around the 8255.o driver to properly handle
-the PCMCIA interface.
-*/
+ * This is just a wrapper around the 8255.o driver to properly handle
+ * the PCMCIA interface.
+ */
 
 #include 
 #include "../comedi_pcmcia.h"
-- 
2.5.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-05 Thread Amit Ghadge
On Mon, Sep 5, 2016 at 6:45 PM, Ian Abbott  wrote:
> On 03/09/16 21:11, Amit Ghadge wrote:
>>
>> This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
>>
>> WARNING: Block comments use * on subsequent lines
>>
>> Signed-off-by: Amit Ghadge 
>> ---
>>  drivers/staging/comedi/drivers/ni_daq_dio24.c | 52
>> +--
>>  1 file changed, 26 insertions(+), 26 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c
>> b/drivers/staging/comedi/drivers/ni_daq_dio24.c
>> index d9de83a..ff3716c 100644
>> --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
>> +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
>> @@ -1,35 +1,35 @@
>>  /*
>> -comedi/drivers/ni_daq_dio24.c
>> -Driver for National Instruments PCMCIA DAQ-Card DIO-24
>> -Copyright (C) 2002 Daniel Vecino Castel 
>> + * comedi/drivers/ni_daq_dio24.c
>> + * Driver for National Instruments PCMCIA DAQ-Card DIO-24
>> + * Copyright (C) 2002 Daniel Vecino Castel 
>>
>> -PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
>> -2001/08/24 12:13:13 from the pcmcia package.
>> -The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
>> -.  Portions created by David A. Hinds
>> -are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
>> + * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
>> + * 2001/08/24 12:13:13 from the pcmcia package.
>> + * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
>> + * .  Portions created by David A. Hinds
>> + * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
>>
>> -This program is free software; you can redistribute it and/or modify
>> -it under the terms of the GNU General Public License as published by
>> -the Free Software Foundation; either version 2 of the License, or
>> -(at your option) any later version.
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>>
>> -This program is distributed in the hope that it will be useful,
>> -but WITHOUT ANY WARRANTY; without even the implied warranty of
>> -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> -GNU General Public License for more details.
>> -*/
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + */
>
>
> The blank lines in that comment block should also have the " *" so it has an
> unbroken, vertical line of "*" down the left side of the comment block.
>
>>  /*
>> -Driver: ni_daq_dio24
>> -Description: National Instruments PCMCIA DAQ-Card DIO-24
>> -Author: Daniel Vecino Castel 
>> -Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
>> -Status: ?
>> -Updated: Thu, 07 Nov 2002 21:53:06 -0800
>> + * Driver: ni_daq_dio24
>> + * Description: National Instruments PCMCIA DAQ-Card DIO-24
>> + * Author: Daniel Vecino Castel 
>> + * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
>> + * Status: ?
>> + * Updated: Thu, 07 Nov 2002 21:53:06 -0800
>>
>> -This is just a wrapper around the 8255.o driver to properly handle
>> -the PCMCIA interface.
>> -*/
>> + * This is just a wrapper around the 8255.o driver to properly handle
>> + * the PCMCIA interface.
>> + */
>
>
> Same thing there.
>
> --
> -=( Ian Abbott @ MEV Ltd.E-mail:  )=-
> -=(  Web: http://www.mev.co.uk/  )=-


I will be send updated patch.

Amit G
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.

2016-09-05 Thread Amit Ghadge
On Mon, Sep 5, 2016 at 7:02 PM, Ian Abbott  wrote:
> On 03/09/16 21:11, Amit Ghadge wrote:
>>
>> Fixes checkpatch warning:
>> WARNING: Block comments use * on subsequent lines
>>
>> Replace (1<<7) by BIT(7) in the file ni_670x.c to get rid
>> of checkpatch.pl "CHECK" output "Prefer using the BIT macro".
>> Replace Avoid CamelCase range_0_20mA to range_0_20ma.
>>
>> Signed-off-by: Amit Ghadge 
>> ---
>>  drivers/staging/comedi/drivers/ni_670x.c | 66
>> 
>>  1 file changed, 32 insertions(+), 34 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/ni_670x.c
>> b/drivers/staging/comedi/drivers/ni_670x.c
>> index 3e7271880..86d26aa 100644
>> --- a/drivers/staging/comedi/drivers/ni_670x.c
>> +++ b/drivers/staging/comedi/drivers/ni_670x.c
>> @@ -1,40 +1,38 @@
>>  /*
>> -comedi/drivers/ni_670x.c
>> -Hardware driver for NI 670x devices
>> -
>> -COMEDI - Linux Control and Measurement Device Interface
>> -Copyright (C) 1997-2001 David A. Schleef 
>> -
>> -This program is free software; you can redistribute it and/or modify
>> -it under the terms of the GNU General Public License as published by
>> -the Free Software Foundation; either version 2 of the License, or
>> -(at your option) any later version.
>> -
>> -This program is distributed in the hope that it will be useful,
>> -but WITHOUT ANY WARRANTY; without even the implied warranty of
>> -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> -GNU General Public License for more details.
>> -*/
>> + * comedi/drivers/ni_670x.c
>> + * Hardware driver for NI 670x devices
>> +
>> + * COMEDI - Linux Control and Measurement Device Interface
>> + * Copyright (C) 1997-2001 David A. Schleef 
>> +
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> +
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + */
>>  /*
>> -Driver: ni_670x
>> -Description: National Instruments 670x
>> -Author: Bart Joris 
>> -Updated: Wed, 11 Dec 2002 18:25:35 -0800
>> -Devices: [National Instruments] PCI-6703 (ni_670x), PCI-6704
>> -Status: unknown
>> -
>> -Commands are not supported.
>> -*/
>> -
>> + * Driver: ni_670x
>> + * Description: National Instruments 670x
>> + * Author: Bart Joris 
>> + * Updated: Wed, 11 Dec 2002 18:25:35 -0800
>> + * Devices: [National Instruments] PCI-6703 (ni_670x), PCI-6704
>> + * Status: unknown
>> +
>> + * Commands are not supported.
>> + */
>>  /*
>> -   Bart Joris  Last updated on 20/08/2001
>> -
>> -   Manuals:
>> + * Bart Joris  Last updated on 20/08/2001
>>
>> -   322110a.pdf PCI/PXI-6704 User Manual
>> -   322110b.pdf PCI/PXI-6703/6704 User Manual
>> + * Manuals:
>>
>> -*/
>> + * 322110a.pdf PCI/PXI-6704 User Manual
>> + * 322110b.pdf PCI/PXI-6703/6704 User Manual
>> + */
>
>
> In addition to the problems mentioned by Greg, the blank lines in those
> comment blocks also need a " *" to give an unbroken line of "*" down the
> left hand side of the comment block.
>
>>  #include 
>>  #include 
>> @@ -147,7 +145,7 @@ static int ni_670x_dio_insn_config(struct
>> comedi_device *dev,
>>
>>  /* ripped from mite.h and mite_setup2() to avoid mite dependency */
>>  #define MITE_IODWBSR   0xc0 /* IO Device Window Base Size Register */
>> -#define WENAB  (1 << 7) /* window enable */
>> +#define WENAB  BIT(7) /* window enable */
>>
>>  static int ni_670x_mite_init(struct pci_dev *pcidev)
>>  {
>> @@ -222,7 +220,7 @@ static int ni_670x_auto_attach(struct comedi_device
>> *dev,
>> s->range_table_list = range_table_list;
>> for (i = 0; i < 16; i++) {
>> range_table_list[i] = _bipolar10;
>> -   range_table_list[16 + i] = _0_20mA;
>> +   range_table_list[16 + i] = _0_20ma;
>
>
> You can't just rename variables shared by other modules like that. Besides,
> the "mA" suffix is perfectly fine here, because it is the correct S.I.
> suffix for "milliamps".  (Comedi doesn't bother adding a "V" suffix for
> voltage range variables, as in the "range_bipolar10" variable below, but it
> does add a suffix for the less common units such as milliamps.)
>

Hi Ian,

Thanks, for response. I never do that changes.

This patch is failed, please ignore this.


>> }
>> } else {
>> s->range_table = _bipolar10;
>>
>
>
> --
> -=( Ian Abbott @ MEV 

Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.

2016-09-05 Thread Ian Abbott

On 03/09/16 21:11, Amit Ghadge wrote:

Fixes checkpatch warning:
WARNING: Block comments use * on subsequent lines

Replace (1<<7) by BIT(7) in the file ni_670x.c to get rid
of checkpatch.pl "CHECK" output "Prefer using the BIT macro".
Replace Avoid CamelCase range_0_20mA to range_0_20ma.

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/ni_670x.c | 66 
 1 file changed, 32 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_670x.c 
b/drivers/staging/comedi/drivers/ni_670x.c
index 3e7271880..86d26aa 100644
--- a/drivers/staging/comedi/drivers/ni_670x.c
+++ b/drivers/staging/comedi/drivers/ni_670x.c
@@ -1,40 +1,38 @@
 /*
-comedi/drivers/ni_670x.c
-Hardware driver for NI 670x devices
-
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 1997-2001 David A. Schleef 
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * comedi/drivers/ni_670x.c
+ * Hardware driver for NI 670x devices
+
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1997-2001 David A. Schleef 
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 /*
-Driver: ni_670x
-Description: National Instruments 670x
-Author: Bart Joris 
-Updated: Wed, 11 Dec 2002 18:25:35 -0800
-Devices: [National Instruments] PCI-6703 (ni_670x), PCI-6704
-Status: unknown
-
-Commands are not supported.
-*/
-
+ * Driver: ni_670x
+ * Description: National Instruments 670x
+ * Author: Bart Joris 
+ * Updated: Wed, 11 Dec 2002 18:25:35 -0800
+ * Devices: [National Instruments] PCI-6703 (ni_670x), PCI-6704
+ * Status: unknown
+
+ * Commands are not supported.
+ */
 /*
-   Bart Joris  Last updated on 20/08/2001
-
-   Manuals:
+ * Bart Joris  Last updated on 20/08/2001

-   322110a.pdf PCI/PXI-6704 User Manual
-   322110b.pdf PCI/PXI-6703/6704 User Manual
+ * Manuals:

-*/
+ * 322110a.pdf PCI/PXI-6704 User Manual
+ * 322110b.pdf PCI/PXI-6703/6704 User Manual
+ */


In addition to the problems mentioned by Greg, the blank lines in those 
comment blocks also need a " *" to give an unbroken line of "*" down the 
left hand side of the comment block.



 #include 
 #include 
@@ -147,7 +145,7 @@ static int ni_670x_dio_insn_config(struct comedi_device 
*dev,

 /* ripped from mite.h and mite_setup2() to avoid mite dependency */
 #define MITE_IODWBSR   0xc0 /* IO Device Window Base Size Register */
-#define WENAB  (1 << 7) /* window enable */
+#define WENAB  BIT(7) /* window enable */

 static int ni_670x_mite_init(struct pci_dev *pcidev)
 {
@@ -222,7 +220,7 @@ static int ni_670x_auto_attach(struct comedi_device *dev,
s->range_table_list = range_table_list;
for (i = 0; i < 16; i++) {
range_table_list[i] = _bipolar10;
-   range_table_list[16 + i] = _0_20mA;
+   range_table_list[16 + i] = _0_20ma;


You can't just rename variables shared by other modules like that. 
Besides, the "mA" suffix is perfectly fine here, because it is the 
correct S.I. suffix for "milliamps".  (Comedi doesn't bother adding a 
"V" suffix for voltage range variables, as in the "range_bipolar10" 
variable below, but it does add a suffix for the less common units such 
as milliamps.)



}
} else {
s->range_table = _bipolar10;




--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] speakup: Add spinlock in synth_direct_store

2016-09-05 Thread Pavel Andrianov
All operations with synth buffer should be protected,
as there are global pointers, which should be modified atomically.

Found by Linux Driver Verification project (linuxtesting.org)

Signed-off-by: Pavel Andrianov 
---
 drivers/staging/speakup/kobjects.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/staging/speakup/kobjects.c 
b/drivers/staging/speakup/kobjects.c
index 528cbdc..7fedee3 100644
--- a/drivers/staging/speakup/kobjects.c
+++ b/drivers/staging/speakup/kobjects.c
@@ -411,11 +411,13 @@ static ssize_t synth_direct_store(struct kobject *kobj,
int len;
int bytes;
const char *ptr = buf;
+   unsigned long flags;
 
if (!synth)
return -EPERM;
 
len = strlen(buf);
+   spin_lock_irqsave(_info.spinlock, flags);
while (len > 0) {
bytes = min_t(size_t, len, 250);
strncpy(tmp, ptr, bytes);
@@ -425,6 +427,7 @@ static ssize_t synth_direct_store(struct kobject *kobj,
ptr += bytes;
len -= bytes;
}
+   spin_unlock_irqrestore(_info.spinlock, flags);
return count;
 }
 
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-05 Thread Ian Abbott

On 03/09/16 21:11, Amit Ghadge wrote:

This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:

WARNING: Block comments use * on subsequent lines

Signed-off-by: Amit Ghadge 
---
 drivers/staging/comedi/drivers/ni_daq_dio24.c | 52 +--
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c 
b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index d9de83a..ff3716c 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -1,35 +1,35 @@
 /*
-comedi/drivers/ni_daq_dio24.c
-Driver for National Instruments PCMCIA DAQ-Card DIO-24
-Copyright (C) 2002 Daniel Vecino Castel 
+ * comedi/drivers/ni_daq_dio24.c
+ * Driver for National Instruments PCMCIA DAQ-Card DIO-24
+ * Copyright (C) 2002 Daniel Vecino Castel 

-PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
-2001/08/24 12:13:13 from the pcmcia package.
-The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
-.  Portions created by David A. Hinds
-are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
+ * 2001/08/24 12:13:13 from the pcmcia package.
+ * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
+ * .  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.

-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.

-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */


The blank lines in that comment block should also have the " *" so it 
has an unbroken, vertical line of "*" down the left side of the comment 
block.



 /*
-Driver: ni_daq_dio24
-Description: National Instruments PCMCIA DAQ-Card DIO-24
-Author: Daniel Vecino Castel 
-Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
-Status: ?
-Updated: Thu, 07 Nov 2002 21:53:06 -0800
+ * Driver: ni_daq_dio24
+ * Description: National Instruments PCMCIA DAQ-Card DIO-24
+ * Author: Daniel Vecino Castel 
+ * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
+ * Status: ?
+ * Updated: Thu, 07 Nov 2002 21:53:06 -0800

-This is just a wrapper around the 8255.o driver to properly handle
-the PCMCIA interface.
-*/
+ * This is just a wrapper around the 8255.o driver to properly handle
+ * the PCMCIA interface.
+ */


Same thing there.

--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.

2016-09-05 Thread Ian Abbott

On 04/09/16 11:15, Amit Ghadge wrote:

I will be send individual patches.

I was try,
 make M=drivers/staging/comedi/

No issue generated, Is there have any other option to test these changes?


You need to configure the kernel to build the drivers you are changing.

Also, please don't top-post!




Amit G

On Sun, Sep 4, 2016 at 2:05 PM, Greg KH  wrote:

On Sun, Sep 04, 2016 at 01:41:03AM +0530, Amit Ghadge wrote:

Fixes checkpatch warning:
WARNING: Block comments use * on subsequent lines

Replace (1<<7) by BIT(7) in the file ni_670x.c to get rid
of checkpatch.pl "CHECK" output "Prefer using the BIT macro".
Replace Avoid CamelCase range_0_20mA to range_0_20ma.


That's multiple things in the same patch, and you didn't even test build
your change :(

Please do better than this in the future.

greg k-h



--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: ks7010: fix warning on return for void functions

2016-09-05 Thread Hariharan R
This patch fixes the checkpatch warning in ks7010_sdio.c
'void function return statements are not generally useful'

Signed-off-by: Hariharan R 
---
 drivers/staging/ks7010/ks7010_sdio.c | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 47b69cb..6dd1529 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -115,7 +115,6 @@ void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private 
*priv)
 
  out:
priv->sleep_mode = atomic_read(>sleepstatus.status);
-   return;
 }
 
 void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
@@ -146,7 +145,6 @@ void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private 
*priv)
 
  out:
priv->sleep_mode = atomic_read(>sleepstatus.status);
-   return;
 }
 
 void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
@@ -357,7 +355,6 @@ static void tx_device_task(void *dev)
   >ks_wlan_hw.rw_wq, 0);
}
}
-   return;
 }
 
 int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
@@ -405,8 +402,6 @@ static void rx_event_task(unsigned long dev)
tasklet_schedule(>ks_wlan_hw.rx_bh_task);
}
}
-
-   return;
 }
 
 static void ks_wlan_hw_rx(void *dev, uint16_t size)
@@ -557,8 +552,6 @@ static void ks7010_rw_function(struct work_struct *work)
 
  err_out:
sdio_release_host(priv->ks_wlan_hw.sdio_card->func);
-
-   return;
 }
 
 static void ks_sdio_interrupt(struct sdio_func *func)
@@ -666,7 +659,6 @@ static void ks_sdio_interrupt(struct sdio_func *func)
  intr_out:
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
   >ks_wlan_hw.rw_wq, 0);
-   return;
 }
 
 static int trx_device_init(struct ks_wlan_private *priv)
@@ -701,8 +693,6 @@ static void trx_device_exit(struct ks_wlan_private *priv)
}
 
tasklet_kill(>ks_wlan_hw.rx_bh_task);
-
-   return;
 }
 
 static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index)
@@ -1210,7 +1200,6 @@ static void ks7010_sdio_remove(struct sdio_func *func)
DPRINTK(1, "kfree()\n");
 
DPRINTK(5, " Bye !!\n");
-   return;
 }
 
 static struct sdio_driver ks7010_sdio_driver = {
-- 
2.1.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: media: omap4iss: mark omap4iss_flush() static

2016-09-05 Thread Laurent Pinchart
Hi Baoyou,

Thank you for the patch.

On Sunday 04 Sep 2016 14:41:41 Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/staging/media/omap4iss/iss.c:64:6: warning: no previous prototype
> for 'omap4iss_flush' [-Wmissing-prototypes]
> 
> In fact, this function is only used in the file in which it is
> declared and don't need a declaration, but can be made static.
> so this patch marks this function with 'static'.
> 
> Signed-off-by: Baoyou Xie 

Acked-by: Laurent Pinchart 

> ---
>  drivers/staging/media/omap4iss/iss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/omap4iss/iss.c
> b/drivers/staging/media/omap4iss/iss.c index 6ceb4eb..e27c7a9 100644
> --- a/drivers/staging/media/omap4iss/iss.c
> +++ b/drivers/staging/media/omap4iss/iss.c
> @@ -61,7 +61,7 @@ static void iss_print_status(struct iss_device *iss)
>   * See this link for reference:
>   *   http://www.mail-archive.com/linux-omap@vger.kernel.org/msg08149.html
>   */
> -void omap4iss_flush(struct iss_device *iss)
> +static void omap4iss_flush(struct iss_device *iss)
>  {
>   iss_reg_write(iss, OMAP4_ISS_MEM_TOP, ISS_HL_REVISION, 0);
>   iss_reg_read(iss, OMAP4_ISS_MEM_TOP, ISS_HL_REVISION);

-- 
Regards,

Laurent Pinchart

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: media: omap4iss: mark omap4iss_flush() static

2016-09-05 Thread Arnd Bergmann
On Sunday, September 4, 2016 2:41:41 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/staging/media/omap4iss/iss.c:64:6: warning: no previous prototype for 
> 'omap4iss_flush' [-Wmissing-prototypes]
> 
> In fact, this function is only used in the file in which it is
> declared and don't need a declaration, but can be made static.
> so this patch marks this function with 'static'.
> 
> Signed-off-by: Baoyou Xie 
> 

Acked-by: Arnd Bergmann 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: ks7010: mark symbols static where possible

2016-09-05 Thread Arnd Bergmann
On Sunday, September 4, 2016 2:38:39 PM CEST Baoyou Xie wrote:
> We get 2 warnings when building kernel with W=1:
> drivers/staging/ks7010/ks_hostif.c:72:6: warning: no previous prototype for 
> 'ks_wlan_hw_wakeup_task' [-Wmissing-prototypes]
> drivers/staging/ks7010/ks_hostif.c:1508:6: warning: no previous prototype for 
> 'hostif_infrastructure_set2_request' [-Wmissing-prototypes]
> 
> In fact, these functions are only used in the file in which they are
> declared and don't need a declaration, but can be made static.
> so this patch marks these functions with 'static'.
> 
> Signed-off-by: Baoyou Xie 
> 

Acked-by: Arnd Bergmann 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv2 1/4] staging: android: ion: Drop heap type masks

2016-09-05 Thread Brian Starkey

Hi,

On Fri, Sep 02, 2016 at 12:36:25PM -0700, Laura Abbott wrote:

On 09/02/2016 06:41 AM, Brian Starkey wrote:

Hi Laura,

On Thu, Sep 01, 2016 at 03:40:41PM -0700, Laura Abbott wrote:


There is no advantage to having heap types be a mask. The ion client has
long since dropped the mask. Drop the notion of heap type masks as well.



I know this is the same patch you sent last time, so sorry for not
picking this up then - but I'm curious what "The" ion client is here?



ion_client_create used to take a mask to indicate what heap types it
could allocate from. This hasn't been the case since 2bb9f5034ec7
("gpu: ion: Remove heapmask from client"). "The ion client" probably
should have been "struct ion_client"


Ah I see, the in-kernel ion_client. Sorry, I completely forgot that
even existed (because it's totally useless - how is a driver meant to
find the global ion_device?)




Our ion client(s) certainly still use these masks, and it's still
used as a mask within ion itself - even if the relationship between a
mask and a heap type has been somewhat lost.


Where is it used in Ion? I don't see it in tree unless I missed something
and I'm not eager to keep this around for out of tree code. What's the
actual use for this?


You're certainly right that these heap-ID-to-allocation-mask macros
are unused in the kernel, but I don't really see the reason for
removing them - they are convenient (for now).

Example: I'm using the dummy ion driver, and I want to allocate from
the SYSTEM_CONTIG heap - the ION_HEAP_SYSTEM_CONTIG_MASK gives me the
exact mask I need for that.

It seems your opinion is that heap-IDs are already, and should be,
completely decoupled from their type. That sounds like a good idea to
me, but it's not true (yet) - again check out the dummy driver.

At the moment, heap-IDs are assigned by ion drivers in any way they
see fit. For as long as that stays the case there's always going to
be heap-masks hard-coded in UAPI kernel headers (in-tree or not), so
removing these particular masks seems a bit fruitless.

I'd rather see driver-assigned heap-IDs disappear completely, and have
them assigned by ion core from an idr or something. At that point
these macros really *are* meaningless, and I'd be totally fine with
removing them (and userspace won't be able to depend on hard-coded
allocation masks any more - it will have to use the query ioctl,
which I assume is the whole point?).

IMO it's not the right time to remove these macros, because they still
have meaning and usefulness.

Cheers,
Brian





Thanks,
Brian


Signed-off-by: Laura Abbott 
---
drivers/staging/android/uapi/ion.h | 6 --
1 file changed, 6 deletions(-)

diff --git a/drivers/staging/android/uapi/ion.h 
b/drivers/staging/android/uapi/ion.h
index 0a8e40f..a9c4e8b 100644
--- a/drivers/staging/android/uapi/ion.h
+++ b/drivers/staging/android/uapi/ion.h
@@ -44,14 +44,8 @@ enum ion_heap_type {
  * must be last so device specific heaps always
  * are at the end of this enum
  */
-ION_NUM_HEAPS = 16,
};

-#define ION_HEAP_SYSTEM_MASK(1 << ION_HEAP_TYPE_SYSTEM)
-#define ION_HEAP_SYSTEM_CONTIG_MASK(1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
-#define ION_HEAP_CARVEOUT_MASK(1 << ION_HEAP_TYPE_CARVEOUT)
-#define ION_HEAP_TYPE_DMA_MASK(1 << ION_HEAP_TYPE_DMA)
-
#define ION_NUM_HEAP_IDS(sizeof(unsigned int) * 8)

/**
--
2.7.4




___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Samuel Thibault
Pavel Andrianov, on Mon 05 Sep 2016 13:33:33 +0300, wrote:
> synth_direct_store may be called via device_attributes interface.

Ah, right.

> In which function the lock should be added?

That'd be synth_direct_store then, around the while loop.

Samuel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Pavel Andrianov

05.09.2016 12:56, Samuel Thibault пишет:

Pavel Andrianov, on Mon 05 Sep 2016 12:54:10 +0300, wrote:

05.09.2016 12:43, Samuel Thibault пишет:

Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote:

There is a potential race in drivers/staging/speakup/speakup.ko.
All operations with global pointers buff_in and buff_out are performed
without any locks. Thus, a simultaneous write (via synth_buffer_clear or
synth_buffer_add) to the pointers may lead to inconsistent data.

Should a local lock be used here?


AIUI, all callers of these functions have speakup_info.spinlock held.


Regard a call stack

-> synth_direct_store
  -> synth_printf
-> synth_buffer_add

The functions have not held speakup_info.spinlock.


Apparently there is currently no caller of synth_direct_store and
synth_store. But taking the lock here would be needed indeed.

Samuel



synth_direct_store may be called via device_attributes interface. In 
which function the lock should be added?


--
Pavel Andrianov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: andria...@ispras.ru
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Samuel Thibault
Pavel Andrianov, on Mon 05 Sep 2016 12:54:10 +0300, wrote:
> 05.09.2016 12:43, Samuel Thibault пишет:
> >Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote:
> >>There is a potential race in drivers/staging/speakup/speakup.ko.
> >>All operations with global pointers buff_in and buff_out are performed
> >>without any locks. Thus, a simultaneous write (via synth_buffer_clear or
> >>synth_buffer_add) to the pointers may lead to inconsistent data.
> >>
> >>Should a local lock be used here?
> >
> >AIUI, all callers of these functions have speakup_info.spinlock held.
> 
> Regard a call stack
> 
> -> synth_direct_store
>   -> synth_printf
> -> synth_buffer_add
> 
> The functions have not held speakup_info.spinlock.

Apparently there is currently no caller of synth_direct_store and
synth_store. But taking the lock here would be needed indeed.

Samuel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Pavel Andrianov

05.09.2016 12:43, Samuel Thibault пишет:

Hello,

Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote:

There is a potential race in drivers/staging/speakup/speakup.ko.
All operations with global pointers buff_in and buff_out are performed
without any locks. Thus, a simultaneous write (via synth_buffer_clear or
synth_buffer_add) to the pointers may lead to inconsistent data.

Should a local lock be used here?


AIUI, all callers of these functions have speakup_info.spinlock held.

Samuel



Regard a call stack

-> synth_direct_store
  -> synth_printf
-> synth_buffer_add

The functions have not held speakup_info.spinlock.

--
Pavel Andrianov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: andria...@ispras.ru
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Samuel Thibault
Hello,

Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote:
> There is a potential race in drivers/staging/speakup/speakup.ko.
> All operations with global pointers buff_in and buff_out are performed
> without any locks. Thus, a simultaneous write (via synth_buffer_clear or
> synth_buffer_add) to the pointers may lead to inconsistent data.
> 
> Should a local lock be used here?

AIUI, all callers of these functions have speakup_info.spinlock held.

Samuel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Pavel Andrianov

Hi!

There is a potential race in drivers/staging/speakup/speakup.ko.
All operations with global pointers buff_in and buff_out are performed 
without any locks. Thus, a simultaneous write (via synth_buffer_clear or 
synth_buffer_add) to the pointers may lead to inconsistent data.


Should a local lock be used here?

--
Pavel Andrianov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: andria...@ispras.ru
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Letter of reference related to you

2016-09-05 Thread E E Frank
I sent you an email few days ago; I was wondering if you received it.
Could you please recheck and get back to me ASAP.? I'm contacting you
in regard to a deceased client of mine that bear the same surname with
yours .Please i will appreciate you get in touch to me for more
details, Best Regards, Ezuho

Letter of reference related to you
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel