Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp393696lqs; Thu, 13 Jun 2024 13:10:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUt2Oo86tzH/iPwlP1EWcMSjILuWy5EqG7nM5ObYX7T67lu22cRXVWV7mHjHQDicD7b72agXouSlT96ZXHV+Kv9did8c33PuHH1WG1lHQ== X-Google-Smtp-Source: AGHT+IEdG+ApfxlWTaPjzydhe/foVgGKEaFFo1QaiZl0PB4V23jAMld+W+NpOy3B1ClciNVZdwB3 X-Received: by 2002:a05:6102:c93:b0:48d:addd:6d02 with SMTP id ada2fe7eead31-48dae3cfd9bmr941897137.30.1718309422538; Thu, 13 Jun 2024 13:10:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718309422; cv=pass; d=google.com; s=arc-20160816; b=eJDS+yrIpeMrnhNeUE8h0ipa5BC3+302MwQee4ai26wvTAmSe0+sMWoIsqs6nNSYHa eORtZAG/w/dlKpStBdpMLMb93V0qVUXScH6/hdbHsJQB7D39BYsdDwWjJjUrWjuSBQ6x xHUvvh6L9Y1lFVtMzZ1IpCpc0C/ffiyBvDmtT+vpJ95wmNnvgKZ4Y7oQveeFTWn+0IZe mOz8rgTHXZGhTI50MncHoQDKzBlYioaNm9ZFVy4mJQRs6wmqd6bcGu/W38LiRC4W6j0w 1CSZrnmbRI/2ngaC5gXQcLobdaM7g1/sRQm9zye9f5ic3J2yuuAq91oU5TeLw/DdK5i4 ygJw== 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; bh=6uphRPQ/afaXGoJUS8d4gz8cDMMc2Zxhz2FTKQQh/tg=; fh=LqlFpG2LTUhK99uQkHPEhX7ym1rMSMkAcVZO2KfrSdk=; b=R7iKykqLIZIGcKwnqbe01BNAlV8JeL/y11mttgd3FHygkY27XfXv/gss+vQZAvwq4M g4OY0nD0C16kLuFGP3uYuBigDIYEmegc0PY0S5JEG8JgRawEBAF74DW2j0iVG9hW9Cqw ep6Ocu+6dYbob3rV4y1bcjXfsbWhC6JW28tLUrxUWf+y7/wqzByC5sgz4ycjcXkMkBzi Wjh1KSfe+x2hSSCV4rfiydmcUzWpMCIQZjbtSXA3+dkEg9XBYlS3fOS9LN6yo0VSYGbi zLJu3RXmqbLdbwEtnWl2aX3VOSf7RBEcY3MHZf5anhG3/+AsrnKLjeXCTjo9MjeVnyHV NRug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-213970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213970-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ada2fe7eead31-48da44b47f3si511101137.657.2024.06.13.13.10.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 13:10:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-213970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213970-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 432001C23365 for ; Thu, 13 Jun 2024 20:10:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E200E139CEE; Thu, 13 Jun 2024 20:10:14 +0000 (UTC) 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 62433136E1D; Thu, 13 Jun 2024 20:10:14 +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=1718309414; cv=none; b=S9We/C6ePQwR/IhGnL5jlIh8I/3MYwE7px9K7muH+xuOuGHQPSpV7q9JTR1eMQf46TIW9wa0kiTd7xLWzMnm+IaUupunbd3ID0qfjfM71pJHhA6/V1LG1rCIfyGmTqlJWZAUywqUxYRNqucj4BNfDNK2ToxR+PI7OhNfE/4lDbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718309414; c=relaxed/simple; bh=IjmHMXcphwekH/gLOJkQYvaNS+ZdtxIQCAgnq4I7qjw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=a/ElfHe7xdpVECcZuxP3hHfM6WDggO8bIucTLBRlTKN2TCe/vcCHn5V7V2xd7tuisjliNsVGKwfdWUe747pVcCg0CzkPt96BEvUBK3lTDSMatzW2q+e2jdCx1ph0jfGrYhUtK9O7yOVgLChgkSQlzedAEDIEPcFJfzKi/h2GiiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 794DDC2BBFC; Thu, 13 Jun 2024 20:10:13 +0000 (UTC) Date: Thu, 13 Jun 2024 16:10:12 -0400 From: Steven Rostedt To: Andrew Morton 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: <20240613161012.1dd2ff60@rorschach.local.home> In-Reply-To: <20240613130420.a62ed8965a73b0f8d35890d4@linux-foundation.org> References: <5ad5556c-7c32-45b7-89cf-f723c9d7332b@p183> <20240613153402.3b067d4b@rorschach.local.home> <20240613130420.a62ed8965a73b0f8d35890d4@linux-foundation.org> X-Mailer: Claws Mail 3.17.8 (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: quoted-printable On Thu, 13 Jun 2024 13:04:20 -0700 Andrew Morton wrote: > On Thu, 13 Jun 2024 15:34:02 -0400 Steven Rostedt w= rote: >=20 > > On Thu, 13 Jun 2024 22:22:18 +0300 > > Alexey Dobriyan wrote: > > =20 > > > g++ doesn't like forward enum declarations: > > >=20 > > > error: use of enum =E2=80=98E=E2=80=99 without previous declaration > > > 64 | enum E; =20 > >=20 > > But we don't care about g++. Do we? =20 >=20 > It appears that g++ is a useful enum declaration detector. >=20 > I'm curious to know how even the above warning was generated. Does g++ > work at all on Linux? >=20 > > I would make that a separate patch. =20 >=20 > What are you referring to here? The enum change should be separate from the struct changes. >=20 > > >=20 > > > Delete those which aren't used. > > >=20 > > > Delete some unused/unnecessary forward struct declarations for a chan= ge. =20 > >=20 > > This is a clean up, but should have a better change log. Just something > > simple like: > >=20 > > Delete unnecessary forward struct declarations. =20 >=20 > Alexey specializes in cute changelogs. eh >=20 > 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. >=20 > 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. Well, I only looked at the one change in ftrace.h which has a "struct seq_file;" that is not used anywhere else in the file, so that one definitely can go. -- Steve