From: Tom Talpey <tom@talpey.com>
To: Enzo Matsumiya <ematsumiya@suse.de>, linux-cifs@vger.kernel.org
Cc: smfrench@gmail.com, pc@cjr.nz, ronniesahlberg@gmail.com,
nspmangalore@gmail.com
Subject: Re: [RFC PATCH v2 00/10] cifs: rename of several structs and variables
Date: Mon, 25 Jul 2022 22:23:06 -0400 [thread overview]
Message-ID: <bec8a446-6c74-3ef7-37f0-49cd478599a6@talpey.com> (raw)
In-Reply-To: <20220725223707.14477-1-ematsumiya@suse.de>
On 7/25/2022 6:36 PM, Enzo Matsumiya wrote:
> Hi all,
>
> This patch set (v2) renames several cifs.ko data structures, variables, and
> functions with the goal to improve readability of the code.
>
> In summary, what's been done:
> - change from CamelCase to snake_case
> - try to give more meaning to globals and struct members
> - rename status fields (server, ses, tcon), define constants for the
> various statuses (4/11 can be shared between those structs, others are
> specific to each)
> - rename of list_head variables to better represent whether they'are
> used as a list element ("head") or a list per se. Also tried to give
> more meaning to these, as "rlist", "tlist", "llist" looked confusing
> and, sometimes, ambiguous.
> - remove redundant prefixes from struct members name, e.g.
> tcon_tlink's tl_*, smb_rqst's rq_*, cifs_fattr's cf_*, etc
>
> No functional changes has been made.
>
> I know these touch some very old code that older devs are highly used
> to, but I see this as an improvement to reading the code for everyone.
>
> I'll be waiting for your reviews and feedback.
Enzo, I think this effort is great. If you combine this modernization
with refactoring SMB1 into separate files to make it easier to do
away with entirely, I'll be even more supportive.
Tom.
> Cheers,
>
> Enzo
>
> v2:
> - remove status typedefs (suggested by Christoph Hellwig)
> - define status constants instead, reuse some between different
> structs so we don't have to create a different set of statuses
> for each cifs struct
>
> Enzo Matsumiya (10):
> cifs: rename xid/mid globals
> cifs: rename global counters
> cifs: rename "TCP_Server_Info" struct to "cifs_server_info"
> cifs: rename cifs{File,Lock,Inode}Info structs and more
> cifs: convert server info vars to snake_case
> cifs: change status and security types enums to constants
> cifs: rename cifsFYI to debug_level
> cifs: rename list_head fields
> cifs: rename more CamelCase to snake_case
> cifs: rename more list_heads, remove redundant prefixes
>
> fs/cifs/Kconfig | 2 +-
> fs/cifs/asn1.c | 4 +-
> fs/cifs/cifs_debug.c | 158 ++++-----
> fs/cifs/cifs_debug.h | 29 +-
> fs/cifs/cifs_spnego.c | 4 +-
> fs/cifs/cifs_spnego.h | 2 +-
> fs/cifs/cifs_swn.c | 24 +-
> fs/cifs/cifs_swn.h | 8 +-
> fs/cifs/cifs_unicode.c | 4 +-
> fs/cifs/cifs_unicode.h | 2 +-
> fs/cifs/cifsacl.c | 22 +-
> fs/cifs/cifsencrypt.c | 78 ++---
> fs/cifs/cifsfs.c | 124 +++----
> fs/cifs/cifsglob.h | 694 ++++++++++++++++++++--------------------
> fs/cifs/cifsproto.h | 172 +++++-----
> fs/cifs/cifssmb.c | 356 ++++++++++-----------
> fs/cifs/connect.c | 574 ++++++++++++++++-----------------
> fs/cifs/dfs_cache.c | 178 +++++------
> fs/cifs/dfs_cache.h | 40 +--
> fs/cifs/dir.c | 16 +-
> fs/cifs/file.c | 636 ++++++++++++++++++------------------
> fs/cifs/fs_context.c | 8 +-
> fs/cifs/fs_context.h | 2 +-
> fs/cifs/fscache.c | 18 +-
> fs/cifs/fscache.h | 10 +-
> fs/cifs/inode.c | 530 +++++++++++++++---------------
> fs/cifs/ioctl.c | 18 +-
> fs/cifs/link.c | 26 +-
> fs/cifs/misc.c | 185 ++++++-----
> fs/cifs/netmisc.c | 4 +-
> fs/cifs/ntlmssp.h | 6 +-
> fs/cifs/readdir.c | 344 ++++++++++----------
> fs/cifs/sess.c | 142 ++++----
> fs/cifs/smb1ops.c | 182 +++++------
> fs/cifs/smb2file.c | 36 +--
> fs/cifs/smb2inode.c | 136 ++++----
> fs/cifs/smb2maperror.c | 2 +-
> fs/cifs/smb2misc.c | 72 ++---
> fs/cifs/smb2ops.c | 555 ++++++++++++++++----------------
> fs/cifs/smb2pdu.c | 596 +++++++++++++++++-----------------
> fs/cifs/smb2proto.h | 68 ++--
> fs/cifs/smb2transport.c | 112 +++----
> fs/cifs/smbdirect.c | 28 +-
> fs/cifs/smbdirect.h | 16 +-
> fs/cifs/transport.c | 236 +++++++-------
> fs/cifs/xattr.c | 12 +-
> 46 files changed, 3230 insertions(+), 3241 deletions(-)
>
next prev parent reply other threads:[~2022-07-26 2:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 22:36 [RFC PATCH v2 00/10] cifs: rename of several structs and variables Enzo Matsumiya
2022-07-25 22:36 ` [RFC PATCH v2 01/10] cifs: rename xid/mid globals Enzo Matsumiya
2022-07-25 22:36 ` [RFC PATCH v2 02/10] cifs: rename global counters Enzo Matsumiya
2022-07-25 22:37 ` [RFC PATCH v2 05/10] cifs: convert server info vars to snake_case Enzo Matsumiya
2022-07-27 14:32 ` Steve French
2022-07-27 15:17 ` Enzo Matsumiya
2022-07-27 15:29 ` Steve French
2022-07-27 15:35 ` Enzo Matsumiya
2022-07-25 22:37 ` [RFC PATCH v2 06/10] cifs: change status and security types enums to constants Enzo Matsumiya
2022-07-27 14:35 ` Steve French
2022-07-27 15:20 ` Enzo Matsumiya
2022-07-25 22:37 ` [RFC PATCH v2 07/10] cifs: rename cifsFYI to debug_level Enzo Matsumiya
2022-07-27 14:36 ` Steve French
2022-07-27 15:21 ` Enzo Matsumiya
2022-07-25 22:37 ` [RFC PATCH v2 08/10] cifs: rename list_head fields Enzo Matsumiya
2022-07-25 22:37 ` [RFC PATCH v2 10/10] cifs: rename more list_heads, remove redundant prefixes Enzo Matsumiya
2022-07-26 2:23 ` Tom Talpey [this message]
2022-07-26 2:41 ` [RFC PATCH v2 00/10] cifs: rename of several structs and variables Enzo Matsumiya
2022-07-29 19:12 ` Tom Talpey
[not found] ` <20220725223707.14477-4-ematsumiya@suse.de>
[not found] ` <CAH2r5msHgxzC6HYhj70cMce+=t6Fz2p1C5X3HCM1WKFEq7rnhQ@mail.gmail.com>
[not found] ` <20220727153836.sllbblfagnstcza7@cyberdelia>
2022-07-27 19:24 ` Fwd: [RFC PATCH v2 03/10] cifs: rename "TCP_Server_Info" struct to "cifs_server_info" Enzo Matsumiya
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=bec8a446-6c74-3ef7-37f0-49cd478599a6@talpey.com \
--to=tom@talpey.com \
--cc=ematsumiya@suse.de \
--cc=linux-cifs@vger.kernel.org \
--cc=nspmangalore@gmail.com \
--cc=pc@cjr.nz \
--cc=ronniesahlberg@gmail.com \
--cc=smfrench@gmail.com \
/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