Mark functions and global variables used only in a single file as
static.
Found with sparse.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
-ssize_t openvswitch_read(struct file *f, char __user *buf, size_t nbytes,
- loff_t *ppos)
+static ssize_t openvswitch_read(struct file *f, char __user *buf,
+ size_t nbytes, loff_t *ppos)
{
/* XXX is there sufficient synchronization here? */
int listeners = get_listen_mask(f);
{
/* XXX is there sufficient synchronization here? */
int listeners = get_listen_mask(f);
-struct file_operations openvswitch_fops = {
+static struct file_operations openvswitch_fops = {
/* XXX .aio_read = openvswitch_aio_read, */
.read = openvswitch_read,
.poll = openvswitch_poll,
/* XXX .aio_read = openvswitch_aio_read, */
.read = openvswitch_read,
.poll = openvswitch_poll,
#define DEV_ATTR(NAME) dev_attr_##NAME
#endif
#define DEV_ATTR(NAME) dev_attr_##NAME
#endif
-struct datapath *sysfs_get_dp(struct net_device *netdev)
+static struct datapath *sysfs_get_dp(struct net_device *netdev)
{
struct vport *vport = internal_dev_get_vport(netdev);
return vport ? vport->dp : NULL;
{
struct vport *vport = internal_dev_get_vport(netdev);
return vport ? vport->dp : NULL;
-struct kmem_cache *flow_cache;
+static struct kmem_cache *flow_cache;
static unsigned int hash_seed __read_mostly;
static inline bool arphdr_ok(struct sk_buff *skb)
static unsigned int hash_seed __read_mostly;
static inline bool arphdr_ok(struct sk_buff *skb)
static struct tbl *port_table __read_mostly;
static void cache_cleaner(struct work_struct *work);
static struct tbl *port_table __read_mostly;
static void cache_cleaner(struct work_struct *work);
-DECLARE_DELAYED_WORK(cache_cleaner_wq, cache_cleaner);
+static DECLARE_DELAYED_WORK(cache_cleaner_wq, cache_cleaner);
/*
* These are just used as an optimization: they don't require any kind of
/*
* These are just used as an optimization: they don't require any kind of