Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp764003pxb; Tue, 12 Apr 2022 12:50:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn6Xiy3q6oRsNc3OvcqTuHMvMJFGpeBukFapvDv9A/K867lWhgApvII26CfhOnY4qWAcUU X-Received: by 2002:a17:902:f701:b0:14d:7cea:82af with SMTP id h1-20020a170902f70100b0014d7cea82afmr38592557plo.71.1649793010374; Tue, 12 Apr 2022 12:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649793010; cv=none; d=google.com; s=arc-20160816; b=j4vryahC9HGmbQRlJcYWrj8f8SjctgT2gT8rbVeqjVZ/vhjPPktHwosjQXzdTP2OX0 8e1Z5QZ1VpmSVt8aP2pY/tzUH20KgpKgzPphwCE2uRuXMhvmLnEoUhQcUm2ue88qyV+k spfp4TgnaEM0qK75v2QIXJdbqopEoPj1xh4B6D3qibkf9+miw6yTpzJnvHhUVCRKbwud ITTE4DGQPk4R4pbeK7OaF4Ht71er1HB2NJkQjSiFOI9jyvgPpif61NMlvPZAkm5O4ci7 QXp0BPpDLMxKelf3LkxBW3Xvs628Yk7qx6fw10m5mzr1wf7yTDmh5Bv0B/8hnXCyLNFl Dxbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Vkg0BZkZah/gnK9d/T5SsD3mvuiGryS2zaT6WoA8yJw=; b=AC6vP0/Gcih+PI5v+imty/O4lnub/FzmKX1dj2eowvcANTDi+zfqrS+PaG7pGMheep vsr9gyhCQe9oF+16n+Xkcnr6V44iz4tWqpMyjupsgfOmDPfpcq3wjH+UnpwE1RCgNtEj esTK3f96ty/MwPhcYwl8HdQ/s4+NoZKbbC4BwLREY3+fwedja1g7fdGkdWo2LKR5HN// XWy+5VRmuxT1iTwUIr9MGtiOXNS2DLLDPF0VtCXXMEo6Ufe4i6eA+2yjyRgqu2gXjvU1 +B6a2xYB0hqr7Ta8IMFWb5xRap5xlFWdZtelY1OPWkQZWnE6SynXxfE9xbqD8iW0jNuD mPOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O+Qvlm3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l13-20020a170903244d00b00153c0334fd4si13175220pls.559.2022.04.12.12.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 12:50:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O+Qvlm3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6EF795A08A; Tue, 12 Apr 2022 12:46:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387104AbiDLJFd (ORCPT + 99 others); Tue, 12 Apr 2022 05:05:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359825AbiDLHnn (ORCPT ); Tue, 12 Apr 2022 03:43:43 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B81243AE0 for ; Tue, 12 Apr 2022 00:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649748383; x=1681284383; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5OyqKZ2t12lVTvKw/fJWrzDUz4nPfGALPPcWHIJFgN8=; b=O+Qvlm3KUxP6NVMuF9f3Uk8PHtLEqAfxKw7hl4eGYCN5b31hkBJvLS1M aUVFvkSmYbolPm7NkycXFjPBRL3+yPHekPwZ7rEu8+lP3cjWpo7vaGX3m Gixz6Yr6xG4ExcXlWfLWQ37eohuUu/fCETc/hZq1gZNLcd+owgIKhnO14 0VOmEQNTQuAQPWlj0dA2SKe3803QAl3yAgBnsZ+szM3l42GIk1cIrBcre KdVEg7nt/MExsG3DxptHOB9k5174nlPqBG9fQsaetQk69QFeAZjMIQMqJ Jni85dpNPkRsJW0SH29DcVw6BTOamZCtPUZrO9AsI9lbtIJKI1W4aXCPv g==; X-IronPort-AV: E=McAfee;i="6400,9594,10314"; a="259893989" X-IronPort-AV: E=Sophos;i="5.90,253,1643702400"; d="scan'208";a="259893989" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2022 00:26:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,253,1643702400"; d="scan'208";a="644602157" Received: from lkp-server02.sh.intel.com (HELO d3fc50ef50de) ([10.239.97.151]) by FMSMGA003.fm.intel.com with ESMTP; 12 Apr 2022 00:26:17 -0700 Received: from kbuild by d3fc50ef50de with local (Exim 4.95) (envelope-from ) id 1neAun-0002cr-5k; Tue, 12 Apr 2022 07:26:17 +0000 Date: Tue, 12 Apr 2022 15:25:46 +0800 From: kernel test robot To: Dmitry Osipenko , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Gustavo Padovan , dri-devel@lists.freedesktop.org, Dmitry Osipenko Subject: Re: [PATCH v3 11/15] drm/shmem-helper: Add generic memory shrinker Message-ID: <202204121523.qVMxOvZg-lkp@intel.com> References: <20220411215937.281655-12-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220411215937.281655-12-dmitry.osipenko@collabora.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Dmitry, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20220411] [cannot apply to drm/drm-next v5.18-rc2 v5.18-rc1 v5.17 v5.18-rc2] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Osipenko/Add-generic-memory-shrinker-to-VirtIO-GPU-and-Panfrost-DRM-drivers/20220412-060325 base: d12d7e1cfe38e0c36d28c7a9fbbc436ad0d17c14 config: i386-randconfig-a005-20220411 (https://download.01.org/0day-ci/archive/20220412/202204121523.qVMxOvZg-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project fe2478d44e4f7f191c43fef629ac7a23d0251e72) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/683ba8a9d72ba7770a61a9266a2b33949f3874f2 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Dmitry-Osipenko/Add-generic-memory-shrinker-to-VirtIO-GPU-and-Panfrost-DRM-drivers/20220412-060325 git checkout 683ba8a9d72ba7770a61a9266a2b33949f3874f2 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/gpu/drm/drm_gem_shmem_helper.c:289:11: warning: variable 'new_state' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if (shmem->madv < 0) ^~~~~~~~~~~~~~~ drivers/gpu/drm/drm_gem_shmem_helper.c:292:46: note: uninitialized use occurs here drm_gem_shmem_set_pages_state_locked(shmem, new_state); ^~~~~~~~~ drivers/gpu/drm/drm_gem_shmem_helper.c:289:7: note: remove the 'if' if its condition is always true else if (shmem->madv < 0) ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_gem_shmem_helper.c:278:2: note: variable 'new_state' is declared here enum drm_gem_shmem_pages_state new_state; ^ 1 warning generated. vim +289 drivers/gpu/drm/drm_gem_shmem_helper.c 273 274 static void drm_gem_shmem_update_pages_state_locked(struct drm_gem_shmem_object *shmem) 275 { 276 struct drm_gem_object *obj = &shmem->base; 277 struct drm_gem_shmem_shrinker *gem_shrinker = obj->dev->shmem_shrinker; 278 enum drm_gem_shmem_pages_state new_state; 279 280 if (!gem_shrinker || obj->import_attach) 281 return; 282 283 mutex_lock(&gem_shrinker->lock); 284 285 if (!shmem->madv) 286 new_state = DRM_GEM_SHMEM_PAGES_STATE_ACTIVE; 287 else if (shmem->madv > 0) 288 new_state = DRM_GEM_SHMEM_PAGES_STATE_PURGEABLE; > 289 else if (shmem->madv < 0) 290 new_state = DRM_GEM_SHMEM_PAGES_STATE_PURGED; 291 292 drm_gem_shmem_set_pages_state_locked(shmem, new_state); 293 294 mutex_unlock(&gem_shrinker->lock); 295 } 296 -- 0-DAY CI Kernel Test Service https://01.org/lkp