Linux Perf Users
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Ian Rogers <irogers@google.com>, Namhyung Kim <namhyung@kernel.org>
Cc: linux-kernel@vger.kernel.org, mmayer@broadcom.com,
	bcm-kernel-feedback-list@broadcom.com,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	"open list:PERFORMANCE EVENTS SUBSYSTEM"
	<linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH] perf trace beauty fcntl: Fix build with older kernel headers
Date: Thu, 14 May 2026 09:57:38 -0700	[thread overview]
Message-ID: <9a1b7351-bf10-4120-b29b-7f6b340ae92e@broadcom.com> (raw)
In-Reply-To: <CAP-5=fUJvVGEeA7+mk8KjracroD_5xhSi2pp7eQbEv9xGeq19g@mail.gmail.com>



On 5/14/2026 9:37 AM, Ian Rogers wrote:
> On Thu, May 14, 2026 at 8:56 AM Namhyung Kim <namhyung@kernel.org> wrote:
>>
>> Hello,
>>
>> On Wed, May 13, 2026 at 12:23:46PM -0700, Florian Fainelli wrote:
>>> Toolchains with older kernel headers that do not include upstream commit
>>> c75b1d9421f80f4143e389d2d50ddfc8a28c8c35 ("fs: add fcntl() interface for
>>> setting/getting write life time hints") will now fail to build perf due
>>> to missing definitions for
>>> F_GET_RW_HINT/F_SET_RW_HINT/F_GET_FILE_RW_HINT/F_SET_FILE_RW_HINT.
>>
>> Can you share the error messages?

The compile errors look like this:

trace/beauty/fcntl.c: In function 'syscall_arg__scnprintf_fcntl_arg':
trace/beauty/fcntl.c:96:13: error: 'F_GET_RW_HINT' undeclared (first use 
in this function); did you mean 'F_GETOWN'?
       cmd == F_GET_RW_HINT || cmd == F_SET_RW_HINT ||
              ^~~~~~~~~~~~~
              F_GETOWN
trace/beauty/fcntl.c:96:13: note: each undeclared identifier is reported 
only once for each function it appears in
trace/beauty/fcntl.c:96:37: error: 'F_SET_RW_HINT' undeclared (first use 
in this function); did you mean 'F_SETOWN'?
       cmd == F_GET_RW_HINT || cmd == F_SET_RW_HINT ||
                                      ^~~~~~~~~~~~~
                                      F_SETOWN
trace/beauty/fcntl.c:97:13: error: 'F_GET_FILE_RW_HINT' undeclared 
(first use in this function); did you mean 'F_GETOWNER_UIDS'?
       cmd == F_GET_FILE_RW_HINT || cmd == F_SET_FILE_RW_HINT)
              ^~~~~~~~~~~~~~~~~~
              F_GETOWNER_UIDS
trace/beauty/fcntl.c:97:42: error: 'F_SET_FILE_RW_HINT' undeclared 
(first use in this function)
       cmd == F_GET_FILE_RW_HINT || cmd == F_SET_FILE_RW_HINT)
                                           ^~~~~~~~~~~~~~~~~~

>>
>> I think this code should use a copy of the header in
>> trace/beauty/include/uapi/linux/fcntl.h which has the definitions.
> 
> I don't think the beauty headers are in the include path.

I suppose if it were however that would provide the missing definition, 
maybe that's a better path forward to front load the inclusion of 
trace/beauty/include/uapi/linux/fcntl.h?
-- 
Florian


  reply	other threads:[~2026-05-14 16:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 19:23 [PATCH] perf trace beauty fcntl: Fix build with older kernel headers Florian Fainelli
2026-05-13 20:58 ` Ian Rogers
2026-05-13 21:56   ` Florian Fainelli
2026-05-13 23:13     ` Ian Rogers
2026-05-14 15:56 ` Namhyung Kim
2026-05-14 16:37   ` Ian Rogers
2026-05-14 16:57     ` Florian Fainelli [this message]
2026-05-14 17:13       ` Ian Rogers

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=9a1b7351-bf10-4120-b29b-7f6b340ae92e@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mmayer@broadcom.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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