Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compile error on RHEL 9.4 #966

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions kmod/uoa/uoa.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ static int uoa_stats_percpu_show(struct seq_file *seq, void *arg)
unsigned int start;

do {
#if (RHEL_MAJOR == 9 && RHEL_MINOR < 4)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RHEL_MAJOR macro may be undefined in not-redhat system. You should use linux kernel version macro KERNEL_VERSION instead.
u64_stats_fetch_begin_irq() and u64_stats_fetch_retry_irq() got obsoleted since linux v6.3

start = u64_stats_fetch_begin_irq(&s->syncp);
#else
start = u64_stats_fetch_begin(&s->syncp);
#endif
#endif
success = s->success;
miss = s->miss;
Expand All @@ -209,7 +213,11 @@ static int uoa_stats_percpu_show(struct seq_file *seq, void *arg)
saved = s->uoa_saved;
ack_fail = s->uoa_ack_fail;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
#if (RHEL_MAJOR == 9 && RHEL_MINOR < 4)
} while (u64_stats_fetch_retry_irq(&s->syncp, start));
#else
} while (u64_stats_fetch_retry(&s->syncp, start));
#endif
#endif

seq_printf(seq,
Expand Down
Loading