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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 85D82C2D0E2 for ; Thu, 24 Sep 2020 07:09:53 +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 11E9B2388A for ; Thu, 24 Sep 2020 07:09:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="aqc/KwnK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11E9B2388A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.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 1kLLNr-0002gi-Tj; Thu, 24 Sep 2020 07:09:39 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kLLNq-0002gd-Jp for xen-devel@lists.xenproject.org; Thu, 24 Sep 2020 07:09:38 +0000 X-Inumbo-ID: d9b376f4-1e32-4f47-98b2-e5703071e169 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id d9b376f4-1e32-4f47-98b2-e5703071e169; Thu, 24 Sep 2020 07:09:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1600931376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zLEO1ik0C3w6vyUvTbbuoSSTSsoZnaH1hc0796q857U=; b=aqc/KwnK0qw8Fq8WTXJnMLofCdhjM43d4XamPKS+6iSQJYtOgFg3LNLHkKyGbmlBP0sSpV oAq0uwSHDrPTaDKyP3ElcWnpZUhr5ZJrZTWpkApsy3trejI5eUGdcK+18kVWcHRe/fq9Je gmatS1qYefJVnYcJEGHDwqrZWJbLEpM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8D89DAA55; Thu, 24 Sep 2020 07:10:14 +0000 (UTC) Subject: Re: [PATCH 8/9] lib: move bsearch code To: Andrew Cooper Cc: "xen-devel@lists.xenproject.org" , George Dunlap , Ian Jackson , Julien Grall , Wei Liu , Stefano Stabellini References: <13e17bbd-4e58-d953-87c5-5fabafa21de2@suse.com> From: Jan Beulich Message-ID: Date: Thu, 24 Sep 2020 09:09:37 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 22.09.2020 21:34, Andrew Cooper wrote: > 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. I can move it there, but why "extern" rather than "static"? We're not at risk of conflicting with a C library implementation. > 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). The only references are in Arm code; I don't know enough of UBSAN to see why uses may appear there. Jan