hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/dccp/options.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * net/dccp/options.c
34 *
....@@ -5,11 +6,6 @@
56 * Copyright (c) 2005 Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
67 * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
78 * Copyright (c) 2005 Ian McDonald <ian.mcdonald@jandi.co.nz>
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU General Public License
11
- * as published by the Free Software Foundation; either version
12
- * 2 of the License, or (at your option) any later version.
139 */
1410 #include <linux/dccp.h>
1511 #include <linux/module.h>
....@@ -47,6 +43,7 @@
4743 * dccp_parse_options - Parse DCCP options present in @skb
4844 * @sk: client|server|listening dccp socket (when @dreq != NULL)
4945 * @dreq: request socket to use during connection setup, or NULL
46
+ * @skb: frame to parse
5047 */
5148 int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
5249 struct sk_buff *skb)
....@@ -60,7 +57,7 @@
6057 (dh->dccph_doff * 4);
6158 struct dccp_options_received *opt_recv = &dp->dccps_options_received;
6259 unsigned char opt, len;
63
- unsigned char *uninitialized_var(value);
60
+ unsigned char *value;
6461 u32 elapsed_time;
6562 __be32 opt_val;
6663 int rc;
....@@ -228,7 +225,7 @@
228225 * interested. The RX CCID need not parse Ack Vectors,
229226 * since it is only interested in clearing old state.
230227 */
231
- /* fall through */
228
+ fallthrough;
232229 case DCCPO_MIN_TX_CCID_SPECIFIC ... DCCPO_MAX_TX_CCID_SPECIFIC:
233230 if (ccid_hc_tx_parse_options(dp->dccps_hc_tx_ccid, sk,
234231 pkt_type, opt, value, len))
....@@ -475,6 +472,8 @@
475472
476473 /**
477474 * dccp_insert_option_mandatory - Mandatory option (5.8.2)
475
+ * @skb: frame into which to insert option
476
+ *
478477 * Note that since we are using skb_push, this function needs to be called
479478 * _after_ inserting the option it is supposed to influence (stack order).
480479 */
....@@ -490,6 +489,7 @@
490489
491490 /**
492491 * dccp_insert_fn_opt - Insert single Feature-Negotiation option into @skb
492
+ * @skb: frame to insert feature negotiation option into
493493 * @type: %DCCPO_CHANGE_L, %DCCPO_CHANGE_R, %DCCPO_CONFIRM_L, %DCCPO_CONFIRM_R
494494 * @feat: one out of %dccp_feature_numbers
495495 * @val: NN value or SP array (preferred element first) to copy