nfc_llcp_getsockopt() returns each option as a u32 (written through a (u32 __user *) cast), but the temporary variables are smaller than that, and they are promoted at write side, example: u8 rw; put_user(rw, (u32 __user *) optval) That is fine, but I want to widen the rw/miux/remote_miu locals from u8/u16 to u32 so the following getsockopt_iter conversion can pass their address to copy_to_iter(), which expects an object of the exact width. No functional change. PS: I am sending this as a separated patch to make sure this conversion explicitly reviewable. Signed-off-by: Breno Leitao --- net/nfc/llcp_sock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c index 1e5ee4bcde684f..adb6e06229b4af 100644 --- a/net/nfc/llcp_sock.c +++ b/net/nfc/llcp_sock.c @@ -308,8 +308,7 @@ static int nfc_llcp_getsockopt(struct socket *sock, int level, int optname, struct sock *sk = sock->sk; struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); int len, err = 0; - u16 miux, remote_miu; - u8 rw; + u32 miux, remote_miu, rw; pr_debug("%p optname %d\n", sk, optname); -- 2.53.0-Meta