mbox series

[RFC,00/14] cifs: rename of several structs and variables

Message ID 20220724151137.7538-1-ematsumiya@suse.de (mailing list archive)
Headers show
Series cifs: rename of several structs and variables | expand

Message

Enzo Matsumiya July 24, 2022, 3:11 p.m. UTC
Hi all,

This patch set 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
- typedef of status information for each cifs struct
- 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.


Cheers,

Enzo

Enzo Matsumiya (14):
  cifs: rename servers list, lock, functions, and vars
  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: typedef server status enum
  cifs: typedef ses status enum
  cifs: typedef tcon status enum
  cifs: typedef securityEnum
  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    | 176 +++----
 fs/cifs/cifs_debug.h    |  31 +-
 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   |  84 ++--
 fs/cifs/cifsfs.c        | 138 +++---
 fs/cifs/cifsglob.h      | 712 +++++++++++++++--------------
 fs/cifs/cifsproto.h     | 180 ++++----
 fs/cifs/cifssmb.c       | 391 ++++++++--------
 fs/cifs/connect.c       | 985 ++++++++++++++++++++--------------------
 fs/cifs/dfs_cache.c     | 182 ++++----
 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         |  22 +-
 fs/cifs/link.c          |  26 +-
 fs/cifs/misc.c          | 199 ++++----
 fs/cifs/netmisc.c       |   4 +-
 fs/cifs/ntlmssp.h       |   6 +-
 fs/cifs/readdir.c       | 344 +++++++-------
 fs/cifs/sess.c          | 148 +++---
 fs/cifs/smb1ops.c       | 182 ++++----
 fs/cifs/smb2file.c      |  36 +-
 fs/cifs/smb2inode.c     | 136 +++---
 fs/cifs/smb2maperror.c  |   2 +-
 fs/cifs/smb2misc.c      |  98 ++--
 fs/cifs/smb2ops.c       | 593 ++++++++++++------------
 fs/cifs/smb2pdu.c       | 626 ++++++++++++-------------
 fs/cifs/smb2proto.h     |  68 +--
 fs/cifs/smb2transport.c | 154 +++----
 fs/cifs/smbdirect.c     |  28 +-
 fs/cifs/smbdirect.h     |  16 +-
 fs/cifs/transport.c     | 292 ++++++------
 fs/cifs/xattr.c         |  12 +-
 46 files changed, 3609 insertions(+), 3594 deletions(-)