Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cifs: Fix specification of function pointers

Change the mid_receive_t, mid_callback_t and mid_handle_t function pointers
to have the pointer marker in the typedef.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

David Howells and committed by
Steve French
6a86a4cc 28405cb5

+12 -12
+6 -6
fs/smb/client/cifsglob.h
··· 1660 1660 * Returns zero on a successful receive, or an error. The receive state in 1661 1661 * the TCP_Server_Info will also be updated. 1662 1662 */ 1663 - typedef int (mid_receive_t)(struct TCP_Server_Info *server, 1663 + typedef int (*mid_receive_t)(struct TCP_Server_Info *server, 1664 1664 struct mid_q_entry *mid); 1665 1665 1666 1666 /* ··· 1671 1671 * - it will be called by cifsd, with no locks held 1672 1672 * - the mid will be removed from any lists 1673 1673 */ 1674 - typedef void (mid_callback_t)(struct mid_q_entry *mid); 1674 + typedef void (*mid_callback_t)(struct mid_q_entry *mid); 1675 1675 1676 1676 /* 1677 1677 * This is the protopyte for mid handle function. This is called once the mid 1678 1678 * has been recognized after decryption of the message. 1679 1679 */ 1680 - typedef int (mid_handle_t)(struct TCP_Server_Info *server, 1680 + typedef int (*mid_handle_t)(struct TCP_Server_Info *server, 1681 1681 struct mid_q_entry *mid); 1682 1682 1683 1683 /* one of these for every pending CIFS request to the server */ ··· 1696 1696 unsigned long when_sent; /* time when smb send finished */ 1697 1697 unsigned long when_received; /* when demux complete (taken off wire) */ 1698 1698 #endif 1699 - mid_receive_t *receive; /* call receive callback */ 1700 - mid_callback_t *callback; /* call completion callback */ 1701 - mid_handle_t *handle; /* call handle mid callback */ 1699 + mid_receive_t receive; /* call receive callback */ 1700 + mid_callback_t callback; /* call completion callback */ 1701 + mid_handle_t handle; /* call handle mid callback */ 1702 1702 void *callback_data; /* general purpose pointer for callback */ 1703 1703 struct task_struct *creator; 1704 1704 void *resp_buf; /* pointer to received SMB header */
+4 -4
fs/smb/client/cifsproto.h
··· 95 95 extern bool cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs); 96 96 extern int cifs_discard_remaining_data(struct TCP_Server_Info *server); 97 97 extern int cifs_call_async(struct TCP_Server_Info *server, 98 - struct smb_rqst *rqst, 99 - mid_receive_t *receive, mid_callback_t *callback, 100 - mid_handle_t *handle, void *cbdata, const int flags, 101 - const struct cifs_credits *exist_credits); 98 + struct smb_rqst *rqst, 99 + mid_receive_t receive, mid_callback_t callback, 100 + mid_handle_t handle, void *cbdata, const int flags, 101 + const struct cifs_credits *exist_credits); 102 102 extern struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses); 103 103 extern int cifs_send_recv(const unsigned int xid, struct cifs_ses *ses, 104 104 struct TCP_Server_Info *server,
+2 -2
fs/smb/client/transport.c
··· 664 664 */ 665 665 int 666 666 cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst, 667 - mid_receive_t *receive, mid_callback_t *callback, 668 - mid_handle_t *handle, void *cbdata, const int flags, 667 + mid_receive_t receive, mid_callback_t callback, 668 + mid_handle_t handle, void *cbdata, const int flags, 669 669 const struct cifs_credits *exist_credits) 670 670 { 671 671 int rc;