From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92A11C433EF for ; Fri, 10 Jun 2022 08:36:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347879AbiFJIgj (ORCPT ); Fri, 10 Jun 2022 04:36:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348055AbiFJIgH (ORCPT ); Fri, 10 Jun 2022 04:36:07 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B7133A738 for ; Fri, 10 Jun 2022 01:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654850008; x=1686386008; h=date:from:to:cc:subject:message-id:mime-version; bh=0R43Vz3YgifWJAlqhudrQaI0uJxRsyIjybceh/8k9UM=; b=YWF2tgKGyLKWdQKMotNqHQQde9cDlMeueKOxqq4h6SPXyG///fm6EoCR xiJyHgsOnx4pGi060HQdLBGoZzsbs3wRjLkUigBEvDa4W/5dXtNaKjiMx pPkARj7Uz624whRctFTJE9BnOtPhV0S3K59AEfNVAV7FDsGun8cqLtl+R o7xmt5HXSQQYRFuchQgKRtMxw/iQmgUcGkJk15Mcu+zM/8ovihETHybZO 4glv+OLuRVQrFA9YOEpAVGauH5iXq7J7+jOgGc0GPopeWOn6FMC5bQ4fM I48YzPhO6XlQ8/Wsh/HHgbPwD/upm6dwXVJ/Q9//QcVZEcVArUO8OxdVr A==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278362869" X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="278362869" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 01:33:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="684432311" Received: from lkp-server01.sh.intel.com (HELO 60dabacc1df6) ([10.239.97.150]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 01:33:12 -0700 Received: from kbuild by 60dabacc1df6 with local (Exim 4.95) (envelope-from ) id 1nza4u-000H0J-4h; Fri, 10 Jun 2022 08:33:12 +0000 Date: Fri, 10 Jun 2022 16:32:18 +0800 From: kernel test robot To: Tom Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Emil Renner Berthing Subject: [esmil:visionfive 22/54] drivers/soc/sifive/sifive_l2_cache.c:142:19: warning: result of comparison of constant 36507222016 with expression of type 'unsigned long' is always false Message-ID: <202206101615.iqFYh0RG-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://github.com/esmil/linux visionfive head: 906be7ef2fb9e2f1fcb740d3d506768cddfc52ca commit: 1c9c971346b0ca811114ae00fce28cbf3c34232b [22/54] sifive/sifive_l2_cache: Add sifive_l2_flush64_range function config: riscv-buildonly-randconfig-r006-20220609 (https://download.01.org/0day-ci/archive/20220610/202206101615.iqFYh0RG-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 70d35fe1257e429266b83025997b400e9f79110e) 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 # install riscv cross compiling tool for clang build # apt-get install binutils-riscv-linux-gnu # https://github.com/esmil/linux/commit/1c9c971346b0ca811114ae00fce28cbf3c34232b git remote add esmil https://github.com/esmil/linux git fetch --no-tags esmil visionfive git checkout 1c9c971346b0ca811114ae00fce28cbf3c34232b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/soc/sifive/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/soc/sifive/sifive_l2_cache.c:152:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] writeq(line, l2_base + SIFIVE_L2_FLUSH64); ^ >> drivers/soc/sifive/sifive_l2_cache.c:142:19: warning: result of comparison of constant 36507222016 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare] (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START + ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. vim +142 drivers/soc/sifive/sifive_l2_cache.c 123 124 #ifdef CONFIG_SIFIVE_L2_FLUSH 125 void sifive_l2_flush64_range(unsigned long start, unsigned long len) 126 { 127 unsigned long line; 128 129 if(!l2_base) { 130 pr_warn("L2CACHE: base addr invalid, skipping flush\n"); 131 return; 132 } 133 134 /* TODO: if (len == 0), skipping flush or going on? */ 135 if(!len) { 136 pr_debug("L2CACHE: flush64 range @ 0x%lx(len:0)\n", start); 137 return; 138 } 139 140 /* make sure the address is in the range */ 141 if(start < CONFIG_SIFIVE_L2_FLUSH_START || > 142 (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START + 143 CONFIG_SIFIVE_L2_FLUSH_SIZE)) { 144 pr_warn("L2CACHE: flush64 out of range: %lx(%lx), skip flush\n", 145 start, len); 146 return; 147 } 148 149 mb(); /* sync */ 150 for (line = start; line < start + len; 151 line += SIFIVE_L2_FLUSH64_LINE_LEN) { > 152 writeq(line, l2_base + SIFIVE_L2_FLUSH64); 153 mb(); 154 } 155 } 156 EXPORT_SYMBOL_GPL(sifive_l2_flush64_range); 157 #endif 158 -- 0-DAY CI Kernel Test Service https://01.org/lkp