Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp70508lqk; Sat, 9 Mar 2024 00:42:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVLGJlVFGZAyQZvC2KO548A1ESTDyu0lrOK8Thu8KI2KblAA820hR3xUWBoIi1DQWFsB+EBPbW8xK1pFnqOdQvHOiTxo92fDKs2Y7AFqg== X-Google-Smtp-Source: AGHT+IEZ1VYFw7zBknC8RDc/f0UjGM1g8hXP5ZVhTVx6XEIIU7r6I8+98SoZeHVZJu1h1RTEIm8N X-Received: by 2002:ac8:5f09:0:b0:42f:309e:5ce2 with SMTP id x9-20020ac85f09000000b0042f309e5ce2mr1767228qta.29.1709973749681; Sat, 09 Mar 2024 00:42:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709973749; cv=pass; d=google.com; s=arc-20160816; b=a368pJKNL6IgY2RWivRHDZzuuPDMmx394BcaPQ648D+3Jo47geXItdwwL/OS01brcJ q4I85f6sA3ZRcTh4uItRdkqrnxen1l6BCen5Xwf3CALPN9NbttAHxWa1GecUXTrKPbPt uLemlQMhaJBkL69gf4OboGs8DmSqwa79of0rajBR3gc4kyOZKQITswHnDnyywEroUiHH sdXHYQqb59hFV38x/lfCyvOm+Jn1lqj6gJqiM9hxDfR5E0zcivngSLBboECdOhUWZ7B1 mVu58SrlmYtHro3G5MDeuBIY2Cf4GjMMmvoHLF79I0Q1x7gY79D/JCmDDNGi8Ncn5u6A Hnlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=yXuEpU220fLq+hBmZ0FSxXiMtd9sOROIJH/mwpj0lU0=; fh=8S9gFbSJDkyZ1rPF54HUI50W3fWO80RTIzh6MVMX1N8=; b=CAFiKwKfZVj7uA9gmKc1L0tmYkCV0Y2bhLYTlzUDjuYhF+gjbLIMj9RjQ9bwgMWusg xXx/IWGxleUU3/aT5mxt7w6U7jdjlg8yZYkP7hZq5H/RbJ5WRurLOTcWLy86lWutKYXB Xs+nXUdKqvY8DkTXMa83Lpqds42nxY59ykKhD/AeE6AnogzjgWepKCY9U7nn3DY9Vc9Y C4IfSNJXozyj3jfYdbI2UeHiOV7OcKZxtJH7Vm7b+LZcT373VdH/24BafX7jPY/ZFntM ZZchAH46AFFKF5YJ9xGBx9kFSTcFwm/zMUUfmoLNlvkJqKDDugCls885AXyrG0fqWsG3 gkgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QmCJrLM2; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-crypto+bounces-2596-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u8-20020a05622a010800b0042eecd552dbsi1258062qtw.559.2024.03.09.00.42.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 00:42:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2596-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QmCJrLM2; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-crypto+bounces-2596-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3FA191C20B57 for ; Sat, 9 Mar 2024 08:42:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2A6F36B00; Sat, 9 Mar 2024 08:42:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QmCJrLM2" X-Original-To: linux-crypto@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1B8422EED for ; Sat, 9 Mar 2024 08:42:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709973744; cv=none; b=ULPAlE5AuzrbnOtXSdqlPT9ZXftsk+C6nu2k6Pc4fDQCgbf8XxYREIjPnHu/BV1ANH5NxyvUyE3G+NAKkGfrXFkFzc/+uQV4DNp8BRTrlgxNurv+GKd7d7Y87rF6MHdvsHrSCduNTtGC3zsK/cIlmIeUe64w52XtLM4OYvLgayg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709973744; c=relaxed/simple; bh=GJ+XCHb1Zm/gTMEvDcf71lf7l1jbXIQqYljMRF3mSSU=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=cL+Pqm5akIv2QLdN84EGverL8+pR1NVMhC7NIq4/biw3G4pP+Zc11ruUKnADqCpsr0KD3jdQLUORz46q2SNS8IrI0SIGMClIyhZIrtcigc/wX7VvqNmRyeCEDB35fZ43eGzKr+u92DbGPBpqwIHe81bfsVeguD/ar5glhwcuJx0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QmCJrLM2; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709973742; x=1741509742; h=date:from:to:cc:subject:message-id:mime-version; bh=GJ+XCHb1Zm/gTMEvDcf71lf7l1jbXIQqYljMRF3mSSU=; b=QmCJrLM2UXKeZX2CMEWFLE5G6n94/DaKbmw+WmnZDlg0dqQAOZPPT9Kt qyD6L1m0Nef2DgGEVaq9B2hcTsWvKNKYSXc3vYQJQT8GIguwi+rH/Mit/ WagodEkNyEzfzT0UsbLU8Putj2Kt5V/PpihvHz3i1ikpuPlVIPYPkjQer S7IKmL6O4R6e1wnlVm0Ys8m9dpah1VpQg3hXN24EvqDx1cEczx5Cholyh ZhNZhWnkXl2lpDZnBto5J1d+HDzhWvdKn3hO1NFe7eOxBj+XnmPHFAm5p 7FeAGfg/dk8a4E3ZyNm1RXKHnhJq2T6LO9pIhsgOgJg0IuQGwKIUzypmk g==; X-IronPort-AV: E=McAfee;i="6600,9927,11007"; a="27170680" X-IronPort-AV: E=Sophos;i="6.07,112,1708416000"; d="scan'208";a="27170680" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2024 00:42:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,112,1708416000"; d="scan'208";a="11119588" Received: from lkp-server01.sh.intel.com (HELO b21307750695) ([10.239.97.150]) by orviesa007.jf.intel.com with ESMTP; 09 Mar 2024 00:42:20 -0800 Received: from kbuild by b21307750695 with local (Exim 4.96) (envelope-from ) id 1risHZ-0007Ab-1Y; Sat, 09 Mar 2024 08:42:17 +0000 Date: Sat, 9 Mar 2024 16:42:07 +0800 From: kernel test robot To: Barry Song Cc: oe-kbuild-all@lists.linux.dev, linux-crypto@vger.kernel.org, Herbert Xu Subject: [herbert-cryptodev-2.6:master 80/80] crypto/scompress.c:174:38: warning: unused variable 'dst_page' Message-ID: <202403091614.NeUw5zcv-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 77292bb8ca69c808741aadbd29207605296e24af commit: 77292bb8ca69c808741aadbd29207605296e24af [80/80] crypto: scomp - remove memcpy if sg_nents is 1 and pages are lowmem config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240309/202403091614.NeUw5zcv-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240309/202403091614.NeUw5zcv-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202403091614.NeUw5zcv-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from crypto/scompress.c:12: include/crypto/scatterwalk.h: In function 'scatterwalk_pagedone': include/crypto/scatterwalk.h:76:30: warning: variable 'page' set but not used [-Wunused-but-set-variable] 76 | struct page *page; | ^~~~ crypto/scompress.c: In function 'scomp_acomp_comp_decomp': >> crypto/scompress.c:174:38: warning: unused variable 'dst_page' [-Wunused-variable] 174 | struct page *dst_page = sg_page(req->dst); | ^~~~~~~~ vim +/dst_page +174 crypto/scompress.c 112 113 static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir) 114 { 115 struct crypto_acomp *tfm = crypto_acomp_reqtfm(req); 116 void **tfm_ctx = acomp_tfm_ctx(tfm); 117 struct crypto_scomp *scomp = *tfm_ctx; 118 void **ctx = acomp_request_ctx(req); 119 struct scomp_scratch *scratch; 120 void *src, *dst; 121 unsigned int dlen; 122 int ret; 123 124 if (!req->src || !req->slen || req->slen > SCOMP_SCRATCH_SIZE) 125 return -EINVAL; 126 127 if (req->dst && !req->dlen) 128 return -EINVAL; 129 130 if (!req->dlen || req->dlen > SCOMP_SCRATCH_SIZE) 131 req->dlen = SCOMP_SCRATCH_SIZE; 132 133 dlen = req->dlen; 134 135 scratch = raw_cpu_ptr(&scomp_scratch); 136 spin_lock(&scratch->lock); 137 138 if (sg_nents(req->src) == 1 && !PageHighMem(sg_page(req->src))) { 139 src = page_to_virt(sg_page(req->src)) + req->src->offset; 140 } else { 141 scatterwalk_map_and_copy(scratch->src, req->src, 0, 142 req->slen, 0); 143 src = scratch->src; 144 } 145 146 if (req->dst && sg_nents(req->dst) == 1 && !PageHighMem(sg_page(req->dst))) 147 dst = page_to_virt(sg_page(req->dst)) + req->dst->offset; 148 else 149 dst = scratch->dst; 150 151 if (dir) 152 ret = crypto_scomp_compress(scomp, src, req->slen, 153 dst, &req->dlen, *ctx); 154 else 155 ret = crypto_scomp_decompress(scomp, src, req->slen, 156 dst, &req->dlen, *ctx); 157 if (!ret) { 158 if (!req->dst) { 159 req->dst = sgl_alloc(req->dlen, GFP_ATOMIC, NULL); 160 if (!req->dst) { 161 ret = -ENOMEM; 162 goto out; 163 } 164 } else if (req->dlen > dlen) { 165 ret = -ENOSPC; 166 goto out; 167 } 168 if (dst == scratch->dst) { 169 scatterwalk_map_and_copy(scratch->dst, req->dst, 0, 170 req->dlen, 1); 171 } else { 172 int nr_pages = DIV_ROUND_UP(req->dst->offset + req->dlen, PAGE_SIZE); 173 int i; > 174 struct page *dst_page = sg_page(req->dst); 175 176 for (i = 0; i < nr_pages; i++) 177 flush_dcache_page(dst_page + i); 178 } 179 } 180 out: 181 spin_unlock(&scratch->lock); 182 return ret; 183 } 184 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki