From: green@linuxhacker.ru
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
Oleg Drokin <green@linuxhacker.ru>
Subject: [PATCH 19/56] staging/lustre: Get rid of ldlm_error_t typedef
Date: Mon, 22 Feb 2016 21:53:57 -0500 [thread overview]
Message-ID: <1456196074-754064-20-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1456196074-754064-1-git-send-email-green@linuxhacker.ru>
From: Oleg Drokin <green@linuxhacker.ru>
Replace it with enum ldlm_error
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
drivers/staging/lustre/lustre/include/lustre_dlm.h | 8 ++++----
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 ++--
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 4 ++--
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 4 ++--
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 6 +++---
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h
index 87806a6..924e68f 100644
--- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
+++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
@@ -69,7 +69,7 @@ struct obd_device;
/**
* LDLM non-error return states
*/
-typedef enum {
+enum ldlm_error {
ELDLM_OK = 0,
ELDLM_LOCK_CHANGED = 300,
@@ -80,7 +80,7 @@ typedef enum {
ELDLM_NAMESPACE_EXISTS = 400,
ELDLM_BAD_NAMESPACE = 401
-} ldlm_error_t;
+};
/**
* LDLM namespace type.
@@ -1019,7 +1019,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
} while (0)
typedef int (*ldlm_processing_policy)(struct ldlm_lock *lock, __u64 *flags,
- int first_enq, ldlm_error_t *err,
+ int first_enq, enum ldlm_error *err,
struct list_head *work_list);
/**
@@ -1105,7 +1105,7 @@ static inline int ldlm_res_lvbo_update(struct ldlm_resource *res,
return 0;
}
-int ldlm_error2errno(ldlm_error_t error);
+int ldlm_error2errno(enum ldlm_error error);
#if LUSTRE_TRACKS_LOCK_EXP_REFS
void ldlm_dump_export_locks(struct obd_export *exp);
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
index 699e81d..8bd6a18 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
@@ -133,7 +133,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags)
* would be collected and ASTs sent.
*/
static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags,
- int first_enq, ldlm_error_t *err,
+ int first_enq, enum ldlm_error *err,
struct list_head *work_list)
{
struct ldlm_resource *res = req->l_resource;
@@ -449,7 +449,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
struct obd_import *imp = NULL;
struct ldlm_flock_wait_data fwd;
struct l_wait_info lwi;
- ldlm_error_t err;
+ enum ldlm_error err;
int rc = 0;
CDEBUG(D_DLMTRACE, "flags: 0x%llx data: %p getlk: %p\n",
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
index 6d4f324..ed27822 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
@@ -136,8 +136,8 @@ ldlm_lock_create(struct ldlm_namespace *ns, const struct ldlm_res_id *,
enum ldlm_type type, enum ldlm_mode mode,
const struct ldlm_callback_suite *cbs,
void *data, __u32 lvb_len, enum lvb_type lvb_type);
-ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
- void *cookie, __u64 *flags);
+enum ldlm_error ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
+ void *cookie, __u64 *flags);
void ldlm_lock_addref_internal(struct ldlm_lock *, __u32 mode);
void ldlm_lock_addref_internal_nolock(struct ldlm_lock *, __u32 mode);
void ldlm_lock_decref_internal(struct ldlm_lock *, __u32 mode);
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
index 68bf57b..c22370b 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
@@ -733,7 +733,7 @@ enum ldlm_mode lck_compat_array[] = {
* Rather arbitrary mapping from LDLM error codes to errno values. This should
* not escape to the user level.
*/
-int ldlm_error2errno(ldlm_error_t error)
+int ldlm_error2errno(enum ldlm_error error)
{
int result;
@@ -761,7 +761,7 @@ int ldlm_error2errno(ldlm_error_t error)
break;
default:
if (((int)error) < 0) /* cast to signed type */
- result = error; /* as ldlm_error_t can be unsigned */
+ result = error; /* as enum ldlm_error can be unsigned */
else {
CERROR("Invalid DLM result code: %d\n", error);
result = -EPROTO;
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index 073dcf8..07e83e5 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -1512,9 +1512,9 @@ out:
* Does not block. As a result of enqueue the lock would be put
* into granted or waiting list.
*/
-ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *ns,
- struct ldlm_lock **lockp,
- void *cookie, __u64 *flags)
+enum ldlm_error ldlm_lock_enqueue(struct ldlm_namespace *ns,
+ struct ldlm_lock **lockp,
+ void *cookie, __u64 *flags)
{
struct ldlm_lock *lock = *lockp;
struct ldlm_resource *res = lock->l_resource;
--
2.1.0
next prev parent reply other threads:[~2016-02-23 4:11 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 2:53 [PATCH 00/56] More Lustre cleanups green
2016-02-23 2:53 ` [PATCH 01/56] staging/lustre/fld: Remove useless typedefs green
2016-02-23 2:53 ` [PATCH 02/56] staging/lustre: Get rid of client_obd_lock_t typedef green
2016-02-23 2:53 ` [PATCH 03/56] staging/lustre: Get rid of loc_flags_t typedef green
2016-02-23 2:53 ` [PATCH 04/56] stagig/lustre: Get rid of cksum_type_t typedef green
2016-02-23 2:53 ` [PATCH 05/56] staging/lustre: Get rid of ost_cmd_t typedef green
2016-02-23 2:53 ` [PATCH 06/56] staging/lustre: Get rid of quota_cmd_t typedef green
2016-02-23 2:53 ` [PATCH 07/56] staging/lustre: Get rid of mds_cmd_t typedef green
2016-02-23 2:53 ` [PATCH 08/56] staging/lustre: Get rid of mds_reint_t, mdt_reint_t typedefs green
2016-02-23 2:53 ` [PATCH 09/56] staging/lustre: Get rid of ldlm_cmd_t typedef green
2016-02-23 2:53 ` [PATCH 10/56] staging/lustre: Remove ldlm type/mode typedefs green
2016-02-23 4:42 ` kbuild test robot
2016-02-23 2:53 ` [PATCH 11/56] staging/lustre: Get rid of mgs_cmd_t typedef green
2016-02-23 2:53 ` [PATCH 12/56] staging/lustre: Get rid of obd_cmd_t typedef green
2016-02-23 2:53 ` [PATCH 13/56] staging/lustre: Get rid of llog_op_type typedef green
2016-02-23 2:53 ` [PATCH 14/56] staging/lustre: Get rid of sec_cmd_t typedef green
2016-02-23 2:53 ` [PATCH 15/56] staging/lustre/ldlm: Remove unused lr_most_restr from struct ldlm_resource green
2016-02-23 2:53 ` [PATCH 16/56] staging/lustre: Get rid of object update code green
2016-02-23 2:53 ` [PATCH 17/56] staging/lustre: Get rid of lustre_fid typedef green
2016-02-23 2:53 ` [PATCH 18/56] staging/lustre: Get rid of lustre_quota_version typedef green
2016-02-23 2:53 ` green [this message]
2016-02-23 2:53 ` [PATCH 20/56] staging/lustre: Remove ldlm_appetite_t typedef green
2016-02-23 2:53 ` [PATCH 21/56] staging/lustre: Get rid of ldlm_ns_type_t typedef green
2016-02-23 2:54 ` [PATCH 22/56] staging/lustre: Get rid of ldlm_cancel_flags_t typedef green
2016-02-23 2:54 ` [PATCH 23/56] staging/lustre/llite: Get rid of se_stat_t typedef green
2016-02-23 2:54 ` [PATCH 24/56] staging/lustre: Remove lustre_build_version.h green
2016-02-23 2:54 ` [PATCH 25/56] staging/lustre: Get rid of C99 comments in lustre_idl.h green
2016-02-23 2:54 ` [PATCH 26/56] staging/lustre: Remove server-side changelog defines green
2016-02-23 2:54 ` [PATCH 27/56] staging/lustre: Remove FSF mailing address from GPL notices green
2016-02-23 2:54 ` [PATCH 28/56] staging/lustre: Remove server-only values from enum lu_dirent_attrs green
2016-02-23 2:54 ` [PATCH 29/56] staging/lustre: Remove *_CONNECT_SUPPORTED defines green
2016-02-23 2:54 ` [PATCH 30/56] staging/lustre: Remove duplicated quota defines green
2016-02-23 2:54 ` [PATCH 31/56] staging/lustre: Remove unused struct quota_body green
2016-02-23 2:54 ` [PATCH 32/56] staging/lustre: Remove lquota_glb_rec, lquota_slv_rec and lquota_acct_rec green
2016-02-23 2:54 ` [PATCH 33/56] staging/lustre: S_DIRSYNC is always defined in kernel green
2016-02-23 2:54 ` [PATCH 34/56] staging/lustre: FMODE_READ and FMODE_WRITE are always defined in the kernel green
2016-02-23 2:54 ` [PATCH 35/56] staging/lustre: Remove index file transfer structures green
2016-02-23 2:54 ` [PATCH 36/56] staging/lustre: Remove server data from struct obd_export green
2016-02-23 2:54 ` [PATCH 37/56] staging/lustre: Remove last_rcvd-file related data green
2016-02-23 2:54 ` [PATCH 38/56] staging/lustre: Remove dead code in ldlm_lock_destroy_internal green
2016-02-23 2:54 ` [PATCH 39/56] staging/lustre: MAY_NOT_BLOCK is always defined, don't check for it green
2016-02-23 2:54 ` [PATCH 40/56] staging/lustre: Remove unused lli_open_count from struct ll_inode_info green
2016-02-23 2:54 ` [PATCH 41/56] staging/lustre: Reformat comments and structures in lustre_idl.h green
2016-02-23 2:54 ` [PATCH 42/56] staging/lustre/include: Adjust comment style green
2016-02-23 2:54 ` [PATCH 43/56] staging/lustre/fld: Adjust comments to better conform to coding style green
2016-02-23 2:54 ` [PATCH 44/56] staging/lustre/fid: " green
2016-02-23 2:54 ` [PATCH 45/56] staging/lustre/lclient: " green
2016-02-23 2:54 ` [PATCH 46/56] staging/lustre/ldlm: " green
2016-02-23 2:54 ` [PATCH 47/56] staging/lustre/llite: " green
2016-02-23 2:54 ` [PATCH 48/56] staging/lustre/lmv: " green
2016-02-23 2:54 ` [PATCH 49/56] staging/lustre/lov: " green
2016-02-23 2:54 ` [PATCH 50/56] staging/lustre/mdc: " green
2016-02-23 2:54 ` [PATCH 51/56] staging/lustre/mgc: " green
2016-02-23 2:54 ` [PATCH 52/56] staging/lustre/obdclass: " green
2016-02-23 2:54 ` [PATCH 53/56] staging/lustre/obdecho: " green
2016-02-23 2:54 ` [PATCH 54/56] staging/lustre/osc: " green
2016-02-23 2:54 ` [PATCH 55/56] staging/lustre/ptlrpc: " green
2016-02-23 2:54 ` [PATCH 56/56] staging/lustre: Fix indentation mistakes green
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=1456196074-754064-20-git-send-email-green@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.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;
as well as URLs for NNTP newsgroup(s).