Linux Trace Kernel
 help / color / mirror / Atom feed
From: Crystal Wood <crwood@redhat.com>
To: Tomas Glozar <tglozar@redhat.com>,
	Costa Shulyupin <costa.shul@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Wander Lairson Costa	 <wander@redhat.com>,
	Ivan Pravdin <ipravdin.official@gmail.com>,
	John Kacur <jkacur@redhat.com>,
	Tiezhu Yang <yangtiezhu@loongson.cn>,
	 linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org,  bpf@vger.kernel.org
Subject: Re: [PATCH v1 1/4] tools/rtla: Consolidate nr_cpus usage across all tools
Date: Mon, 05 Jan 2026 16:24:50 -0600	[thread overview]
Message-ID: <7f953b7e2a9d30e0f22c30c5c4e10828018bc40c.camel@redhat.com> (raw)
In-Reply-To: <CAP4=nvSr=Wz--CJgJ9kmXfB3r3uNYnt9bJt-_bCigH--rbbx2A@mail.gmail.com>

On Wed, 2025-12-17 at 10:06 +0100, Tomas Glozar wrote:
> út 16. 12. 2025 v 15:41 odesílatel Tomas Glozar <tglozar@redhat.com> napsal:
> > Since commit 2f3172f9dd58c ("tools/rtla: Consolidate code between
> > osnoise/timerlat and hist/top") that was merged into 6.18, common.h
> > includes timerlat_u.h. Your change thus causes a double include of
> > timerlat_u.h, leading to a build error:
> > 
> > In file included from src/timerlat_u.c:20:
> > src/timerlat_u.h:6:8: error: redefinition of ‘struct timerlat_u_params’
> >    6 | struct timerlat_u_params {
> >      |        ^~~~~~~~~~~~~~~~~
> > In file included from src/common.h:5,
> >                 from src/timerlat_u.c:19:
> > src/timerlat_u.h:6:8: note: originally defined here
> >    6 | struct timerlat_u_params {
> >      |        ^~~~~~~~~~~~~~~~~
> > 
> > Please rebase your patchset and fix this so that timerlat_u.h is only
> > included once.
> > 
> 
> Correction: the base of the patchset has nothing to do with this. It
> is the C standard, from C23 (default in GCC 15), redefinition of
> structs is allowed [1], so this error doesn't exist. In earlier
> standards, this is not allowed.
> 
> [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2863.pdf

Regardless of how permissive the language might be getting in this case,
we should have #pragma once on all of the headers to avoid this sort of
problem.

-Crystal


      reply	other threads:[~2026-01-05 22:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 15:19 [PATCH v1 1/4] tools/rtla: Consolidate nr_cpus usage across all tools Costa Shulyupin
2025-12-05 15:19 ` [PATCH v1 2/4] tools/rtla: Remove unneeded nr_cpus arguments Costa Shulyupin
2025-12-05 15:19 ` [PATCH v1 3/4] tools/rtla: Remove unneeded nr_cpus members Costa Shulyupin
2025-12-05 15:19 ` [PATCH v1 4/4] tools/rtla: Remove unneeded nr_cpus from for_each_monitored_cpu Costa Shulyupin
2025-12-16 14:41 ` [PATCH v1 1/4] tools/rtla: Consolidate nr_cpus usage across all tools Tomas Glozar
2025-12-17  9:06   ` Tomas Glozar
2026-01-05 22:24     ` Crystal Wood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f953b7e2a9d30e0f22c30c5c4e10828018bc40c.camel@redhat.com \
    --to=crwood@redhat.com \
    --cc=bpf@vger.kernel.org \
    --cc=costa.shul@redhat.com \
    --cc=ipravdin.official@gmail.com \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglozar@redhat.com \
    --cc=wander@redhat.com \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox