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

Cleanup commits. #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
File renamed without changes.
8 changes: 1 addition & 7 deletions include/net/kfi/kfi_internal.h → include/kfi_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@
#ifndef _KFI_INTERNAL_H_
#define _KFI_INTERNAL_H_

#include <linux/kernel.h>
#include <linux/byteorder/generic.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/string.h>

#include <net/kfi/kfi.h>
//#include <net/kfi/kfi.h>

#define DRV_NAME "kfi"
#define DRV_PFX "[" DRV_NAME "] "
Expand Down
43 changes: 0 additions & 43 deletions include/net/kfi/kfi.h

This file was deleted.

2 changes: 0 additions & 2 deletions include/net/kfi/kfi_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

#include <net/kfi/fabric.h>

#include <net/kfi/kfi.h>

struct kfi_provider {
const char *name;
uint32_t version;
Expand Down
2 changes: 1 addition & 1 deletion kfi/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MOD=kfabric

obj-m := $(MOD).o

$(MOD)-y := main.o kfi.o common.o
$(MOD)-y := main.o kfi.o common.o enosys.o

ccflags-n += -DCONFIG_KFI_DEBUG=1
ccflags-y += -I$(src)/../include
Expand Down
2 changes: 1 addition & 1 deletion kfi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ clean:
main.o: $(src)/main.c Makefile
kfi.o: $(src)/kfi.c Makefile
common.o: $(src)/common.c Makefile

enosys.o: $(src)/enosys.c Makefile

info: $(MOD).ko
modinfo $(MOD).ko
Expand Down
3 changes: 0 additions & 3 deletions kfi/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@
#include <linux/module.h>
#include <linux/slab.h>

#include <net/kfi/kfi.h>

#include <net/kfi/fabric.h>
#include <net/kfi/fi_errno.h>


void fi_freeinfo_internal(struct fi_info *info)
{
kfree(info->src_addr);
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions kfi/kfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
#include <net/kfi/fabric.h>
#include <net/kfi/fi_errno.h>
#include <net/kfi/fi_atomic.h>

#include <net/kfi/kfi_internal.h>
#include <net/kfi/kfi_provider.h>
#include <net/kfi/debug.h>

#include "kfi_internal.h"
#include "debug.h"


int kfi_register_provider(uint32_t version, struct kfi_provider *provider)
Expand Down Expand Up @@ -468,7 +468,7 @@ struct fi_info *fi_dupinfo(const struct fi_info *info)
*dup->domain_attr = *info->domain_attr;
if (info->domain_attr->name != NULL) {
dup->domain_attr->name =
strdup(info->domain_attr->name);
kstrdup(info->domain_attr->name, GFP_KERNEL);
if (dup->domain_attr->name == NULL)
goto fail;
}
Expand All @@ -481,13 +481,13 @@ struct fi_info *fi_dupinfo(const struct fi_info *info)
*dup->fabric_attr = *info->fabric_attr;
if (info->fabric_attr->name != NULL) {
dup->fabric_attr->name =
strdup(info->fabric_attr->name);
kstrdup(info->fabric_attr->name, GFP_KERNEL);
if (dup->fabric_attr->name == NULL)
goto fail;
}
if (info->fabric_attr->prov_name != NULL) {
dup->fabric_attr->prov_name =
strdup(info->fabric_attr->prov_name);
kstrdup(info->fabric_attr->prov_name, GFP_KERNEL);
if (dup->fabric_attr->prov_name == NULL)
goto fail;
}
Expand Down
6 changes: 3 additions & 3 deletions kfi/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
#include <linux/proc_fs.h>

#include <net/kfi/fabric.h>
#include <net/kfi/kfi_provider.h>

#include "net/kfi/kfi_internal.h"
#include "net/kfi/kfi_provider.h"
#include "net/kfi/debug.h"
#include "kfi_internal.h"
#include "debug.h"

MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION("Kernel OpenFabrics Interface");
Expand Down
2 changes: 1 addition & 1 deletion prov/verbs/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MOD=kfip_verbs

obj-m := $(MOD).o

$(MOD)-y := main.o enosys.o
$(MOD)-y := main.o

ccflags-y := -I$(src)
ccflags-y += -I$(src)/../../include
Expand Down
4 changes: 1 addition & 3 deletions prov/verbs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ KBUILD_SRC=$(KDIR)
obj-m += $(MODULE_NAME).o

$(MODULE_NAME)-y := \
main.o \
enosys.o
main.o

all: $(KSYM)
@echo $(PWD)
Expand All @@ -67,7 +66,6 @@ clean:
@echo Done.

main.o: main.c ibpv.h Makefile
enosys.o: enosys.c ibpv.h Makefile

info: $(MOD).ko
modinfo $(MOD).ko
Expand Down
34 changes: 0 additions & 34 deletions prov/verbs/enosys.c

This file was deleted.

9 changes: 3 additions & 6 deletions prov/verbs/ibvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
#define CONFIG_COMPAT_IS_KTHREAD
#include <linux/kthread.h>

#include "net/kfi/kfi_provider.h"
#include "net/kfi/debug.h"

#include <rdma/ib_verbs.h>
#include <rdma/ib_pack.h>
#include <rdma/ib_sa.h>
Expand All @@ -57,9 +54,9 @@
#include <net/kfi/fi_eq.h>
#include <net/kfi/fi_errno.h>
#include <net/kfi/fi_rma.h>
#include <net/kfi/fi_tagged.h>
#include <net/kfi/fi_trigger.h>
#include <net/kfi/fi_direct.h>
#include <net/kfi/kfi_provider.h>

#include "debug.h"

#define DRV_NAME "kfip_ibverbs"
#define DRV_PFX "[" DRV_NAME "] "
Expand Down
8 changes: 5 additions & 3 deletions tests/getinfo/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
#include <linux/inet.h>
#include <linux/slab.h>

#include <net/kfi/fi_endpoint.h>
#include <net/kfi/fi_errno.h>

#include "debug.h"

MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION("Kernel Fabric Interface test: fi_getinfo()");
MODULE_AUTHOR("Sean Hefty<[email protected]>");
Expand All @@ -66,9 +71,6 @@ static char *ibv_ipaddr = LOCAL_IF;
module_param(ibv_ipaddr, charp, 0000);
MODULE_PARM_DESC(ibv_ipaddr, " InfiniBand IF IPv4 address");

#include <net/kfi/debug.h>
#include <net/kfi/fi_endpoint.h>
#include <net/kfi/fi_errno.h>

char *fi_tostr(const void *data, enum fi_type datatype);

Expand Down
2 changes: 1 addition & 1 deletion tests/verbs/mm2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define CONFIG_COMPAT_IS_KTHREAD
#include <linux/kthread.h>

#include <net/kfi/debug.h>
#include "debug.h"

#define DRV_PFX "[" DRV_NAME "] "

Expand Down