Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp402309lqs; Thu, 13 Jun 2024 13:27:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw15hbF8Yrp117mcNuEOTAF2pDStqfgjgnoyzTiqSPWYLdkTi35eyoaPcCojYayFQYhLe9R7TfT6+YDhNCgx9iShR3tQdjxylY6La0fQ== X-Google-Smtp-Source: AGHT+IE7iDI91EPBWy53+24aH5ZXIycz1SzsaM0+qZAnAsCFst9ZyHEblukD50LGrIoAIvXgJgJp X-Received: by 2002:aa7:9191:0:b0:705:d822:31ed with SMTP id d2e1a72fcca58-705d82234a3mr456414b3a.15.1718310477028; Thu, 13 Jun 2024 13:27:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718310477; cv=pass; d=google.com; s=arc-20160816; b=sQvN/brg+Y5wdE57YyprNQaVO3yYYaScXFaM7EYyUHganPOkM1eBReUYG7goJFBYjy xAwSQbPp1Xq0ySpCRLNurCaNC1ZgefJI37bvqj38LyDwmsWI5UB+VoQ10CquvEciExkK ATt2+vOGBaSa9iLIQAhmE30o8jYNgoafW2TPoim1D4BKvOTMPC3ZxZtg4nOphelOQQjz zXuBvMQxKLfDapXHCOx3ntdJ6VG5BPJGoII1AE/WKZrX9GxFDErkMjjetQiup/KGhQKc IPEYoI6Bezes33UqTGysehnQpMUVCrHQ/3ggOndKnG32i+Ma1GfDWsjB/WZrjVqc4jmg P0gQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=l/UDouX2eR39eIs19JeRDpsYn4gvZ58aHbTbEq5SZ7Y=; fh=qU6avlOU359yMpApfuY9dz8djJtxeW2QIwFX08CHl+s=; b=c9QcHq/MQ9lvrRHKn3EZuAassqQGJ3NYZi2PC8NAF3kdN3zvmmk8J6yYBXKc8Mgvl4 03EyuJdzEqgQm0AMev5HfxR/LRDC8tPh22/gKgFXob3P1tU7tRdKqzF7vJVOqF3IUgD9 kJceZK9lxMHbP87GLBn7B/4Nb/+FZFb7za8cx4iFEP1GReEyd6/rw2jJA2qo24OyM/pQ AsJmn9yrbfjebXOvi/rnl+SDjOAiiODK9gpm61ggKl9vUuxdtks6FwjzaNspkiRGBnQ7 rUbpqiHwds96ZMwiKZ4HnMJNiiCzROkL5odxPlNERrt4JIsMmziPTJD/O+35SFRJUDeX QJDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=ePHLIVEv; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-213964-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213964-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-705ccb3cd56si2044396b3a.172.2024.06.13.13.27.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 13:27:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213964-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=ePHLIVEv; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-213964-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213964-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4F37BB263E8 for ; Thu, 13 Jun 2024 20:04:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B419B13667F; Thu, 13 Jun 2024 20:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="ePHLIVEv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4D8457C8D; Thu, 13 Jun 2024 20:04:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718309061; cv=none; b=TzHaKBfDDceW4bMbvzQ4K1tompSNVK9llz6ln9MsJWCYXcpQMLkqjoY0zAfNg+rU0snI07SuThVT5PLbGKGS9+aF74T8meK5mMvBLis+N6wZeAH93UbE1hxgyzkZXRulmvtyLKylcn5VJ1dMbQRqM5w+6oZ5LWR2X9eBU14YA2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718309061; c=relaxed/simple; bh=MEYJeXpmEp6BsUZfvlLwZ3nWqwRD7HkRoo2XmzDvoq8=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=ifxkKVl0GPRe6X9xRXCxuQsaXzhuzETcQjGh1yvhn2kTamjBcl3ufA40zblWc04olMGQd72FpoIJg6Lbi0CdPYHNgECj9BJFIJYnsksZyMv6nnGP1wgaN6UHOH1/W4DFU3+JwBhdZnvnfclv5ejgbOsHgInZExkwIu+4bDwQG/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=ePHLIVEv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DBD3C2BBFC; Thu, 13 Jun 2024 20:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1718309061; bh=MEYJeXpmEp6BsUZfvlLwZ3nWqwRD7HkRoo2XmzDvoq8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ePHLIVEvf8YkzFBvOsUPZOXxGRHALYvuZtGNX5BBtWzd3MVoYIbpOuUjGZIoy45vY l2wUwpQXJrsqaHe8kYhTYe/HbJCZ41HiWLztGV9odkdwdUzLh/bV9/ej1kW/PAYVZ3 jr33auWyfX2eFeOywquKIjzxXlNEpP4kn02ojBfo= Date: Thu, 13 Jun 2024 13:04:20 -0700 From: Andrew Morton To: Steven Rostedt Cc: Alexey Dobriyan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH] linux++: delete some forward declarations Message-Id: <20240613130420.a62ed8965a73b0f8d35890d4@linux-foundation.org> In-Reply-To: <20240613153402.3b067d4b@rorschach.local.home> References: <5ad5556c-7c32-45b7-89cf-f723c9d7332b@p183> <20240613153402.3b067d4b@rorschach.local.home> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Thu, 13 Jun 2024 15:34:02 -0400 Steven Rostedt wrote: > On Thu, 13 Jun 2024 22:22:18 +0300 > Alexey Dobriyan wrote: > > > g++ doesn't like forward enum declarations: > > > > error: use of enum ā€˜Eā€™ without previous declaration > > 64 | enum E; > > But we don't care about g++. Do we? It appears that g++ is a useful enum declaration detector. I'm curious to know how even the above warning was generated. Does g++ work at all on Linux? > I would make that a separate patch. What are you referring to here? > > > > Delete those which aren't used. > > > > Delete some unused/unnecessary forward struct declarations for a change. > > This is a clean up, but should have a better change log. Just something > simple like: > > Delete unnecessary forward struct declarations. Alexey specializes in cute changelogs. I do have a concern about the patch: has it been tested with all possible Kconfigs? No. There may be some configs in which the forward declaration is required. And... I'm a bit surprised that forward declarations are allowed in C. A billion years ago I used a C compiler which would use 16 bits for an enum if the enumted values would fit in 16 bits. And it would use 32 bits otherwise. So the enumerated values were *required* for the compiler to be able to figure out the sizeof. But it was a billion years ago.