Re: [PATCH v3] staging: vt6655: ioctl.c - missing __user annotation

2014-07-30 Thread Anil Shashikumar Belur

On Thursday 31 July 2014 05:38 AM, Greg KH wrote:
>
> This patch doesn't apply against my tree at all, what did you make it
> against?
>
> Always work against linux-next, or the staging-next branch of my
> staging.git tree on git.kernel.org.
>
> thanks,
>
> greg k-h
Hi,

I am working on staging.git. After rebasing with staging-next, git log
shows someone has recently submitted this fix.

Thanks,
Anil


--
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/


Re: [PATCH v3] staging: vt6655: ioctl.c - missing __user annotation

2014-07-30 Thread Anil Shashikumar Belur

On Thursday 31 July 2014 05:38 AM, Greg KH wrote:

 This patch doesn't apply against my tree at all, what did you make it
 against?

 Always work against linux-next, or the staging-next branch of my
 staging.git tree on git.kernel.org.

 thanks,

 greg k-h
Hi,

I am working on staging.git. After rebasing with staging-next, git log
shows someone has recently submitted this fix.

Thanks,
Anil


--
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/


Re: [PATCH 1/1] drivers: staging: vt6655: ioctl.c - missing __user annotation

2014-07-29 Thread Anil Shashikumar Belur

On Tuesday 29 July 2014 02:47 PM, Dan Carpenter wrote:
> On Tue, Jul 29, 2014 at 10:05:38AM +0200, Tobias Klauser wrote:
>
>> Wouldn't it be better to annotate the data member in struct tagSCmdRequest
>> with __user instead of introducing all these casts?

Hi,

Yes, having the data member annotated as '__user' in 'struct
tagSCmdRequest' looks like a much cleaner way for fixing these warnings.
I will re-work on this patch this patch and submit again.

Thanks,
Anil
--
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/


Re: [PATCH 1/1] drivers: staging: vt6655: ioctl.c - missing __user annotation

2014-07-29 Thread Anil Shashikumar Belur

On Tuesday 29 July 2014 02:47 PM, Dan Carpenter wrote:
 On Tue, Jul 29, 2014 at 10:05:38AM +0200, Tobias Klauser wrote:

 Wouldn't it be better to annotate the data member in struct tagSCmdRequest
 with __user instead of introducing all these casts?

Hi,

Yes, having the data member annotated as '__user' in 'struct
tagSCmdRequest' looks like a much cleaner way for fixing these warnings.
I will re-work on this patch this patch and submit again.

Thanks,
Anil
--
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/


