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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34AF6C27C4F for ; Thu, 13 Jun 2024 20:10:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F9536B00C0; Thu, 13 Jun 2024 16:10:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A9F36B00C1; Thu, 13 Jun 2024 16:10:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 797666B00C3; Thu, 13 Jun 2024 16:10:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5BC036B00C0 for ; Thu, 13 Jun 2024 16:10:18 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0BED380325 for ; Thu, 13 Jun 2024 20:10:18 +0000 (UTC) X-FDA: 82226957316.23.ED14C28 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 9DE1F100027 for ; Thu, 13 Jun 2024 20:10:15 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of "SRS0=ySKb=NP=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=ySKb=NP=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718309414; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6uphRPQ/afaXGoJUS8d4gz8cDMMc2Zxhz2FTKQQh/tg=; b=5rMejMeMlIeDw8pP7JEoE05cWDOM9Dy2E/J1Ojjw2poN+fZbRepGMeRw9KD4jP2BYthezh mmRPkvrPbCTqAtuqIV440nEmZzyaq4du19FZCUD5PZtRJwScUoy5SHtWb2SApAquT5hPSk Av63mK8DqNXlJWsby0NzIQ0YsuX9w4c= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of "SRS0=ySKb=NP=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=ySKb=NP=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718309414; a=rsa-sha256; cv=none; b=m/6YchezAY6ZJZn+xdy+UHSkm7GhleQh9YJ0eLLVVi/L/7Asi7TDb8kd7y9mavXPndjc5z 9mXBZLbeHtmGSTrGOYQYkXpHOdUNtXbG5n7KB7jRWT8bBTfosjS4nNS7SunvVE8IcmvODS fi3H7As5au1lqpVu0aUEglDHw4TN9Ao= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 9E55C61D21; Thu, 13 Jun 2024 20:10:14 +0000 (UTC) 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) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 9DE1F100027 X-Stat-Signature: j1boa6h5sxna83hnxpaf1minzeibsda7 X-Rspam-User: X-HE-Tag: 1718309415-102653 X-HE-Meta: U2FsdGVkX194hh3vmzwWf/6Y2M1TODr7gz98W+DUQC7co3nNDYeBn5f7HtnM6AZ3Ety425g1OqACboMEscOCj3jcbCV2byHJoQcHkTpeV2ISO1rC0UwRJJe7L9s+VTKrwjP9Wv25/RJVj7O5vVplAfCcWvGjnc6y0wsYcn8U0aHKIRsEWGiI4N4h9Vy6wDHPW4zuR3QjRE8UBF0jvn9Sjg+s/Vxxc2fw3hNMz2B9l+zPSXkO+vjoZRxkEAsLiRJCFbotzAVcyDqARcf4ocJNva3QMnZRLb35wTHR5Y/YB1idpZz6Qr7vIllO2LDSwdM9gZZEB6X7oq/L5cjym94872M7ChAT8h/K8cB5XVeM7QWePWCY3/ntIQUkEqgvYMrXMdL00cW6U4k2ouXVnc3hSNZ0OMRS+NWXM2p1Oa0q2nKruWDDv8/Ht9gNPBHoSBVKhPYPDPcNtDgGbymcFrDhduOV9VJfAjqDfGLoXVY9mWw1UANQDL8eX6si27rIFtH4xFCzM1lZaL6QzQC21aMcl6FcPz4f2zh4ZUUcQFuR+ePtKH6yfxgiuW6Ponqo1MIpPxWXxsDQuuAXbunpIlikdoB1toOd3TDn8rvikG7FiMvztbf6fZ83lauaA/2rRXwa8hScvXWyKUFmpu92RFP7msKwjwS3YzEf4eEPhUjktlf0KhDSFvta4JOlAH+aEk/IEueFG7HMfi0/U3qyubDDf55bTmmHdIv3z3rAbzmA4i1lsJ1oT0yE6CEZYZqYIfwl6mJfqmZCMJWiNRUi/Q+Y5vh3xnAEi016Gq1w/cjW/8LPZfq71WVbsJ88KHqun0WTQOh0R9crztLX86qSYxUOaZEwiDtGQSVAmd++kVm2PpmQYpy+irDnoJCGUhq0X79aIroHOCHE6NEfF5Gc0DoUS6hQ+KZjDy2/2n4dtTUrCp8pa7+XDfeyDQVhu7TJcuZ360EQ01NUF6ZXFNjelsc zVe41IKM 62qA4zQOt73qsq1Zx0P9ZEs1tGbd4Y+kfn6/5i7XScAwVuKRop6wbw/0PzSeqPWRGRaA9rAR79cYSl7KZwvfcBaa/uduOP+iVby0puu2Sp4dOlTDRvl8y6044v4mb0mcHBCv5Uipf+mHFMVPG99sdVYaJYh+k/8Xp7VsDs7F6XtQzmQr4FmTz9tZ/IbsqJGdrhzdNFh2QPsnBF/8fEIx6zDYONE1EH6uErER5IdmPZUe5Ms5t4uuCpzb2cIKjqpV20YtTeKA1vBWadtBxHaCj7953ZISEaeRz1jXhQFikhmTxIFjfFjsiqeEU9mqRSJzJ2PBRtahk+wPRFVIjq3b9W8V0O1N8r0hrsgq091wbomocWrWnvaUNtI7kM9losW+IyiEmSzOA/RwPGNI= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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