From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE536C2D0E2 for ; Tue, 22 Sep 2020 19:35:10 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7109D2371F for ; Tue, 22 Sep 2020 19:35:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="LQ1L1Nyj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7109D2371F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kKo3t-0008E9-Do; Tue, 22 Sep 2020 19:34:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kKo3r-0008E2-JT for xen-devel@lists.xenproject.org; Tue, 22 Sep 2020 19:34:47 +0000 X-Inumbo-ID: bc124c30-cb34-4713-b262-03f9da420c81 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id bc124c30-cb34-4713-b262-03f9da420c81; Tue, 22 Sep 2020 19:34:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1600803287; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=fnzN7mCV3kLVEx+6s/pez3uMQuHUF3vTGVgomVd0EUU=; b=LQ1L1Nyj4dO3h33vlEz7ZPEdpUYon8PD2AiH/moELqY2XKN8qdIW3IEQ 8yGYt9H30CkoFSLG2uiJgK5P1QcdN0idXJSQdOQsUQK/g5giakpz9fZwT Q27FG0Z5W1mNnm5LbWrCcFC8aTdjKyyiOlyledrX9VCZDqXjN98SPtcjL 8=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 5JIhH44cgLepYFOF1snRNj21oH90w9FSrAjnIZPOhl4MXOV4GO2F6JgfzISpOdNHOTSEZtypZF 0cp1I0YbVRbupGBMLcZbNtkfXeGfvQMD7VHHVsQL7dXdNPFUhiiPzV39AoT6XqvEesXEzhjR4B VaYL7yuCaI2ftQmJ7HH7mN6gYj+S8jLn9ffWZ8JrNP+cH4nNE0m8tsMEyyBcvjESHVHsM5wNHR REAN7oRrfeSvYJ1M9zXhy1S29DZQFz0cNHKPI7bQlcFMQUoTx1tybj8n6+Gat24Q01FH50rhyU OCc= X-SBRS: 2.7 X-MesageID: 27275546 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,291,1596513600"; d="scan'208";a="27275546" Subject: Re: [PATCH 8/9] lib: move bsearch code To: Jan Beulich , "xen-devel@lists.xenproject.org" CC: George Dunlap , Ian Jackson , Julien Grall , Wei Liu , Stefano Stabellini References: <13e17bbd-4e58-d953-87c5-5fabafa21de2@suse.com> From: Andrew Cooper Message-ID: Date: Tue, 22 Sep 2020 20:34:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <13e17bbd-4e58-d953-87c5-5fabafa21de2@suse.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To FTLPEX02CL05.citrite.net (10.13.108.178) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 14/09/2020 11:18, Jan Beulich wrote: > Build this code into an archive, which results in not linking it into > x86 final binaries. This saves a little bit of dead code. > > Signed-off-by: Jan Beulich This wants to be an extern inline in the header file just like in stdlib.h. The implementation is trivial, and much faster when the compiler can inline the cmp() function pointer. I doubt we actually need out-of-line implementation (except perhaps for CONFIG_UBSAN builds or so). ~Andrew