From patchwork Mon Dec 9 17:39:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 13900111 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3E79233151 for ; Mon, 9 Dec 2024 17:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733765973; cv=none; b=QR5hL34c3bZAZbvAXL4li8a697IxtITYM+9rYBbPv1HFzMdjXWUWbVnCjLemyD/Pje1AmZmF+0P9LsbvB+X6ErkJoIi4d1DnHG+piS6DnhSEJ4CP5/HIAa/UYVfQipRRNZoNNYDNniq8WmGyZGhNMzdm+v6YHsOmt5sCF7o6aUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733765973; c=relaxed/simple; bh=J5GW5tpVZTXAs9VlnXGfaR8T9ipsPPWcK7ZwyOq0NMA=; h=MIME-Version:From:Date:Message-ID:Subject:To:Cc:Content-Type; b=hAZ6YWd0z0QpcL14+tcMQvi1UHJ84e6NA1Rw1m4TXyki8hmANptxoDAAu8pjoL6OvC6Z6AuyI1auyQOXjJ6xyCiT1vGy8WgPlRVwUksToVUFzFaMnzaRCBHUyzgmDBWjCPW8F0kvORA1agv7ewtZngz1eIKQz5cUECzEA3/1aSU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NtI7ugO2; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NtI7ugO2" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-53ff1f7caaeso2175534e87.0 for ; Mon, 09 Dec 2024 09:39:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733765969; x=1734370769; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=uGse4tK6EmtmyQY9l/bRP1zAK+2tZ1RqJM/NhRIyaec=; b=NtI7ugO29tY+TqGj+yIMtyfT1BIs5NCYVNvKWhLrgt96K2Gw5+zb53z3yI3Ea92P9U 7/mGoz05rcSdMycIdUOcVXQqYSjwhYzkJO/6JRD/YiLw3vRHb7FWRqyUYkdysmEdr0q4 kTkIN7Yic5usrwReBfZkhG7KZNcteKo3dxmkzvow9//boWyK5TiPaWEfy0epeMab4D1t HA5DmnoAgB/ZyMj/P4g8m5j3aaAdNc9sTv5FAV8l9m1tNDKpnZOqVJm3b2x2a8hDOBFL IcBBnhNkIKrd/xg7iXlTuQbSpp/5MhdgSYZU9Zspf1mSrfUKvlhLSU+yNNbFSnfidckA APDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733765969; x=1734370769; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=uGse4tK6EmtmyQY9l/bRP1zAK+2tZ1RqJM/NhRIyaec=; b=SnO3TrPbjUAn0sOs0g8S8O9Ma4PBPpTHj09o2ByaJaSv2dVKbeALevszKzbLa8+rVJ nnlr7iRBkIM+AM3LdJ8MqiXpelIRDSDlsTsdLtx2xdx1qBEnU3HehtK1/tjycQdQ+dc/ woExGcrBTmJlXrplE3+wUTcjCVn+E48tJo2A/37Ssg1PRCTyc5jlB0aGqLW9KADRL35s 7lJRzNXw/wpXoj5l2fSoqITDt6/VlRBPpX/9sBqn33kLNWLrwjGXhUXlN/lpt2KaFWXA kOmBDuHyN7JRRtZlHkKLyKIuqu5TjiNwH9ynnPUYyULUag636XIBMWX9JF1V/l5LUyTM mdPQ== X-Gm-Message-State: AOJu0Yx0xY8Hs1MeBMjrXlTCRjFddU392SYRCB3sxyH3xmOAw5pa7a8u +qu1aKFAVe1p3YNEoNEoK1qxJUha5z7P1zGDprltKtD7msYzA9tiYAsboSTf427WUmpiE2GPdOh 46L0dNjyYQoTsgT69A8JI0NtN+VHj7P1O X-Gm-Gg: ASbGncterW39rA9Au3FGK2wrjyGLbmJ+a6E8SJfn2x8uZWQXqXTr+xzUGLzSsOetX2H PoT1dadLkSLFpBTbxrmMwGmqtQZo05t5ZqLw6x4pOILl0vY82H5Ygb/oLSDtfPgcS X-Google-Smtp-Source: AGHT+IEbVC7zJc4CKHyJXcE8tezPw8SCdPyg4oyxFccrbERTyFvlahYatvctPXM4wSOa4IcCG/mydwxQNwaLLwJvoDU= X-Received: by 2002:a05:6512:108c:b0:540:1a33:ded8 with SMTP id 2adb3069b0e04-540240c04fcmr672513e87.17.1733765969180; Mon, 09 Dec 2024 09:39:29 -0800 (PST) Precedence: bulk X-Mailing-List: linux-cifs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Steve French Date: Mon, 9 Dec 2024 11:39:17 -0600 Message-ID: Subject: [PATCH][SMB3] fix minor compile warning in parse_reparse_wsl_symlink To: CIFS Cc: =?utf-8?q?Pali_Roh=C3=A1r?= utf8s_to_utf16s() specifies pwcs as a wchar_t pointer (whether big endian or little endian is passed in as an additional parm), so to remove a distracting compile warning it needs to be cast as (wchar_t *) in parse_reparse_wsl_symlink() as done by other callers. Fixes: 06a7adf318a3 ("cifs: Add support for parsing WSL-style symlinks") CHECK /home/smfrench/cifs-2.6/fs/smb/client/reparse.c /home/smfrench/cifs-2.6/fs/smb/client/reparse.c:679:45: warning: incorrect type in argument 4 (different base types) /home/smfrench/cifs-2.6/fs/smb/client/reparse.c:679:45: expected unsigned short [usertype] *pwcs /home/smfrench/cifs-2.6/fs/smb/client/reparse.c:679:45: got restricted __le16 [usertype] *[assigned] symname_utf16 See attached patch Reviewed-by: Pali Rohár From 0096f8e57b4b6e503f0abeb0a79e2b1a77157a53 Mon Sep 17 00:00:00 2001 From: Steve French Date: Mon, 9 Dec 2024 11:25:04 -0600 Subject: [PATCH] smb3: fix compiler warning in reparse code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit utf8s_to_utf16s() specifies pwcs as a wchar_t pointer (whether big endian or little endian is passed in as an additional parm), so to remove a distracting compile warning it needs to be cast as (wchar_t *) in parse_reparse_wsl_symlink() as done by other callers. Fixes: 06a7adf318a3 ("cifs: Add support for parsing WSL-style symlinks") Cc: Pali Rohár Signed-off-by: Steve French --- fs/smb/client/reparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/smb/client/reparse.c b/fs/smb/client/reparse.c index 50b1aba20008..d88b41133e00 100644 --- a/fs/smb/client/reparse.c +++ b/fs/smb/client/reparse.c @@ -676,7 +676,7 @@ static int parse_reparse_wsl_symlink(struct reparse_wsl_symlink_data_buffer *buf return -ENOMEM; symname_utf16_len = utf8s_to_utf16s(buf->PathBuffer, symname_utf8_len, UTF16_LITTLE_ENDIAN, - symname_utf16, symname_utf8_len * 2); + (wchar_t *) symname_utf16, symname_utf8_len * 2); if (symname_utf16_len < 0) { kfree(symname_utf16); return symname_utf16_len; -- 2.43.0