Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp793118pxb; Tue, 12 Apr 2022 13:36:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyutroA5Hi4n6XUnnG31lnOvHG1Y5wHxz6535lpFd59S/Gi6x/gsHZJIPcNC0I04jfw8l9h X-Received: by 2002:a17:902:70c1:b0:156:16c0:dc7b with SMTP id l1-20020a17090270c100b0015616c0dc7bmr39809751plt.85.1649795807812; Tue, 12 Apr 2022 13:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649795807; cv=none; d=google.com; s=arc-20160816; b=axVK5oGmRVh+fwpctjflBaNUPwBti0fjiu+Fibk+7wI5B1j+ZfkVUW1K9UMD9Gs83h VO4fm6KX7VF/ZKp5/mjGwRNQEjz8zz5t4k8eGeG6Uc9zS5lL3ymqltC9U0t5w3QL4zG5 L+XRhtTBWgiH2p2as3DVYhAIa3EN6ROt4iKyG7lr23gDbtSG53OVJ2YDwl3kxLwh1iJ8 XlizmK9/dTvcjwgByFKeYfpm9EK35etZRhHYUFt5bFi0S2lN2pF7kWx8iBBfyO15ORJF mlrZBkKlUFHrvkKM2Am7pE8+A17r3UZX2hbvR1+Nv2Y8wlUtc047U5/n4YuvlQsDrCF6 Y6+w== 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=fruVNM4lnz3woH0j03WSh8Xd1otCHbf+aFvn4wKA2Tg=; b=b6HqtLFjIiDS24365TOPtjCrwmWwEc+MpnNwyprvd2fCaZqXjAP+85kK+DT5Z1wKfZ zXL2cDtE5Wp1cw8wT5u9crvok1e0TMAanMMqFFqDmr9HDNO67+S2niYyJs3dDja0otEy 4RGqOxb5R9VPl+zjrtYBeDi/uUFXwCX47R5+BscnwkfwHippjgU1ItrWFjM9stM/knkr J5uQYEpxouk1MC2jPCRvFzbkBtk4y1QFmBKqhD1fPUEddf31Zkh2ea6PPioEmSnsPA8a 9SR1DHZovIoCq3wqbJyxY5YWZpD+ykThifV/ukvFc5eioxs1Jw93ndFdolqimGNfsOsk 6FnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bYgezipw; 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 u17-20020a056a00159100b004fb2ca5f6fcsi12240717pfk.26.2022.04.12.13.36.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:36:47 -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=bYgezipw; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D257A94C6; Tue, 12 Apr 2022 13:10:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387089AbiDLJFa (ORCPT + 99 others); Tue, 12 Apr 2022 05:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359826AbiDLHnn (ORCPT ); Tue, 12 Apr 2022 03:43:43 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F92643AE1 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=gkhGiepzPyOKcCmGXkN+87sWY6kjgK6MU99iQQlt3gs=; b=bYgezipwarSpl1rtElh+SM2Cy7w0gSIOuB4JJFxfS1s473Ycxf7zVELG TllL5AtQrbr+51+cYrfKlt6KFJeAG+OwYMMuI+y13j+84879jtqk/9YXg puRQTKWGfBO86RuxDZtMg278Jd0cK2xk7pE4D2uJYkEmQw2C+IhNkpiXy xHParV5UVORiaWXkaW8+UrX/uLjkiSBAI5jbeq2P421HM5eUx6kAW8GH+ lBKuk7UToBDaNbgtLYcpp8LTG2SidsYQdlLo6eX0rw+Qr5MGLYjzREPjv 8J8ldS+44aZ38XhakIl+DZR6cERHtoW3i3kpnqrHcF+lWFJ8yyw4dmNmS w==; X-IronPort-AV: E=McAfee;i="6400,9594,10314"; a="322743446" X-IronPort-AV: E=Sophos;i="5.90,253,1643702400"; d="scan'208";a="322743446" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.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="802118281" Received: from lkp-server02.sh.intel.com (HELO d3fc50ef50de) ([10.239.97.151]) by fmsmga006.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 1neAum-0002ci-L0; Tue, 12 Apr 2022 07:26:16 +0000 Date: Tue, 12 Apr 2022 15:25:51 +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: <202204121504.gLR3FHQe-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: hexagon-randconfig-r045-20220411 (https://download.01.org/0day-ci/archive/20220412/202204121504.gLR3FHQe-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=hexagon 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