Re: [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree()

2014-07-10 Thread Anil Shashikumar Belur

On Thursday 10 July 2014 11:25 AM, Anil Belur wrote:
> From: Anil Belur 
>
> - as kfree() internally check for NULL, additional check it not
>   required.
>
Sorry - please ignore this patch set, they are already fixed by someone
else recently.
--
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/


Re: [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree()

2014-07-10 Thread Anil Shashikumar Belur

On Thursday 10 July 2014 11:25 AM, Anil Belur wrote:
 From: Anil Belur ask...@gmail.com

 - as kfree() internally check for NULL, additional check it not
   required.

Sorry - please ignore this patch set, they are already fixed by someone
else recently.
--
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/


Re: [PATCH 2/2] staging: nokia_h4p: nokia_core.c - removed IRQF_DISABLED macro

2014-07-09 Thread Anil Shashikumar Belur

On Wednesday 09 July 2014 05:16 PM, Pavel Machek wrote:
> I wonder if it would maek sense to do
> ./include/linux/interrupt.h:#define IRQF_DISABLED 0 to make it extra
> clear that it is nop now? Pavel 
yes - it makes sense. there are still a few references to the macro in
the code.

Cheers,
Anil
--
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/


Re: [PATCH 2/2] staging: nokia_h4p: nokia_core.c - removed IRQF_DISABLED macro

2014-07-09 Thread Anil Shashikumar Belur

On Wednesday 09 July 2014 05:16 PM, Pavel Machek wrote:
 I wonder if it would maek sense to do
 ./include/linux/interrupt.h:#define IRQF_DISABLED 0 to make it extra
 clear that it is nop now? Pavel 
yes - it makes sense. there are still a few references to the macro in
the code.

Cheers,
Anil
--
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/


Re: [PATCH v2 1/1] staging: lustre: libcfs: nidstrings.c - use ARRAY_SIZE macro

2014-07-08 Thread Anil Shashikumar Belur

On Wednesday 09 July 2014 05:18 AM, Greg KH wrote:
> Someone sent this same patch just before you did, sorry :(
>
Ah - no worries - sorry for the noise.
--
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/


Re: [PATCH v2 1/1] staging: lustre: libcfs: nidstrings.c - use ARRAY_SIZE macro

2014-07-08 Thread Anil Shashikumar Belur

On Wednesday 09 July 2014 05:18 AM, Greg KH wrote:
 Someone sent this same patch just before you did, sorry :(

Ah - no worries - sorry for the noise.
--
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/


Re: [PATCH 1/1] staging: media: msi3101: sdr-msi3101.c - replace with time_before_eq()

2014-06-29 Thread Anil Shashikumar Belur

On Monday 30 June 2014 12:47 AM, Antti Palosaari wrote:
> Moikka!
> That is already fixed by someone else and patch is somewhere Mauro or
> Hans queue.
>
> regards
> Antti
>
Moikka :)

Ah no worries - I could not find the changes with the latest updates.

Thanks
--
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/


Re: [PATCH 1/1] staging: media: msi3101: sdr-msi3101.c - replace with time_before_eq()

2014-06-29 Thread Anil Shashikumar Belur

On Monday 30 June 2014 12:47 AM, Antti Palosaari wrote:
 Moikka!
 That is already fixed by someone else and patch is somewhere Mauro or
 Hans queue.

 regards
 Antti

Moikka :)

Ah no worries - I could not find the changes with the latest updates.

Thanks
--
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/


Re: [PATCH 1/3] staging: lustre: ldlm: ldlm_resource.c removed unecessary braces

2014-06-19 Thread Anil Shashikumar Belur

 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

> Doesn't apply :(
Thanks - Its probably because I have included a patch already sent
earlier, will redo this set.
--
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/


Re: [PATCH 1/3] staging: lustre: ldlm: ldlm_resource.c removed unecessary braces

2014-06-19 Thread Anil Shashikumar Belur

 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

 Doesn't apply :(
Thanks - Its probably because I have included a patch already sent
earlier, will redo this set.
--
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/


Re: [PATCH v6 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues

2014-06-17 Thread Anil Shashikumar Belur
> Should be an empty line between variable declarations and code.

Hi Andreas, not sure if you are referring to the same patch as there is
already an empty line present.

 823 loff_t size = cl_isize_read(inode);
 824 loff_t cur_index = start >>
PAGE_CACHE_SHIFT;
 825 loff_t size_index = ((size - 1) >>
PAGE_CACHE_SHIFT);
 826
 827 if ((size == 0 && cur_index != 0) ||

Cheers,
Anil
--
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/


Re: [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues

2014-06-17 Thread Anil Shashikumar Belur
> If you are using min_t(__u32, ...) then there is no need for the
(__u32) cast of LOV_MAX_STRIPE_COUNT, since that is the whole point of
min_t() that the cast is done internally.

Agreed, it makes sense not to cast twice when using min_t().
--
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/


Re: [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues

2014-06-17 Thread Anil Shashikumar Belur
 If you are using min_t(__u32, ...) then there is no need for the
(__u32) cast of LOV_MAX_STRIPE_COUNT, since that is the whole point of
min_t() that the cast is done internally.

Agreed, it makes sense not to cast twice when using min_t().
--
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/


Re: [PATCH v6 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues

2014-06-17 Thread Anil Shashikumar Belur
 Should be an empty line between variable declarations and code.

Hi Andreas, not sure if you are referring to the same patch as there is
already an empty line present.

 823 loff_t size = cl_isize_read(inode);
 824 loff_t cur_index = start 
PAGE_CACHE_SHIFT;
 825 loff_t size_index = ((size - 1) 
PAGE_CACHE_SHIFT);
 826
 827 if ((size == 0  cur_index != 0) ||

Cheers,
Anil
--
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/


Re: [PATCH v5 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues

2014-06-16 Thread Anil Shashikumar Belur

On Tuesday 17 June 2014 07:38 AM, Drokin, Oleg wrote:
> On Jun 16, 2014, at 12:22 PM, Anil Belur wrote:
>
>> From: Anil Belur 
>>
>> fixed: WARNING: line over 80 characters, used a new variable 'size_index' to
>> store the offset. Replace "unsigned long" with  "u64" type for
> Apparently you forgot to update the comment.
Thanks Oleg - overlooked it, will fix this shortly.
--
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/


Re: [PATCH v3 1/7] staging: lustre: lclient: glimpse.c fixing coding style issues

2014-06-16 Thread Anil Shashikumar Belur

> - result = +1; + result = + 1;
> This looks wrong.
> Here +1 is apparently meant as +1 (compare to -1) to underscore it's positive 
> nature.
> If you wanted to drop the +, that'd be fine, I guess, but in your version it 
> looks outright wrong to me (I tested and it compiles, though).
>
> Bye,
> Oleg
Hi Oleg,

While testing the value of `result` still remains "+1", from the above
change.

I agree as suggested, its better to remove `+` and use `result = 1;`
makes it more readable.

Will redo this patch and send.

Cheers.
--
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/


Re: [PATCH v3 7/7] staging: lustre: lclient: lcommon_cl.c fixing coding style issues

2014-06-16 Thread Anil Shashikumar Belur

> + unsigned long cur_index;

> I wonder why move this particular declaration here?
> The only user is still in that one conditional branch anyway.
These changes are for fixing warning of line over 80 chars and indent.
maybe I should change 'unsigned long' to 'u64' keeping the line of code
in the same place.
>>  /*
>>   * Consistency guarantees: following possibilities exist for the
>> @@ -864,11 +865,13 @@ int ccc_prep_size(const struct lu_env *env, struct 
>> cl_object *obj,
>>   * linux-2.6.18-128.1.1 miss to do that.
>>   * --bug 17336 */
>>  loff_t size = cl_isize_read(inode);
>> -unsigned long cur_index = start >> 
>> PAGE_CACHE_SHIFT;
>> +
>> +cur_index = start >> PAGE_CACHE_SHIFT;
>> +loff_t check = ((size - 1) >> PAGE_CACHE_SHIFT);
> This used to produce a warning about mixing code and declarations in the 
> past. 
> Probably a bad idea to mix them anyway.
Will create a separate patch for mixed declaration error which is still
present.

--
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/


Re: [PATCH v3 7/7] staging: lustre: lclient: lcommon_cl.c fixing coding style issues

2014-06-16 Thread Anil Shashikumar Belur

 + unsigned long cur_index;

 I wonder why move this particular declaration here?
 The only user is still in that one conditional branch anyway.
These changes are for fixing warning of line over 80 chars and indent.
maybe I should change 'unsigned long' to 'u64' keeping the line of code
in the same place.
  /*
   * Consistency guarantees: following possibilities exist for the
 @@ -864,11 +865,13 @@ int ccc_prep_size(const struct lu_env *env, struct 
 cl_object *obj,
   * linux-2.6.18-128.1.1 miss to do that.
   * --bug 17336 */
  loff_t size = cl_isize_read(inode);
 -unsigned long cur_index = start  
 PAGE_CACHE_SHIFT;
 +
 +cur_index = start  PAGE_CACHE_SHIFT;
 +loff_t check = ((size - 1)  PAGE_CACHE_SHIFT);
 This used to produce a warning about mixing code and declarations in the 
 past. 
 Probably a bad idea to mix them anyway.
Will create a separate patch for mixed declaration error which is still
present.

--
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/


Re: [PATCH v3 1/7] staging: lustre: lclient: glimpse.c fixing coding style issues

2014-06-16 Thread Anil Shashikumar Belur

 - result = +1; + result = + 1;
 This looks wrong.
 Here +1 is apparently meant as +1 (compare to -1) to underscore it's positive 
 nature.
 If you wanted to drop the +, that'd be fine, I guess, but in your version it 
 looks outright wrong to me (I tested and it compiles, though).

 Bye,
 Oleg
Hi Oleg,

While testing the value of `result` still remains +1, from the above
change.

I agree as suggested, its better to remove `+` and use `result = 1;`
makes it more readable.

Will redo this patch and send.

Cheers.
--
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/


Re: [PATCH v5 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues

2014-06-16 Thread Anil Shashikumar Belur

On Tuesday 17 June 2014 07:38 AM, Drokin, Oleg wrote:
 On Jun 16, 2014, at 12:22 PM, Anil Belur wrote:

 From: Anil Belur ask...@gmail.com

 fixed: WARNING: line over 80 characters, used a new variable 'size_index' to
 store the offset. Replace unsigned long with  u64 type for
 Apparently you forgot to update the comment.
Thanks Oleg - overlooked it, will fix this shortly.
--
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/