# Re: \[PATCH net-next v2 1/2\] net: pass const to msg\_data\_left()

- From: Eric Dumazet \<hidden\>
- Date: 2025-04-08 14:21:06 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/04/3003232
- Thread: https://ratatoskr.run/netdev/2025/04/3000606/t.md

```text
On Mon, Apr 7, 2025 at 3:40 PM Breno Leitao [ref] wrote:
>
> The msg_data_left() function doesn't modify the struct msghdr parameter,
> so mark it as const. This allows the function to be used with const
> references, improving type safety and making the API more flexible.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Eric Dumazet <redacted>
```
