* lustre: remove unnecessary 'magic' from lustre_pack_request
@ 2014-01-30 17:48 Dave Jones
2014-02-01 18:54 ` Oleg Drokin
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2014-01-30 17:48 UTC (permalink / raw)
To: Linux Kernel; +Cc: andreas.dilger, gregkh
This probably made more sense when the code supported multiple protocol versions,
but now it's just obfuscation.
Signed-off-by: Dave Jones <davej@fedoraproject.org>
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
index 464479c0f00b..c319f74b04f6 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
@@ -244,15 +244,7 @@ int lustre_pack_request(struct ptlrpc_request *req, __u32 magic, int count,
LASSERT(lens[MSG_PTLRPC_BODY_OFF] == sizeof(struct ptlrpc_body));
/* only use new format, we don't need to be compatible with 1.4 */
- magic = LUSTRE_MSG_MAGIC_V2;
-
- switch (magic) {
- case LUSTRE_MSG_MAGIC_V2:
- return lustre_pack_request_v2(req, count, lens, bufs);
- default:
- LASSERTF(0, "incorrect message magic: %08x\n", magic);
- return -EINVAL;
- }
+ return lustre_pack_request_v2(req, count, lens, bufs);
}
EXPORT_SYMBOL(lustre_pack_request);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: lustre: remove unnecessary 'magic' from lustre_pack_request
2014-01-30 17:48 lustre: remove unnecessary 'magic' from lustre_pack_request Dave Jones
@ 2014-02-01 18:54 ` Oleg Drokin
0 siblings, 0 replies; 2+ messages in thread
From: Oleg Drokin @ 2014-02-01 18:54 UTC (permalink / raw)
To: Dave Jones; +Cc: Linux Kernel, andreas.dilger, gregkh
Hello!
On Jan 30, 2014, at 12:48 PM, Dave Jones wrote:
> This probably made more sense when the code supported multiple protocol versions,
> but now it's just obfuscation.
>
> Signed-off-by: Dave Jones <davej@fedoraproject.org>
>
> diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
> index 464479c0f00b..c319f74b04f6 100644
> --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
> +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
> @@ -244,15 +244,7 @@ int lustre_pack_request(struct ptlrpc_request *req, __u32 magic, int count,
> LASSERT(lens[MSG_PTLRPC_BODY_OFF] == sizeof(struct ptlrpc_body));
>
> /* only use new format, we don't need to be compatible with 1.4 */
Can you get rid of this line too please?
> - magic = LUSTRE_MSG_MAGIC_V2;
Bye,
Oleg
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-01 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 17:48 lustre: remove unnecessary 'magic' from lustre_pack_request Dave Jones
2014-02-01 18:54 ` Oleg Drokin
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).