diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_mux_codec.c')
| -rw-r--r-- | drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | 15 | 
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c index d6b166fc5c0e..bff46f7ca59f 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c +++ b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c @@ -626,14 +626,12 @@ static void mux_dl_adb_decode(struct iosm_mux *ipc_mux,  		if (adth->signature != cpu_to_le32(IOSM_AGGR_MUX_SIG_ADTH))  			goto adb_decode_err; -		if (le16_to_cpu(adth->table_length) < (sizeof(struct mux_adth) - -				sizeof(struct mux_adth_dg))) +		if (le16_to_cpu(adth->table_length) < sizeof(struct mux_adth))  			goto adb_decode_err;  		/* Calculate the number of datagrams. */  		nr_of_dg = (le16_to_cpu(adth->table_length) - -					sizeof(struct mux_adth) + -					sizeof(struct mux_adth_dg)) / +					sizeof(struct mux_adth)) /  					sizeof(struct mux_adth_dg);  		/* Is the datagram table empty ? */ @@ -649,7 +647,7 @@ static void mux_dl_adb_decode(struct iosm_mux *ipc_mux,  		}  		/* New aggregated datagram table. */ -		dg = &adth->dg; +		dg = adth->dg;  		if (mux_dl_process_dg(ipc_mux, adbh, dg, skb, if_id,  				      nr_of_dg) < 0)  			goto adb_decode_err; @@ -849,7 +847,7 @@ static void ipc_mux_ul_encode_adth(struct iosm_mux *ipc_mux,  			adth->if_id = i;  			adth->table_length = cpu_to_le16(adth_dg_size);  			adth_dg_size -= offsetof(struct mux_adth, dg); -			memcpy(&adth->dg, ul_adb->dg[i], adth_dg_size); +			memcpy(adth->dg, ul_adb->dg[i], adth_dg_size);  			ul_adb->if_cnt++;  		} @@ -1426,14 +1424,13 @@ static int ipc_mux_get_payload_from_adb(struct iosm_mux *ipc_mux,  		if (adth->signature == cpu_to_le32(IOSM_AGGR_MUX_SIG_ADTH)) {  			nr_of_dg = (le16_to_cpu(adth->table_length) - -					sizeof(struct mux_adth) + -					sizeof(struct mux_adth_dg)) / +					sizeof(struct mux_adth)) /  					sizeof(struct mux_adth_dg);  			if (nr_of_dg <= 0)  				return payload_size; -			dg = &adth->dg; +			dg = adth->dg;  			for (i = 0; i < nr_of_dg; i++, dg++) {  				if (le32_to_cpu(dg->datagram_index) <  |