mirror of https://github.com/torvalds/linux.git
smb: server: remove useless casts from KSMBD_TRANS/SMBD_TRANS
At best they gain nothing, at worst we procude real bugs. Note container_of() already casts to a pointer of the given type. Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
4d2e333dab
commit
341b6c69b9
|
|
@ -99,8 +99,8 @@ struct smb_direct_transport {
|
|||
u8 responder_resources;
|
||||
};
|
||||
|
||||
#define KSMBD_TRANS(t) ((struct ksmbd_transport *)&((t)->transport))
|
||||
#define SMBD_TRANS(t) ((struct smb_direct_transport *)container_of(t, \
|
||||
#define KSMBD_TRANS(t) (&(t)->transport)
|
||||
#define SMBD_TRANS(t) (container_of(t, \
|
||||
struct smb_direct_transport, transport))
|
||||
|
||||
static const struct ksmbd_transport_ops ksmbd_smb_direct_transport_ops;
|
||||
|
|
|
|||
Loading…
Reference in New Issue