mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vitor Massaru Iha <vitor@massaru.org>
To: unlisted-recipients:; (no To-header on input)
Cc: willy@infradead.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	skhan@linuxfoundation.org
Subject: [PATCH 1/2] xarray: Add identifier names for function definition arguments
Date: Tue, 17 Mar 2020 22:43:02 -0300	[thread overview]
Message-ID: <f75ffec5b2d1a2e3f6ba9151732fb37cc2bed040.1584494902.git.vitor@massaru.org> (raw)
In-Reply-To: <cover.1584494902.git.vitor@massaru.org>

Fix several checkpatch warnings such as:

WARNING: function definition argument 'struct xarray *' should also have an identifier name
+void *xa_load(struct xarray *, unsigned long index);

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
---
 include/linux/xarray.h | 87 +++++++++++++++++++++---------------------
 1 file changed, 44 insertions(+), 43 deletions(-)

diff --git a/include/linux/xarray.h b/include/linux/xarray.h
index f73e1775ded0..a7dec1ec0967 100644
--- a/include/linux/xarray.h
+++ b/include/linux/xarray.h
@@ -344,21 +344,21 @@ struct xarray {
  */
 #define DEFINE_XARRAY_ALLOC1(name) DEFINE_XARRAY_FLAGS(name, XA_FLAGS_ALLOC1)
 
-void *xa_load(struct xarray *, unsigned long index);
-void *xa_store(struct xarray *, unsigned long index, void *entry, gfp_t);
-void *xa_erase(struct xarray *, unsigned long index);
-void *xa_store_range(struct xarray *, unsigned long first, unsigned long last,
-			void *entry, gfp_t);
-bool xa_get_mark(struct xarray *, unsigned long index, xa_mark_t);
-void xa_set_mark(struct xarray *, unsigned long index, xa_mark_t);
-void xa_clear_mark(struct xarray *, unsigned long index, xa_mark_t);
-void *xa_find(struct xarray *xa, unsigned long *index,
-		unsigned long max, xa_mark_t) __attribute__((nonnull(2)));
-void *xa_find_after(struct xarray *xa, unsigned long *index,
-		unsigned long max, xa_mark_t) __attribute__((nonnull(2)));
-unsigned int xa_extract(struct xarray *, void **dst, unsigned long start,
-		unsigned long max, unsigned int n, xa_mark_t);
-void xa_destroy(struct xarray *);
+void *xa_load(struct xarray *xa, unsigned long index);
+void *xa_store(struct xarray *xa, unsigned long index, void *entry, gfp_t gfp);
+void *xa_erase(struct xarray *xa, unsigned long index);
+void *xa_store_range(struct xarray *xa, unsigned long first, unsigned long last,
+			void *entry, gfp_t gfp);
+bool xa_get_mark(struct xarray *xa, unsigned long index, xa_mark_t mark);
+void xa_set_mark(struct xarray *xa, unsigned long index, xa_mark_t mark);
+void xa_clear_mark(struct xarray *xa, unsigned long index, xa_mark_t mark);
+void *xa_find(struct xarray *xa, unsigned long *index, unsigned long max,
+		 xa_mark_t filter) __attribute__((nonnull(2)));
+void *xa_find_after(struct xarray *xa, unsigned long *index, unsigned long max,
+			xa_mark_t filter) __attribute__((nonnull(2)));
+unsigned int xa_extract(struct xarray *xa, void **dst, unsigned long start,
+		unsigned long max, unsigned int n, xa_mark_t filter);
+void xa_destroy(struct xarray *xa);
 
 /**
  * xa_init_flags() - Initialise an empty XArray with flags.
@@ -551,18 +551,19 @@ static inline bool xa_marked(const struct xarray *xa, xa_mark_t mark)
  * may also re-enable interrupts if the XArray flags indicate the
  * locking should be interrupt safe.
  */
-void *__xa_erase(struct xarray *, unsigned long index);
-void *__xa_store(struct xarray *, unsigned long index, void *entry, gfp_t);
-void *__xa_cmpxchg(struct xarray *, unsigned long index, void *old,
-		void *entry, gfp_t);
-int __must_check __xa_insert(struct xarray *, unsigned long index,
-		void *entry, gfp_t);
-int __must_check __xa_alloc(struct xarray *, u32 *id, void *entry,
-		struct xa_limit, gfp_t);
-int __must_check __xa_alloc_cyclic(struct xarray *, u32 *id, void *entry,
-		struct xa_limit, u32 *next, gfp_t);
-void __xa_set_mark(struct xarray *, unsigned long index, xa_mark_t);
-void __xa_clear_mark(struct xarray *, unsigned long index, xa_mark_t);
+void *__xa_erase(struct xarray *xa, unsigned long index);
+void *__xa_store(struct xarray *xa, unsigned long index,
+		void *entry, gfp_t gfp);
+void *__xa_cmpxchg(struct xarray *xa, unsigned long index, void *old,
+		void *entry, gfp_t gfp);
+int __must_check __xa_insert(struct xarray *xa, unsigned long index,
+		void *entry, gfp_t gfp);
+int __must_check __xa_alloc(struct xarray *xa, u32 *id, void *entry,
+		struct xa_limit limit, gfp_t gfp);
+int __must_check __xa_alloc_cyclic(struct xarray *xa, u32 *id, void *entry,
+		struct xa_limit limit, u32 *next, gfp_t gfp);
+void __xa_set_mark(struct xarray *xa, unsigned long index, xa_mark_t mark);
+void __xa_clear_mark(struct xarray *xa, unsigned long index, xa_mark_t mark);
 
 /**
  * xa_store_bh() - Store this entry in the XArray.
@@ -1137,8 +1138,8 @@ struct xa_node {
 	};
 };
 
-void xa_dump(const struct xarray *);
-void xa_dump_node(const struct xa_node *);
+void xa_dump(const struct xarray *xa);
+void xa_dump_node(const struct xa_node *node);
 
 #ifdef XA_DEBUG
 #define XA_BUG_ON(xa, x) do {					\
@@ -1489,21 +1490,21 @@ static inline bool xas_retry(struct xa_state *xas, const void *entry)
 	return true;
 }
 
-void *xas_load(struct xa_state *);
-void *xas_store(struct xa_state *, void *entry);
-void *xas_find(struct xa_state *, unsigned long max);
-void *xas_find_conflict(struct xa_state *);
+void *xas_load(struct xa_state *xas);
+void *xas_store(struct xa_state *xas, void *entry);
+void *xas_find(struct xa_state *xas, unsigned long max);
+void *xas_find_conflict(struct xa_state *xas);
 
-bool xas_get_mark(const struct xa_state *, xa_mark_t);
-void xas_set_mark(const struct xa_state *, xa_mark_t);
-void xas_clear_mark(const struct xa_state *, xa_mark_t);
-void *xas_find_marked(struct xa_state *, unsigned long max, xa_mark_t);
-void xas_init_marks(const struct xa_state *);
+bool xas_get_mark(const struct xa_state *xas, xa_mark_t mark);
+void xas_set_mark(const struct xa_state *xas, xa_mark_t mark);
+void xas_clear_mark(const struct xa_state *xas, xa_mark_t mark);
+void *xas_find_marked(struct xa_state *xas, unsigned long max, xa_mark_t mark);
+void xas_init_marks(const struct xa_state *xas);
 
-bool xas_nomem(struct xa_state *, gfp_t);
-void xas_pause(struct xa_state *);
+bool xas_nomem(struct xa_state *xas, gfp_t gfp);
+void xas_pause(struct xa_state *xas);
 
-void xas_create_range(struct xa_state *);
+void xas_create_range(struct xa_state *xas);
 
 /**
  * xas_reload() - Refetch an entry from the xarray.
@@ -1721,8 +1722,8 @@ enum {
 #define xas_for_each_conflict(xas, entry) \
 	while ((entry = xas_find_conflict(xas)))
 
-void *__xas_next(struct xa_state *);
-void *__xas_prev(struct xa_state *);
+void *__xas_next(struct xa_state *xas);
+void *__xas_prev(struct xa_state *xas);
 
 /**
  * xas_prev() - Move iterator to previous index.
-- 
2.21.1


  reply	other threads:[~2020-03-18  1:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18  1:43 [PATCH 0/2] xarrary: Fix warnings reported by checkpatch Vitor Massaru Iha
2020-03-18  1:43 ` Vitor Massaru Iha [this message]
2020-03-18  1:43 ` [PATCH 2/2] xarray: Add missing blank line after declaration Vitor Massaru Iha
2020-03-18  1:55   ` Matthew Wilcox
2020-03-18  3:01     ` Vitor Massaru Iha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f75ffec5b2d1a2e3f6ba9151732fb37cc2bed040.1584494902.git.vitor@massaru.org \
    --to=vitor@massaru.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®