Commit a2d288c6 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman
Browse files

staging: lustre: lnet: don't use bare unsigned



Turn all bare unsigned to unsigned int that were
detected by checkpatch in the LNet/libcfs layer.

Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1a252b13
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -216,8 +216,8 @@ struct ksock_nal_data {
	time64_t                ksnd_connd_starting_stamp;/* time stamp of the
	time64_t                ksnd_connd_starting_stamp;/* time stamp of the
							   * last starting connd
							   * last starting connd
							   */
							   */
	unsigned                ksnd_connd_starting;    /* # starting connd */
	unsigned int		ksnd_connd_starting;	/* # starting connd */
	unsigned                ksnd_connd_running;     /* # running connd */
	unsigned int		ksnd_connd_running;	/* # running connd */
	spinlock_t              ksnd_connd_lock;        /* serialise */
	spinlock_t              ksnd_connd_lock;        /* serialise */


	struct list_head        ksnd_idle_noop_txs;     /* list head for freed
	struct list_head        ksnd_idle_noop_txs;     /* list head for freed
+1 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ static int libcfs_param_debug_mb_set(const char *val,
				     const struct kernel_param *kp)
				     const struct kernel_param *kp)
{
{
	int rc;
	int rc;
	unsigned num;
	unsigned int num;


	rc = kstrtouint(val, 0, &num);
	rc = kstrtouint(val, 0, &num);
	if (rc < 0)
	if (rc < 0)
+13 −13
Original line number Original line Diff line number Diff line
@@ -682,7 +682,7 @@ EXPORT_SYMBOL(cfs_hash_bd_peek_locked);


static void
static void
cfs_hash_multi_bd_lock(struct cfs_hash *hs, struct cfs_hash_bd *bds,
cfs_hash_multi_bd_lock(struct cfs_hash *hs, struct cfs_hash_bd *bds,
		       unsigned n, int excl)
		       unsigned int n, int excl)
{
{
	struct cfs_hash_bucket *prev = NULL;
	struct cfs_hash_bucket *prev = NULL;
	int i;
	int i;
@@ -704,7 +704,7 @@ cfs_hash_multi_bd_lock(struct cfs_hash *hs, struct cfs_hash_bd *bds,


static void
static void
cfs_hash_multi_bd_unlock(struct cfs_hash *hs, struct cfs_hash_bd *bds,
cfs_hash_multi_bd_unlock(struct cfs_hash *hs, struct cfs_hash_bd *bds,
			 unsigned n, int excl)
			 unsigned int n, int excl)
{
{
	struct cfs_hash_bucket *prev = NULL;
	struct cfs_hash_bucket *prev = NULL;
	int i;
	int i;
@@ -719,10 +719,10 @@ cfs_hash_multi_bd_unlock(struct cfs_hash *hs, struct cfs_hash_bd *bds,


static struct hlist_node *
static struct hlist_node *
cfs_hash_multi_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds,
cfs_hash_multi_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds,
				unsigned n, const void *key)
				unsigned int n, const void *key)
{
{
	struct hlist_node *ehnode;
	struct hlist_node *ehnode;
	unsigned i;
	unsigned int i;


	cfs_hash_for_each_bd(bds, n, i) {
	cfs_hash_for_each_bd(bds, n, i) {
		ehnode = cfs_hash_bd_lookup_intent(hs, &bds[i], key, NULL,
		ehnode = cfs_hash_bd_lookup_intent(hs, &bds[i], key, NULL,
@@ -735,12 +735,12 @@ cfs_hash_multi_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds,


static struct hlist_node *
static struct hlist_node *
cfs_hash_multi_bd_findadd_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds,
cfs_hash_multi_bd_findadd_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds,
				 unsigned n, const void *key,
				 unsigned int n, const void *key,
				 struct hlist_node *hnode, int noref)
				 struct hlist_node *hnode, int noref)
{
{
	struct hlist_node *ehnode;
	struct hlist_node *ehnode;
	int intent;
	int intent;
	unsigned i;
	unsigned int i;


	LASSERT(hnode);
	LASSERT(hnode);
	intent = (!noref * CFS_HS_LOOKUP_MASK_REF) | CFS_HS_LOOKUP_IT_PEEK;
	intent = (!noref * CFS_HS_LOOKUP_MASK_REF) | CFS_HS_LOOKUP_IT_PEEK;
@@ -766,7 +766,7 @@ cfs_hash_multi_bd_findadd_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds,


static struct hlist_node *
static struct hlist_node *
cfs_hash_multi_bd_finddel_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds,
cfs_hash_multi_bd_finddel_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds,
				 unsigned n, const void *key,
				 unsigned int n, const void *key,
				 struct hlist_node *hnode)
				 struct hlist_node *hnode)
{
{
	struct hlist_node *ehnode;
	struct hlist_node *ehnode;
@@ -992,10 +992,10 @@ static inline void cfs_hash_depth_wi_cancel(struct cfs_hash *hs) {}
#endif /* CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1 */
#endif /* CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1 */


struct cfs_hash *
struct cfs_hash *
cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
cfs_hash_create(char *name, unsigned int cur_bits, unsigned int max_bits,
		unsigned bkt_bits, unsigned extra_bytes,
		unsigned int bkt_bits, unsigned int extra_bytes,
		unsigned min_theta, unsigned max_theta,
		unsigned int min_theta, unsigned int max_theta,
		struct cfs_hash_ops *ops, unsigned flags)
		struct cfs_hash_ops *ops, unsigned int flags)
{
{
	struct cfs_hash *hs;
	struct cfs_hash *hs;
	int len;
	int len;
@@ -1664,7 +1664,7 @@ int
cfs_hash_for_each_empty(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
cfs_hash_for_each_empty(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
			void *data)
			void *data)
{
{
	unsigned i = 0;
	unsigned int i = 0;


	if (cfs_hash_with_no_lock(hs))
	if (cfs_hash_with_no_lock(hs))
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;
@@ -1684,7 +1684,7 @@ cfs_hash_for_each_empty(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
EXPORT_SYMBOL(cfs_hash_for_each_empty);
EXPORT_SYMBOL(cfs_hash_for_each_empty);


void
void
cfs_hash_hlist_for_each(struct cfs_hash *hs, unsigned hindex,
cfs_hash_hlist_for_each(struct cfs_hash *hs, unsigned int hindex,
			cfs_hash_for_each_cb_t func, void *data)
			cfs_hash_for_each_cb_t func, void *data)
{
{
	struct hlist_head *hhead;
	struct hlist_head *hhead;
+4 −4
Original line number Original line Diff line number Diff line
@@ -222,8 +222,8 @@ EXPORT_SYMBOL(cfs_gettok);
 * \retval 0 otherwise
 * \retval 0 otherwise
 */
 */
int
int
cfs_str2num_check(char *str, int nob, unsigned *num,
cfs_str2num_check(char *str, int nob, unsigned int *num,
		  unsigned min, unsigned max)
		  unsigned int min, unsigned int max)
{
{
	bool all_numbers = true;
	bool all_numbers = true;
	char *endp, cache;
	char *endp, cache;
@@ -273,7 +273,7 @@ EXPORT_SYMBOL(cfs_str2num_check);
 * -ENOMEM will be returned.
 * -ENOMEM will be returned.
 */
 */
static int
static int
cfs_range_expr_parse(struct cfs_lstr *src, unsigned min, unsigned max,
cfs_range_expr_parse(struct cfs_lstr *src, unsigned int min, unsigned int max,
		     int bracketed, struct cfs_range_expr **expr)
		     int bracketed, struct cfs_range_expr **expr)
{
{
	struct cfs_range_expr	*re;
	struct cfs_range_expr	*re;
@@ -501,7 +501,7 @@ EXPORT_SYMBOL(cfs_expr_list_free);
 * \retval -errno otherwise
 * \retval -errno otherwise
 */
 */
int
int
cfs_expr_list_parse(char *str, int len, unsigned min, unsigned max,
cfs_expr_list_parse(char *str, int len, unsigned int min, unsigned int max,
		    struct cfs_expr_list **elpp)
		    struct cfs_expr_list **elpp)
{
{
	struct cfs_expr_list	*expr_list;
	struct cfs_expr_list	*expr_list;
+3 −3
Original line number Original line Diff line number Diff line
@@ -678,9 +678,9 @@ cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt,
static unsigned int
static unsigned int
cfs_cpt_num_estimate(void)
cfs_cpt_num_estimate(void)
{
{
	unsigned nnode = num_online_nodes();
	unsigned int nnode = num_online_nodes();
	unsigned ncpu  = num_online_cpus();
	unsigned int ncpu = num_online_cpus();
	unsigned ncpt;
	unsigned int ncpt;


	if (ncpu <= CPT_WEIGHT_MIN) {
	if (ncpu <= CPT_WEIGHT_MIN) {
		ncpt = 1;
		ncpt = 1;
Loading