Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754347Ab1DSMrJ (ORCPT ); Tue, 19 Apr 2011 08:47:09 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:46051 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753143Ab1DSMrH (ORCPT ); Tue, 19 Apr 2011 08:47:07 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=r4ybyT7VIf7FDNpsVTZBUOxMTn3kBqElVvx3oA79DmdSaBTpxmYvPR/vt0s59M2kYm J/gKtf4YxNR8RIFxiYrM22D1yxLfvfCvwoW06KmIhSBzKn+29X4IhXcDsg4DIC1AWO46 0hBILZb4wDCxRxEvp1PeooaG12bkhoP8Uog6w= Message-ID: <4DAD843C.7060409@gmail.com> Date: Tue, 19 Apr 2011 20:46:52 +0800 From: Wanlong Gao User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Rusty Russell CC: Alessio Igor Bogani , Tim Abbott , Anders Kaseorg , Jason Wessel , Tim Bird , LKML , Linux Embedded Subject: Re: [PATCH 4/4] module: Use the binary search for symbols resolution References: <1302960373-5309-1-git-send-email-abogani@kernel.org> <1302960373-5309-5-git-send-email-abogani@kernel.org> <87liz73tso.fsf@rustcorp.com.au> <4DACE8F4.2050807@gmail.com> <87aafmo4mi.fsf@rustcorp.com.au> In-Reply-To: <87aafmo4mi.fsf@rustcorp.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1080 Lines: 30 2011-4-19 19:35, Rusty Russell wroted: > On Tue, 19 Apr 2011 09:44:20 +0800, Wanlong Gao wrote: >> 2011-4-19 9:37, Rusty Russell wroted: >>> On Sat, 16 Apr 2011 22:32:08 +0800, Wanlong Gao wrote: >>>>> + sym = bsearch(fsa->name, syms->start, syms->stop - syms->start, >>>> As the bsearch func, why not change the syms->stop to syms->end ? >>>> Hmm..Just a stupid suggestion. >>> >>> >>> The names are derived from the linker symbols for end of sections, which >>> is __stop_. >>> >>> Cheers, >>> Rusty. >> As this , why not change the bsearch's "end" to "stop", too ? It will be >> more readable. > > I'm confused. bsearch uses a count, not an end pointer... > > Rusty. Hmm...I see, I see . I made a mistake on this func . Thanks for your explanation. Best regards -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/