Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp962759pxj; Wed, 2 Jun 2021 16:31:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw79Qs2ZRcBOUKMsKv9za7A3PmrzF+MsZPBW+gya1uL7HV1uvft4aBHuXdCo4Ffu43vkW5L X-Received: by 2002:a17:906:a2d0:: with SMTP id by16mr25475642ejb.37.1622676705722; Wed, 02 Jun 2021 16:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622676705; cv=none; d=google.com; s=arc-20160816; b=sA4i6fSlr7tmLmFPSQyrVhWzD2f2bmBRDMQLeVajcQqDRG8Up7NhBMdRkC7aazijeP tf8p0LKzY6tqlzO66EZGKvQo9C1ddIOPnCdyvXXA5ZdXJ+ZJO0QyTt59bBOWKpdsP53f 58la8qZ3Bb7pBRtA8rv/ZGn9IeWnRd2BPqDjYY22/pwa2pnobHAs0hpsiUjoKZPs8MUX 6HiYxZY48vTx2Oosih5WQ8X6rf1TCeRl/SZ/xz9Gb/U8NTU1jhUfA94Qva8CWYgzB9XY 7IesR42W//rZs1N4vbqRNB7wQAN+PEekX+e3xpqTgz4yez/huNrM4+FHVe98t7aEUOuL I5YA== 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=5OxZhY2Lx3PSsgLeIF/CGHfusFZKZ4M8VuvTPJ8fjZk=; b=cwUdWDtaq9i/AYoEfL+cqy0LEVVyrRSSLsLlAIj7ycvxIiQy7HjttT4ESr8V5eK7YG 3EepZgROrZcoS78llLugPwWWrF9wXlOOvOXl7fuo1fIhI2X7PBtN1QXXd5e9FJLzs1Pr RcMmnrWVuLpKW0kVgb/gnvwBgMVfV7c+sAJRJn2VjuWeVyLXVpYA6GR+qs1/8x3NlsCL xvYB000eG7ZUIzA76ZCnnIb4o06lMDMasnB0Dt3BGO3QJ+HNUHKPG/hCTurWePYYlWUI U9YW+BjCv4c0abftbYAB9AZrYLAKQvcQWgvyS9g9FjlX+XVF9PbTb/Uefqss/+RN+VID WjUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=qPx9Zq7E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si961643ejg.306.2021.06.02.16.31.22; Wed, 02 Jun 2021 16:31:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=qPx9Zq7E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbhFBXbT (ORCPT + 99 others); Wed, 2 Jun 2021 19:31:19 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:42178 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbhFBXbS (ORCPT ); Wed, 2 Jun 2021 19:31:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=5OxZhY2Lx3PSsgLeIF/CGHfusFZKZ4M8VuvTPJ8fjZk=; b=qPx9Zq7Ez6DFtc8Pc1fk2eNwiN 8cc8XJj7Zz4y1t1yADcuWFIx07QBEdxXAEWwgBSl9Wf+OOA+2LHUy9l817i7GdZHQycvll8eant8k KxrFQ6QrTsj2zhvWgpi07w7ZWvSthQ0UvqVs/+S+QEGCNUpUfeSWffJgYs30vPwm0Vs4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1loaIY-007XKV-Hv; Thu, 03 Jun 2021 01:29:18 +0200 Date: Thu, 3 Jun 2021 01:29:18 +0200 From: Andrew Lunn To: Nathan Chancellor Cc: kernel test robot , Marek Vasut , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: drivers/net/ethernet/micrel/ks8851_common.c:995:6: warning: variable 'ret' set but not used Message-ID: References: <202106030332.tmiMOCF7-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 02, 2021 at 01:02:43PM -0700, Nathan Chancellor wrote: > On 6/2/2021 12:32 PM, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > head: 231bc539066760aaa44d46818c85b14ca2f56d9f > > commit: 797047f875b5463719cc70ba213eb691d453c946 net: ks8851: Implement Parallel bus operations > > date: 1 year ago > > config: x86_64-randconfig-a004-20210601 (attached as .config) > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d41cb6bb2607fa5c7a9df2b3dab361353657d225) > > 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 x86_64 cross compiling tool for clang build > > # apt-get install binutils-x86-64-linux-gnu > > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=797047f875b5463719cc70ba213eb691d453c946 > > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > git fetch --no-tags linus master > > git checkout 797047f875b5463719cc70ba213eb691d453c946 > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>): > > > > > > drivers/net/ethernet/micrel/ks8851_common.c:995:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] > > int ret = 0; > > ^ > > 1 warning generated. > > This warning is newly implemented in clang, it was not caused by the above > commit. As you can see from the blame below, this has been an issue since > this driver's introduction. I wonder if it was intended to return ret in the > places that return 0? The return value from s8851_read_selftest() is ignored by the caller. Probably ret could be removed and the function made to return void. Andrew