2023-03-23 14:00 GMT+09:00, Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>: > On (23/03/23 13:10), Namjae Jeon wrote: > [..] >> >> + /* >> >> + * Remove 4 byte direct TCP header, add 1 byte wc, 2 byte bcc >> >> + * and 2 byte DialectIndex. >> >> + */ >> >> + *(__be32 *)work->response_buf = >> >> + cpu_to_be32(sizeof(struct smb_hdr) - 4 + 2 + 2); >> > >> > In other words cpu_to_be32(sizeof(struct smb_hdr)). >> Yes, that's possible too, but wouldn't this make the comments easier >> to understand..? > > Maybe, but the comment says "-4 + 1 + 2 + 2", which doesn't match the code. wc is included in smb_hdr struct. Hm.. I will update the comment. > >> >> + *(__le32 *)neg_rsp->hdr.Protocol = SMB1_PROTO_NUMBER; >> > >> > I assume this should say cpu_to_le32(SMB1_PROTO_NUMBER). >> SMB1_PROTO_NUMBER is declared as: >> #define SMB1_PROTO_NUMBER cpu_to_le32(0x424d53ff) > > Oh, I see. >