2013-07-15 06:18:04

by anish singh

[permalink] [raw]
Subject: Question:Bsearch replace the search_extable implementations

Hello Rusty,

Right now I see so many places in the kernel
where we open code binary search implementations
such as search_extable implementations.

http://lxr.free-electrons.com/ident?a=powerpc;i=search_extable

Would it be ok to replace this with bsearch lib code?

I am not trying to fix any problem nor I see
any problem in current implementations but
if we can replace the large amount of code
would it not be a good reason to send a patch
for this?

anish


2013-07-16 05:44:51

by Rusty Russell

[permalink] [raw]
Subject: Re: Question:Bsearch replace the search_extable implementations

anish singh <[email protected]> writes:
> Hello Rusty,
>
> Right now I see so many places in the kernel
> where we open code binary search implementations
> such as search_extable implementations.
>
> http://lxr.free-electrons.com/ident?a=powerpc;i=search_extable
>
> Would it be ok to replace this with bsearch lib code?
>
> I am not trying to fix any problem nor I see
> any problem in current implementations but
> if we can replace the large amount of code
> would it not be a good reason to send a patch
> for this?

It should be fine, yes.

Thanks!
Rusty.

2013-07-16 05:51:32

by anish singh

[permalink] [raw]
Subject: Re: Question:Bsearch replace the search_extable implementations

On Tue, Jul 16, 2013 at 10:29 AM, Rusty Russell <[email protected]> wrote:
> anish singh <[email protected]> writes:
>> Hello Rusty,
>>
>> Right now I see so many places in the kernel
>> where we open code binary search implementations
>> such as search_extable implementations.
>>
>> http://lxr.free-electrons.com/ident?a=powerpc;i=search_extable
>>
>> Would it be ok to replace this with bsearch lib code?
>>
>> I am not trying to fix any problem nor I see
>> any problem in current implementations but
>> if we can replace the large amount of code
>> would it not be a good reason to send a patch
>> for this?
>
> It should be fine, yes.
great.Will be sending patch for this soon.
>
> Thanks!
> Rusty.