Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1746394ybg; Sat, 19 Oct 2019 01:36:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5r0dkjCe6DvDDckdU0mSzRbDC35QUNyTpKc6rgCpFBneDH6Cd3UrUIdfrbebCYfu7DWzr X-Received: by 2002:aa7:cfc2:: with SMTP id r2mr13825552edy.229.1571474196769; Sat, 19 Oct 2019 01:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571474196; cv=none; d=google.com; s=arc-20160816; b=PH7jrRxxXkE2PMBKWXvkpSfFAdtXz9eNHadtvPard3tqllPPkFTps+G7l1tOimTOeh JOGKKa82gTSK7bcnO4j6QqmDa2hvS1mEhEzSrJsnO8moBWe/kD8jIP9XR7bQYePCKJd+ BiYwJu6aPp6QubbF7vizSm6US06TJOyA9PG9Q4s63NCP7qyfnTDaFvmW1RH6cNlWgxlH x1/iSk5fCa3aF+gTBwoJb9fazehw37zrU2KffsIugcWaXSHUsKAakEEFFt4kNfCTKEYP zTCw/mZVW7ibx3vJ9k8Ea9L6ruecqkv/NYPxbbwv/4BevJ8dYFLdquq4MY3R2CB1xePj 9xfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=htc6+DktT7Y3uD3auBmpX964Gqpp3eQIkOXe0EMRrEM=; b=PquLnhMCFCtZttmhdjySYNMg4PFY2Jro97tQKqkpUme0TZNKuzzJ53Nz9yjZg8mHzl 8Gh2nttPSi3qQM5sfQzGcRJGYbLOod7pFLsfnwvKdlXkXKQ0xs1jwyolStM/sSvNziSc b4E6iGUnt3e+yKhi+S/7g+G8fQFSdM493AslK0P2IieWWR9L2vVJC77EBEjVeKjaBlyP k4169OPd9iGi7SjBUyqMDifUG+YsSqa6jiTshxjlnkEtlSJY83ebTfP3iB5cf0yzfN20 IISeMplgWGFDUu2ii7OxUP7KEOGHcw7bRzk6tRj2vnhQFzPTIRg464iT8xX9bWFlrWMp CyCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XjWIVFjS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si6337476edc.67.2019.10.19.01.36.14; Sat, 19 Oct 2019 01:36:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XjWIVFjS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410745AbfJRPdj (ORCPT + 99 others); Fri, 18 Oct 2019 11:33:39 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42888 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410604AbfJRPcI (ORCPT ); Fri, 18 Oct 2019 11:32:08 -0400 Received: by mail-lf1-f68.google.com with SMTP id z12so5033538lfj.9 for ; Fri, 18 Oct 2019 08:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=htc6+DktT7Y3uD3auBmpX964Gqpp3eQIkOXe0EMRrEM=; b=XjWIVFjSz6ga1WAc15MNwGtRsqjuAizeRbLBR+qDU/JmNQalIxeb15P2p6wblxHGiJ okv1b5kgGfawN2eTdxq8f/H3KlmOYczAKpLMUGd/da232vCAUcVkSyubf9sHK9JzewVk lfeh8fR+XTd8y8oNj8qkk5nI6khRxbHTVmkGg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=htc6+DktT7Y3uD3auBmpX964Gqpp3eQIkOXe0EMRrEM=; b=GP8wwtJF/y0rQ54nXHjHg2cNGVCzs27Vt773IjiA8/Fjl9jNP2OH9iN2Ke+echRhPy /QKcN9BeaKZNm9IoskcANiNcGh18xQ2XOlj06ErSUZumqT7r2LecvgQ1pSf/De5ohWPa OD2BMy2BpiV7Z5dz3iytmxoQgFKOlzz16W5jMUhN4JAzyzABO1Aj09xYNFIE/sZi09KT DX9r1ha7uHwOQxpyMyCjssPndur8cm5pY1Vt33gmtSBQkrKhUtdjLe+uSzXgCKxsfezy c71XYo7R6qaifUdAmMgmkIM5bByj+ge78Lg0FKSaXFlJKix1NykhjpB4/Q1eJhpFjEPg vWqw== X-Gm-Message-State: APjAAAWc1b1HIo9fuj9AJeCGt8Y2YNI4vhFc2OfZpkxho/Z5rZHFlwqL urqxw5NrjGtkQRYuIRSDEE1fnLqXrXg= X-Received: by 2002:ac2:52b1:: with SMTP id r17mr6447069lfm.25.1571412725923; Fri, 18 Oct 2019 08:32:05 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id p86sm2890963lja.100.2019.10.18.08.32.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Oct 2019 08:32:05 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id r2so5043596lfn.8 for ; Fri, 18 Oct 2019 08:32:04 -0700 (PDT) X-Received: by 2002:a19:f709:: with SMTP id z9mr6504716lfe.170.1571412724682; Fri, 18 Oct 2019 08:32:04 -0700 (PDT) MIME-Version: 1.0 References: <09d824ac-5371-830e-466d-7f78ccdae065@codethink.co.uk> In-Reply-To: <09d824ac-5371-830e-466d-7f78ccdae065@codethink.co.uk> From: Linus Torvalds Date: Fri, 18 Oct 2019 08:31:48 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: sparse: __pure declaration only To: Ben Dooks Cc: Sparse Mailing-list , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 18, 2019 at 4:15 AM Ben Dooks wrote: > > is this a valid warning? if not, should sparse be ignoring these. It's technically valid, but maybe it's not useful. If we make sure that any pure bits from a declaration always make it into the definition, then I suspect that the "was not declared" warning (if the definition is non-static and seen without a declaration) is sufficient. Of course, sparse doesn't actually _care_ about "pure" in the definition, only in the use, so right now it doesn't even make any difference to sparse whether the definition has the "pure" or not. It's only when the function is used that the "pure" matters (it makes the call instruction be CSE'd like any other random instruction). Linus