Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1047487ybj; Tue, 5 May 2020 12:03:16 -0700 (PDT) X-Google-Smtp-Source: APiQypIqDQz3gGYHzd4ThMY6sBAZPgyIlbDX9nKVaKHhQpR5gX+oWnZGgXWsuyeCASklHiMeItOW X-Received: by 2002:a17:906:7e5a:: with SMTP id z26mr4352392ejr.168.1588705396514; Tue, 05 May 2020 12:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588705396; cv=none; d=google.com; s=arc-20160816; b=Mhvb+xPRo0zFLI6CM2EQu4VEsnb+TPA7ZypDscHKP161TDmybfCinl7//YAQU5RyeU v5SPl2LybNDphesyAnJ93uEaVYWv++HP4w8QUHuvMI4FXjrcgBRuj/XJ5QTFqCASOg/F BrSYKP/uN2EZKDlLvWcNXqa+fvYpeG11zhhTkzaTrIIbqSMbd1MnaWy2O2S0lPcAcuy3 pObICueBBjEjEWhyOVpPwsE4ZS2O0MAQvCbiu6ymn5ITOe8zyyUS+19MxYOADNcaHMGE fdZWNxFwURybjDPgasMfOMoj0DMlgWL9gAozjNK8R/2SvAOWZh33FryfDazJZwsQCK0n AWvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=Rjfz5xymzYaDcKUScYp/x3NNVUdXiC7q7LLU5PE9Yq4=; b=duhSzgkS6onVXwM7dNhmlm55f6OaxVRFZafKNsxIQR99EnKjST6k5nyb0PQvQ7atok rlFZnU4rzmqWLduqsx/45Co0G0Z00vI9aBe9V2d5moNgRmzUmxEyLjNI1qtcF+oXtQF3 CH1ZK78tU427Xotmg4w/Tzml0y/WSZeGMfZoytIm80KtV+25cqAowG1Ku6t0LgwrjJuZ pxxAjIE4bPB90uXOAK0g3FqFzrjezBbM8oew8fa4EzfLJJkIF7pSwlO/c/rCDUQl5pFS dxjzKPa2qdli+apo4Hg5sS5GlNPpD426WZOeU9ML/W2+GrnW46oSc9xIiNLsMjhUK4wx bg0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=ayOAwVtM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg1si1633608edb.182.2020.05.05.12.02.53; Tue, 05 May 2020 12:03:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=ayOAwVtM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729111AbgEETAl (ORCPT + 99 others); Tue, 5 May 2020 15:00:41 -0400 Received: from mail.efficios.com ([167.114.26.124]:51972 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729088AbgEETAj (ORCPT ); Tue, 5 May 2020 15:00:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id ED9C62A1541; Tue, 5 May 2020 15:00:37 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id nv6F0bF46OsB; Tue, 5 May 2020 15:00:37 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id A03BB2A1540; Tue, 5 May 2020 15:00:37 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com A03BB2A1540 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1588705237; bh=Rjfz5xymzYaDcKUScYp/x3NNVUdXiC7q7LLU5PE9Yq4=; h=Date:From:To:Message-ID:MIME-Version; b=ayOAwVtM4nE+ZDxaOO5eNAuu33/KbfNxDDp0x+j3OTv50a2by86tDlyHwyREqIsH1 fz2BPGF2dtJOwcULCxNlkmRqM1oy4a2fW/rmecuuXmGtPW1sNy7IfWMBbGl7b3vh5s E500PXdbCAQWVwtm/MB55xjPtlHHyH/8Yb6F+1OhEQVCiMORxHaqCoWZPa+qC1yBkK S35I0iJxPUnhqaZdnUsRymi8I0xAUCZ7JNN3DmdoMwOakXX2x2vGnJqnJnR31skm0/ dbif8G54c1HqUSYTkAJOI1dZmptNL0FDw4eM0Ie+zMpYWZ9RAGSbXXwFewI+zi7uzz UTGx/j2RfK6TQ== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mo_UgZ0kehgb; Tue, 5 May 2020 15:00:37 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 89D572A1819; Tue, 5 May 2020 15:00:37 -0400 (EDT) Date: Tue, 5 May 2020 15:00:37 -0400 (EDT) From: Mathieu Desnoyers To: Linus Torvalds Cc: ndesaulniers , Peter Zijlstra , Rasmus Villemoes , x86 , linux-kernel , rostedt , Masami Hiramatsu , bristot , jbaron , Thomas Gleixner , Ingo Molnar , Nadav Amit , "H. Peter Anvin" , Andy Lutomirski , Ard Biesheuvel , Josh Poimboeuf , Paolo Bonzini , "H.J. Lu" , clang-built-linux Message-ID: <656098739.766.1588705237442.JavaMail.zimbra@efficios.com> In-Reply-To: References: <20200501202849.647891881@infradead.org> <20200503125813.GL3762@hirez.programming.kicks-ass.net> <20200504201445.GQ3762@hirez.programming.kicks-ass.net> <20200505093625.GE5298@hirez.programming.kicks-ass.net> Subject: Re: [PATCH v4 14/18] static_call: Add static_cond_call() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3928 (ZimbraWebClient - FF75 (Linux)/8.8.15_GA_3928) Thread-Topic: static_call: Add static_cond_call() Thread-Index: TBBGZFVyha9Zhc3xVPg/xpFfwyTxwg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On May 5, 2020, at 2:48 PM, Linus Torvalds torvalds@linux-foundation.org wrote: [...] > > Your initial reaction that "you can't compile away the read and the > test of NULL" was correct, I think. I suspect this pattern of "if (func != NULL) func(...)" could be semantically changed to just invoking an empty function which effectively does nothing. This would remove the need to do a pointer check in the first place. But maybe I'm missing something subtle about why it has not been done in this context. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com