Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions src/nvfs-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,9 @@ static inline bool unsigned_offsets(struct file *file)
return file->f_mode & FMODE_UNSIGNED_OFFSET;
}

int nvfs_rw_verify_area(int read_write, struct file *file,
char __user *buf, const loff_t *ppos, size_t count)
static int nvfs_rw_verify_area(int read_write, struct file *file,
char __user *buf, const loff_t *ppos,
size_t count)
{
struct inode *inode;
loff_t pos;
Expand Down
4 changes: 4 additions & 0 deletions src/nvfs-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@

#include <linux/list.h>

#ifndef MAX
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#endif
#ifndef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
Expand Down
6 changes: 3 additions & 3 deletions src/nvfs-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ static int nvfs_dma_map_sg_attrs(struct device *device,
return nvfs_dma_map_sg_attrs_internal(device, sglist, nents, dma_dir, attrs, false);
}
#ifdef NVFS_ENABLE_KERN_RDMA_SUPPORT
int nvfs_get_gpu_sglist_rdma_info(struct scatterlist *sglist,
int nents,
struct nvfs_rdma_info *rdma_infop)
static int nvfs_get_gpu_sglist_rdma_info(struct scatterlist *sglist,
int nents,
struct nvfs_rdma_info *rdma_infop)
{
struct scatterlist *sg = NULL;
struct page *page;
Expand Down
8 changes: 4 additions & 4 deletions src/nvfs-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ unsigned int _lookup_index_entry(uint64_t pcidevinfo,
* @params : pci device info of the gpu
* @returns : index
*/
unsigned int nvfs_create_gpu_hash_entry(uint64_t pdevinfo)
static unsigned int nvfs_create_gpu_hash_entry(uint64_t pdevinfo)
{
if (!pdevinfo)
return UINT_MAX;
Expand All @@ -174,7 +174,7 @@ unsigned int nvfs_create_gpu_hash_entry(uint64_t pdevinfo)
* @params : pci device info of the peer device
* @returns : index
*/
unsigned int nvfs_create_peer_hash_entry(uint64_t pdevinfo)
static unsigned int nvfs_create_peer_hash_entry(uint64_t pdevinfo)
{
if (!pdevinfo)
return UINT_MAX;
Expand Down Expand Up @@ -206,7 +206,7 @@ uint64_t nvfs_lookup_gpu_hash_index_entry(unsigned int index)
* @params : pci device info of peer device
* @returns : hash index
*/
unsigned int nvfs_get_peer_hash_index(uint64_t pdevinfo)
static unsigned int nvfs_get_peer_hash_index(uint64_t pdevinfo)
{
return _lookup_index_entry(pdevinfo, peer_info_table, MAX_PEER_DEVS);
}
Expand Down Expand Up @@ -729,7 +729,7 @@ void nvfs_update_peer_usage(unsigned int gpu_index, u64 peer_pdevinfo) {
* @params : distance to match
* @returns : count
*/
uint64_t nvfs_aggregate_peer_usage_by_distance(unsigned int gpu_index, unsigned int pci_dist) {
static uint64_t nvfs_aggregate_peer_usage_by_distance(unsigned int gpu_index, unsigned int pci_dist) {
unsigned int i;
uint64_t count = 0;
if (unlikely(gpu_index >= MAX_GPU_DEVS)) {
Expand Down
2 changes: 1 addition & 1 deletion src/nvfs-proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
extern struct module_entry modules_list[];
extern struct mutex nvfs_module_mutex;

int nvfs_modules_show(struct seq_file *m, void *v)
static int nvfs_modules_show(struct seq_file *m, void *v)
{
int i;
struct module_entry *mod_entry;
Expand Down
1 change: 1 addition & 0 deletions src/nvfs-rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "nvfs-core.h"
#include "nvfs-dma.h"
#include "nvfs-mmap.h"
#include "nvfs-rdma.h"


int nvfs_set_rdma_reg_info_to_mgroup(
Expand Down