Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp59505rdb; Wed, 29 Nov 2023 20:16:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbmeFCSUOALhGaos/P6CoKxJOcFILgHqG3t1jc4uDg+aMcLzs/luPBS1tFZxbMau70Wiyd X-Received: by 2002:a54:4108:0:b0:3b8:9845:eb98 with SMTP id l8-20020a544108000000b003b89845eb98mr2668893oic.57.1701317784757; Wed, 29 Nov 2023 20:16:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701317784; cv=none; d=google.com; s=arc-20160816; b=J8f0xKFr5ZmOhYrlh+J74Pgbv+uR6PPUaGK0XOY8QDZV1mk6mmyYuVS89jYxtBfE/Y n9G+fhoUpWpUUXyvl9H3XJw5JYOVzGJcJeVAJTkZafhFTfSPeCeZGM6Ka0gZMoN19NzR fzBcVbPasPBO9dMJORd0S8cJxOT88z5CefCuRR2zxFuJ0f5ka7GkBVCHF9+QWuAIdVzN EpGrcEnChLxid4D5EZchUZ5Bn/vD7FB7EAGR6pBMW4LaFjHPHSH9MYaoa10rUQ2V4dhh 9LZZBXL9ZCB/4E8h7fGHTQG7xcihGPENxRL9f0fad8+zLuLhc1vqPNQ+gk93pL6nRQiB mn8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ciUUDyS6UwVOmfcKRVNErpTKeITmISSd1ZTQAam+P4Y=; fh=cUcoZEM8AoKnest5/DmgcaCzvUFWGQ1f/q77QQMWBiE=; b=GgafcYVH8Kkq7RvJCAzS/u2tj+Cdavt8Ej5ZzBIMWhmvn43hfbgDDOBZM98dB2HrNj dzaVH8MVq+BvUS2Kcx4nkj3w43IMYsKGJf1r+1G+TH95awM0g4Q7SBX3xNT4OcpYO2u3 w/VNaUpyiVq8m4EXbQnjPHeidhse115BaZtJrWrfyiblLua0v9XESOS2o7fyUgQvJs0R pVOiSgq7fe+ZP4iIlsut+tzdvblYEqGs6zgKjmWlctADjCsBYd6e4NCPZl2cuzy7X0sX KQF6b+m+3ThtGpN1PYr1TYm+8hyhQ5TJ5KJYDaJV5r6Rx630G9Xt2jJFUl2hGKtspjW0 QaSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VcdQj8LE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id u17-20020a632351000000b005aa0e024d63si414082pgm.791.2023.11.29.20.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 20:16:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VcdQj8LE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 902B98093D49; Wed, 29 Nov 2023 20:15:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344411AbjK3EPc (ORCPT + 99 others); Wed, 29 Nov 2023 23:15:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbjK3EPb (ORCPT ); Wed, 29 Nov 2023 23:15:31 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B65681A5; Wed, 29 Nov 2023 20:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ciUUDyS6UwVOmfcKRVNErpTKeITmISSd1ZTQAam+P4Y=; b=VcdQj8LE7sb+q+PxGpYs9UlZRY a11xy9N2IbqlspcfzGHIiVFK/PaZJsXVyWbxIVBfys+cXQEQ8O1aJenrL9CtmvAePK8G6EeZTCB1Y Z2dC+VRv1L1/V+r07n3UsLYmmASvKt63s43YZUxJvikd8jCF7cFhh7NZHsgLuKNZ+Raanf1J6xeOj lyEbROpRKnQzlvrKQk9Wye65azyjyn1CLFtzJdXEGqm8Qj/qezo+e/Vi3vNkbtDCsnnPgu8aC0a5D iVO9rMulaBKZkyj/biE9tU3PMBrCqf880ZWL1NcOXPFQQbn3cyTsSrzIoAmNf2JWjB6Pa/t2IJRTJ myxQHmXw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r8YSQ-00E4dE-37; Thu, 30 Nov 2023 04:15:22 +0000 Date: Thu, 30 Nov 2023 04:15:22 +0000 From: Matthew Wilcox To: Su Hui Cc: nathan@kernel.org, ndesaulniers@google.com, trix@redhat.com, akpm@linux-foundation.org, fmdefrancesco@gmail.com, ira.weiny@intel.com, tony.luck@intel.com, jiaqiyan@google.com, pcc@google.com, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] highmem: fix a memory copy problem in memcpy_from_folio Message-ID: References: <20231130034017.1210429-1-suhui@nfschina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231130034017.1210429-1-suhui@nfschina.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 29 Nov 2023 20:15:48 -0800 (PST) On Thu, Nov 30, 2023 at 11:40:18AM +0800, Su Hui wrote: > Clang static checker complains that value stored to 'from' is never read. > And memcpy_from_folio() only copy the last chunk memory from folio to > destination. > Using 'to += chunk' to replace 'from += chunk' to fix this typo problem. > > Fixes: b23d03ef7af5 ("highmem: add memcpy_to_folio() and memcpy_from_folio()") > Signed-off-by: Su Hui Reviewed-by: Matthew Wilcox (Oracle)