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

Fixes several missing-prototype warnings. #165

Merged
merged 9 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,21 @@ install-spank: spank
$(INSTALL) -d $(DESTDIR)/$(libdir)/slurm
$(INSTALL) msrsave/libspank_msrsafe.so $(DESTDIR)/$(libdir)/slurm/libspank_msrsafe.so

# The current spack package ignore this Makefile for building the
# msr-safe.ko kernel module, as it is building against an arbitrary
# version of the linux kernel and thus $(shell uname -r) is not useful.
#
# Installation relies on the spack package setting DESTDIR to the
# msr-safe package prefix spec variable.
#
# Later iterations of the spack package might also build and install
# msrsave. That will likely require a reworking of this Makefile.
# Prefer single-source-of-truth in that case.
spack-install:
$(INSTALL) -d $(DESTDIR)/lib/modules
$(INSTALL) msr-safe.ko $(DESTDIR)/lib/modules
$(INSTALL) -d $(DESTDIR)/include
$(INSTALL) msr_safe.h $(DESTDIR)/include

.SUFFIXES: .c .o
.PHONY: all clean install spank install-spank
1 change: 1 addition & 0 deletions msr-smp.c
slabasan marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/smp.h>

#include "msr_safe.h"
#include "msr-smp.h"

static void __msr_safe_batch(void *info)
{
Expand Down
6 changes: 6 additions & 0 deletions msr-smp.h
slabasan marked this conversation as resolved.
Show resolved Hide resolved
slabasan marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef MSR_SMP_INCLUDE
#define MSR_SMP_INCLUDE

int msr_safe_batch(struct msr_batch_array *oa);

#endif
2 changes: 2 additions & 0 deletions msr_allowlist.c
slabasan marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <linux/uaccess.h>
#include <linux/version.h>

#include "msr_allowlist.h"

#define MAX_WLIST_BSIZE ((128 * 1024) + 1) // "+1" for null character

struct allowlist_entry
Expand Down
2 changes: 1 addition & 1 deletion msr_allowlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

int msr_allowlist_init(int *majordev);

int msr_allowlist_cleanup(int majordev);
void msr_allowlist_cleanup(int majordev);

int msr_allowlist_exists(void);

Expand Down
2 changes: 1 addition & 1 deletion msr_batch.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "msr_batch.h"
#include "msr_safe.h"
#include "msr-smp.h"
#include "msr_allowlist.h"

static struct class *cdev_class;
Expand Down Expand Up @@ -73,7 +74,6 @@ static int msrbatch_apply_allowlist(struct msr_batch_array *oa)
return err;
}

extern int msr_safe_batch(struct msr_batch_array *oa);

static long msrbatch_ioctl(struct file *f, unsigned int ioc, unsigned long arg)
{
Expand Down
2 changes: 2 additions & 0 deletions msr_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <linux/module.h>
#include <linux/uaccess.h>

#include "msr_version.h"
slabasan marked this conversation as resolved.
Show resolved Hide resolved

static struct class *cdev_class;
static char cdev_created;
static char cdev_registered;
Expand Down
2 changes: 1 addition & 1 deletion msr_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

int msr_version_init(int *majordev);

int msr_version_cleanup(int majordev);
void msr_version_cleanup(int majordev);

#endif
Loading