Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1979430rwl; Mon, 26 Dec 2022 07:20:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXuMQvopQ+9RSmjUdX9gdfmxEjkU8691LqWmq3JyJYypf+QddCSJCHzIy34rC9wHZ9gRDXRx X-Received: by 2002:a17:906:6a1a:b0:7b9:ee36:6153 with SMTP id qw26-20020a1709066a1a00b007b9ee366153mr20629190ejc.2.1672068005099; Mon, 26 Dec 2022 07:20:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672068005; cv=none; d=google.com; s=arc-20160816; b=XxtdnY71eV7CIMA/yN2a4nBl6a8Y8kkSmODVKWlU7G5gZcRtzq5kqe1FRg5WVw69H1 lulGyX887TY2NNrwbFw8T4KUl+thd1wAk+R3gubaVIyTHJi1F1RggMTarC92D/VqPZSY GvXTodmpmrEU1S1HO81oIifzMAeULYGQ7SLiWZojTImvbyCAIFLPHD0xDZo02JJciWRR CY+ykLjkWG8L3GckwGmkhIXXocK7krJZ3l1/C9uw53VM0nTLfMKmi6zHzbvBwc0ktEE+ jJpj6Sj2rg2JnCRtX0lKa/3yG/adYNt1Kwr0ecPjTop8BtnXVCyvqTA87Zohcq/4GBTF KlTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=b1y7zXkinhxvot9jeetf8cDO0mX7qUONskkFtfjYn9M=; b=qF0gvKKhCzsy4cfkh5VhbZTCU6ZnJhD6n+cE4O2+VlawSZh70nrvro9BpyPyld9bR5 +TlPwNTqDCMr8i1/EdmEs+WnLHBVn3PUK4mmqa1i/UpnNvEErTzi5psqT+hYM01IIMv4 59vShLqeQioFr1M8SKXTCMMl1dYVrIv9NyPeobNO5VSCat/Hv2V+9uI7IZ4Hz+zJqTKO 9W0d0T5G0pNH1eq9cQhTodhRXcnwGGUWPmRCfx1+HD7ccUZ51Lbj3mpikLL1j6JtAA42 +iwQhapqGQ8Z+kkwq+zOgC6066eFUjnJYsA1pMy9UFZVRVO3VRU5mhVnVMpcR5NcRDp8 tdxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=bmGO0e+P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020aa7c902000000b00484f68b784csi2391974edt.329.2022.12.26.07.19.49; Mon, 26 Dec 2022 07:20:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=bmGO0e+P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231835AbiLZPH4 (ORCPT + 67 others); Mon, 26 Dec 2022 10:07:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiLZPHy (ORCPT ); Mon, 26 Dec 2022 10:07:54 -0500 Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAA61C04; Mon, 26 Dec 2022 07:07:53 -0800 (PST) Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id 6A75B1B7; Mon, 26 Dec 2022 15:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1672067062; bh=b1y7zXkinhxvot9jeetf8cDO0mX7qUONskkFtfjYn9M=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=bmGO0e+PcHHy/MZcIUThzTX+m8GtUlc4/5m6aSlVDWGSgWPweaVF1Nf2kxvc9HdGn 8L8gJ7zy5uTPEoBUSOIbtKjlnVoQNCRY853bV8eXAr514L5uy2tI0i0DW1fs8OhrH9 lhHPrvbT7E1CCUPVCB7VBIddsjqLg12jTDfoPFUc= Received: from [192.168.211.153] (192.168.211.153) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 26 Dec 2022 18:07:51 +0300 Message-ID: <9e11da02-80f1-55f3-8bb5-28c3508e5396@paragon-software.com> Date: Mon, 26 Dec 2022 19:07:50 +0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] fs/ntfs3: fix wrong cast in xattr.c Content-Language: en-US To: Daniel Pinto , kernel test robot CC: , , Linux Kernel Mailing List , , Linux Memory Management List References: From: Konstantin Komarov In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.211.153] X-ClientProxiedBy: vobn-exch-01.paragon-software.com (172.30.72.13) To vdlg-exch-02.paragon-software.com (172.30.1.105) X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15.11.2022 12:17, Daniel Pinto wrote: > cpu_to_be32 and be32_to_cpu respectively return and receive > __be32, change the cast to the correct types. > > Fixes the following sparse warnings: > fs/ntfs3/xattr.c:811:48: sparse: sparse: incorrect type in > assignment (different base types) > fs/ntfs3/xattr.c:901:34: sparse: sparse: cast to restricted __be32 > > Reported-by: kernel test robot > Signed-off-by: Daniel Pinto > --- > fs/ntfs3/xattr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c > index 8620a7b4b3e6..6056ecbe8e4f 100644 > --- a/fs/ntfs3/xattr.c > +++ b/fs/ntfs3/xattr.c > @@ -808,7 +808,7 @@ static int ntfs_getxattr(const struct xattr_handler *handler, struct dentry *de, > err = sizeof(u32); > *(u32 *)buffer = le32_to_cpu(ni->std_fa); > if (!strcmp(name, SYSTEM_NTFS_ATTRIB_BE)) > - *(u32 *)buffer = cpu_to_be32(*(u32 *)buffer); > + *(__be32 *)buffer = cpu_to_be32(*(u32 *)buffer); > } > goto out; > } > @@ -898,7 +898,7 @@ static noinline int ntfs_setxattr(const struct xattr_handler *handler, > if (size != sizeof(u32)) > goto out; > if (!strcmp(name, SYSTEM_NTFS_ATTRIB_BE)) > - new_fa = cpu_to_le32(be32_to_cpu(*(u32 *)value)); > + new_fa = cpu_to_le32(be32_to_cpu(*(__be32 *)value)); > else > new_fa = cpu_to_le32(*(u32 *)value); Thank you for your work, applied!