From nobody Tue Dec 2 01:03:32 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEFFB2C028B for ; Mon, 1 Dec 2025 22:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764629885; cv=none; b=PPMiYGCmhT1S5t7EIp8eUHXolcBn3LFQccCVQpB2XsZqS+T+R1H7Y78brC2aXnU8JQwxQvvSTtZNEs0mik1BJ+TtBfakcsyHoUCo5IavUwfxrIr9PoCiPhyduoTS/Qt2menBT/+uR9k1Ngp9XrLE4Z8Ap7ot851Dz5hosSg1yLs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764629885; c=relaxed/simple; bh=tvUt2hjjrDVeeNltwHLey+XPanB6WwnjLvVsOMpkB+Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ISJvCgYihJfXwcpd3R3fGE3sSvSocTdw/X2HencOsQ1g8Es8ZNHIco6zHGf/cwjruRPMGFwx1gLdWh3zfM20JfnTSrK000MQO2Ko+NKMYIMWsmDTdismn/9V0E8wdnIkw/sREUVQ7WKV1KC2OejY7bFGrHtzxtZjol7NzqkVeaA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=gYBchT90; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gYBchT90" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764629882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A/A/h7yv3X7tua8wAh2BlUckBWYTc4Q1PylD0wwVZ6c=; b=gYBchT90tktyjg48NR+MbjdRREgEv6alDRi0+TT31swZal9Ge6uQbLBnXlKvPlE2RTR4NL bArmqzQm3gi4dAj9ySL9XoaG6Yr1zcqWQfm3vYjKH84fr5DuxVsSwtArouLJy8c3Z4wNBv VftSOQ63gVGF4GGwCDZ9H3PprMNA4xc= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-612-E5DZHxxPORu_1APqm4ROoQ-1; Mon, 01 Dec 2025 17:58:01 -0500 X-MC-Unique: E5DZHxxPORu_1APqm4ROoQ-1 X-Mimecast-MFC-AGG-ID: E5DZHxxPORu_1APqm4ROoQ_1764629880 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3E2D01800447; Mon, 1 Dec 2025 22:58:00 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9166019560B2; Mon, 1 Dec 2025 22:57:57 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Shyam Prasad N , Stefan Metzmacher , Tom Talpey , linux-cifs@vger.kernel.org, netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 5/9] cifs: Fix specification of function pointers Date: Mon, 1 Dec 2025 22:57:26 +0000 Message-ID: <20251201225732.1520128-6-dhowells@redhat.com> In-Reply-To: <20251201225732.1520128-1-dhowells@redhat.com> References: <20251201225732.1520128-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Content-Type: text/plain; charset="utf-8" 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 cc: Steve French cc: Paulo Alcantara cc: linux-cifs@vger.kernel.org --- fs/smb/client/cifsglob.h | 12 ++++++------ fs/smb/client/cifsproto.h | 8 ++++---- fs/smb/client/transport.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 1bfaf9b71f07..18ac91d0982d 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -1660,7 +1660,7 @@ static inline void cifs_stats_bytes_read(struct cifs_= tcon *tcon, * Returns zero on a successful receive, or an error. The receive state in * the TCP_Server_Info will also be updated. */ -typedef int (mid_receive_t)(struct TCP_Server_Info *server, +typedef int (*mid_receive_t)(struct TCP_Server_Info *server, struct mid_q_entry *mid); =20 /* @@ -1671,13 +1671,13 @@ typedef int (mid_receive_t)(struct TCP_Server_Info = *server, * - it will be called by cifsd, with no locks held * - the mid will be removed from any lists */ -typedef void (mid_callback_t)(struct mid_q_entry *mid); +typedef void (*mid_callback_t)(struct mid_q_entry *mid); =20 /* * This is the protopyte for mid handle function. This is called once the = mid * has been recognized after decryption of the message. */ -typedef int (mid_handle_t)(struct TCP_Server_Info *server, +typedef int (*mid_handle_t)(struct TCP_Server_Info *server, struct mid_q_entry *mid); =20 /* one of these for every pending CIFS request to the server */ @@ -1696,9 +1696,9 @@ struct mid_q_entry { unsigned long when_sent; /* time when smb send finished */ unsigned long when_received; /* when demux complete (taken off wire) */ #endif - mid_receive_t *receive; /* call receive callback */ - mid_callback_t *callback; /* call completion callback */ - mid_handle_t *handle; /* call handle mid callback */ + mid_receive_t receive; /* call receive callback */ + mid_callback_t callback; /* call completion callback */ + mid_handle_t handle; /* call handle mid callback */ void *callback_data; /* general purpose pointer for callback */ struct task_struct *creator; void *resp_buf; /* pointer to received SMB header */ diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h index c36beed87596..9a307c9c8c56 100644 --- a/fs/smb/client/cifsproto.h +++ b/fs/smb/client/cifsproto.h @@ -95,10 +95,10 @@ extern int cifs_ipaddr_cmp(struct sockaddr *srcaddr, st= ruct sockaddr *rhs); extern bool cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *r= hs); extern int cifs_discard_remaining_data(struct TCP_Server_Info *server); extern int cifs_call_async(struct TCP_Server_Info *server, - struct smb_rqst *rqst, - mid_receive_t *receive, mid_callback_t *callback, - mid_handle_t *handle, void *cbdata, const int flags, - const struct cifs_credits *exist_credits); + struct smb_rqst *rqst, + mid_receive_t receive, mid_callback_t callback, + mid_handle_t handle, void *cbdata, const int flags, + const struct cifs_credits *exist_credits); extern struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses); extern int cifs_send_recv(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server, diff --git a/fs/smb/client/transport.c b/fs/smb/client/transport.c index ea5f9e4171a9..6077eaf73df6 100644 --- a/fs/smb/client/transport.c +++ b/fs/smb/client/transport.c @@ -664,8 +664,8 @@ int wait_for_response(struct TCP_Server_Info *server, s= truct mid_q_entry *mid) */ int cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst, - mid_receive_t *receive, mid_callback_t *callback, - mid_handle_t *handle, void *cbdata, const int flags, + mid_receive_t receive, mid_callback_t callback, + mid_handle_t handle, void *cbdata, const int flags, const struct cifs_credits *exist_credits) { int rc;