Skip to content

Commit

Permalink
staging/lustre/osc: extern declare osc_caches in a header
Browse files Browse the repository at this point in the history
This avoids frowned upon extern in the C file, and also
shuts down a sparse warning of
drivers/staging/lustre/lustre/osc/osc_dev.c:55:22: warning: symbol 'osc_caches' was not declared. Should it be static?

Signed-off-by: Oleg Drokin <[email protected]>
Reviewed-by: James Simmons <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
verygreen authored and gregkh committed Jan 3, 2017
1 parent d445048 commit f62427b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/lustre/lustre/osc/osc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ static inline struct osc_device *obd2osc_dev(const struct obd_device *d)
return container_of0(d->obd_lu_dev, struct osc_device, od_cl.cd_lu_dev);
}

extern struct lu_kmem_descr osc_caches[];

extern struct kmem_cache *osc_quota_kmem;
struct osc_quota_info {
/** linkage for quota hash table */
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/lustre/lustre/osc/osc_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -2766,8 +2766,6 @@ static struct obd_ops osc_obd_ops = {
.quotactl = osc_quotactl,
};

extern struct lu_kmem_descr osc_caches[];

static int __init osc_init(void)
{
struct lprocfs_static_vars lvars = { NULL };
Expand Down

0 comments on commit f62427b

Please sign in to comment.