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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 ADCD2C34056 for ; Wed, 19 Feb 2020 19:54:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DFC9207FD for ; Wed, 19 Feb 2020 19:54:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="ODVc7IEJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726962AbgBSTy1 (ORCPT ); Wed, 19 Feb 2020 14:54:27 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:40208 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726634AbgBSTy0 (ORCPT ); Wed, 19 Feb 2020 14:54:26 -0500 Received: by mail-qt1-f194.google.com with SMTP id v25so1144542qto.7 for ; Wed, 19 Feb 2020 11:54:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GZ9YXuE15eVQ1m82XL11R20aCz4heFp3V/a8Xs8KTDk=; b=ODVc7IEJfwpkmKIQUqFybHBw620ekiVwat/n9Ac5Pfspu1Q4DuB58gmJDIsLNVVBR7 EpgFHQfjMKK9d8IFitaDW17i9XWGMOavG4yOJnvYsg02g18N65AN1jFk1HcjJ57HAFxd Srq5n3/4F5KJ984TW6fFo2kUw679IcjtmPWAcaOWdAcZSMUz+MUTctzRJjL6rDujJi/Y EZ5twEFC1HpJvBQ4+fhBpkHpbsTIlkaMeDsXOufmgAI9ouoTt9BWBKfdT8kf7Xff3/mQ zcrvJjierCEsOXBM6EBzIlWLE2Y6UQ4XbCxlvapTQbBcZKR3JvyWwjtYZpGRKgkQ/k9/ vfwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GZ9YXuE15eVQ1m82XL11R20aCz4heFp3V/a8Xs8KTDk=; b=GlePMC1KoAZZRzocKSr/x8bUTcHLTj0RyligaRtmfyn+nvzIvtDCZUKuEwQyzal1Uc CQAfYO/RkzjcSAxVBEzxiKEW+rR11EoTP07TBaMtjQVwEMrgSMa7v5Cshikm7QfJfqzT 4J+slltY2JTsT8ck4/AUzWp0K6CUUwdNjZj+KqUPSQM7t1nolKjI81IRFPPErGGQpuwl 0lt/SNAtHZNBjZHA/njNDyxYeY/nOAwJeLE+I8jANBpxifLE4x/avoAiglrOeM/hYXeZ M2HVI9zolvKTlsWBV/itb5wFfSS04nP3Kku/gbbQvTHgqzJ8xdcrXZzwtv2oUoUtJUuC h6aw== X-Gm-Message-State: APjAAAW4HXG125C7+7F1MqZVtQIAROl+qaJwjkzR7oLUVsupDEbMC1/+ kQMbVoSuVDui0sgEODr8Z/3t1A== X-Google-Smtp-Source: APXvYqwUhupndXBE09xsDkgUA7kwgC2NQShW8nuUAvL8wUSkyIakN42anJqBWpm/nMwac3dxI/meAg== X-Received: by 2002:aed:3fb7:: with SMTP id s52mr22354651qth.97.1582142065790; Wed, 19 Feb 2020 11:54:25 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id p8sm490083qtn.71.2020.02.19.11.54.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Feb 2020 11:54:25 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1j4VQO-0006DL-Tx; Wed, 19 Feb 2020 15:54:24 -0400 Date: Wed, 19 Feb 2020 15:54:24 -0400 From: Jason Gunthorpe To: Nick Desaulniers Cc: Nathan Chancellor , Steven Rostedt , Masahiro Yamada , Michal Marek , Arnd Bergmann , Ingo Molnar , Jason Baron , Catalin Marinas , Andrew Morton , LKML , Linux Kbuild mailing list , linux-arch , Linux Memory Management List , clang-built-linux Subject: Re: [PATCH 3/6] tracing: Wrap section comparison in tracer_alloc_buffers with COMPARE_SECTIONS Message-ID: <20200219195424.GW31668@ziepe.ca> References: <20200219045423.54190-1-natechancellor@gmail.com> <20200219045423.54190-4-natechancellor@gmail.com> <20200219093445.386f1c09@gandalf.local.home> <20200219181619.GV31668@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 19, 2020 at 11:11:19AM -0800, Nick Desaulniers wrote: > > Godbolt says clang is happy if it is written as: > > > > if (&__stop___trace_bprintk_fmt[0] != &__start___trace_bprintk_fmt[0]) > > > > Which is probably the best compromise. The type here is const char > > *[], so it would be a shame to see it go. > > If the "address" is never dereferenced, but only used for arithmetic > (in a way that the the pointed to type is irrelevant), does the > pointed to type matter? The type is used here: if (*pos < start_index) return __start___trace_bprintk_fmt + *pos; The return expression should be a const char ** Presumably the caller of find_next derferences it. Jason