Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04d29b0e authored by Roland Dreier's avatar Roland Dreier
Browse files

IB/uverbs: Make ib_uverbs_release_event_file() static



ib_uverbs_release_event_file() is only used in uverbs_main.c, so make it
static to that file.  Also move the definition before the first use, so
a forward declaration is not needed.

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent a394f83b
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -148,7 +148,6 @@ void idr_remove_uobj(struct idr *idp, struct ib_uobject *uobj);


struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
					int is_async, int *fd);
					int is_async, int *fd);
void ib_uverbs_release_event_file(struct kref *ref);
struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd);
struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd);


void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
+8 −8
Original line number Original line Diff line number Diff line
@@ -125,6 +125,14 @@ static void ib_uverbs_release_dev(struct kref *ref)
	complete(&dev->comp);
	complete(&dev->comp);
}
}


static void ib_uverbs_release_event_file(struct kref *ref)
{
	struct ib_uverbs_event_file *file =
		container_of(ref, struct ib_uverbs_event_file, ref);

	kfree(file);
}

void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
			  struct ib_uverbs_event_file *ev_file,
			  struct ib_uverbs_event_file *ev_file,
			  struct ib_ucq_object *uobj)
			  struct ib_ucq_object *uobj)
@@ -331,14 +339,6 @@ static unsigned int ib_uverbs_event_poll(struct file *filp,
	return pollflags;
	return pollflags;
}
}


void ib_uverbs_release_event_file(struct kref *ref)
{
	struct ib_uverbs_event_file *file =
		container_of(ref, struct ib_uverbs_event_file, ref);

	kfree(file);
}

static int ib_uverbs_event_fasync(int fd, struct file *filp, int on)
static int ib_uverbs_event_fasync(int fd, struct file *filp, int on)
{
{
	struct ib_uverbs_event_file *file = filp->private_data;
	struct ib_uverbs_event_file *file = filp->private_data;