Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp195152ybt; Thu, 9 Jul 2020 19:44:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz28KK6DhyM7hxwb7POUZSrP70eDLKRUy4fPo9a1T/kwY3or1eMkvkD2812913MhMXBvloQ X-Received: by 2002:aa7:c341:: with SMTP id j1mr78391441edr.197.1594349082052; Thu, 09 Jul 2020 19:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594349082; cv=none; d=google.com; s=arc-20160816; b=CHyREt5r/V6D/oCYF1jldqvFEii4A//Vkjj0E2XzqjOfB+Bm6OJFBHD/c5Q/qzXGl/ VrkfLN7r4JqJoT0nzWmuAEnx5+13kE6wA8/e1GI6E6jThhfuxT+FXMs2oLyvS61U9R06 Idu5TdqlnC+ofFC5prwF0+bAt6Fww76MMSHWM6VcPIiJUCsuGJnY8TKciTaDl12Y9P76 5vyQMD6iDJf2040Fi6IfrcxNMNE8yQb6EArOkL54WmWohet3hVM69ecnoVUe+3BvNWXD YBiBELR60OheSzJYrAzKC4GRrJKUqjHdC4axAskEAt+sfeIwVfY1488gQiQ/vWqU8PA1 ri4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ij3YvsL4Rul6XPZefX+VkrzglhCxXEgOUPXujCuZUiA=; b=0FKicbVgbYx7UnLOMdbmNUgvoZffW0s+d5PzexwY2FAW8NFtHCLX7vocNZjMiZPG/+ lZdEMqx/5JpBBEh4HSYtkvhvUYMXF4Sq6iAr2sYXWDRJ8zDmlgaGDMAFTELdvfjpF+gO hECZz4W5adJrdan3Fpdf+y1CCrEzd+Hx+4RCPu4OQouF7gTjAwwb3oFeskhUvl1CLE9v FgfzJ/hYQ9owxugtDPj0i+ZXIhTYmrGbfWGhflMQiJ9wBFDxJi5oYxnWllbBHtkzFsqY yc0ezcUkTPK8kMe/T8W76eUogY08cCzh2JwirNl0b8DVF3Wq7ehRKphmM7QTsc4hTUCR G+1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pdVm1jsr; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv2si3027564ejb.428.2020.07.09.19.44.07; Thu, 09 Jul 2020 19:44:42 -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=@gmail.com header.s=20161025 header.b=pdVm1jsr; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726872AbgGJClD (ORCPT + 99 others); Thu, 9 Jul 2020 22:41:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbgGJClD (ORCPT ); Thu, 9 Jul 2020 22:41:03 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B201DC08C5CE for ; Thu, 9 Jul 2020 19:41:02 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id x83so3597313oif.10 for ; Thu, 09 Jul 2020 19:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ij3YvsL4Rul6XPZefX+VkrzglhCxXEgOUPXujCuZUiA=; b=pdVm1jsr1Wzvo9+OSFETIIEWdhZJc2bP6Z+2NDXDHugV7Zm80kcIS3D3amqDCaR380 tSIrQLwPbpjmQVU+u3lFylaJnP4KcBrNOgPpfT5bWHiXCKtmCK/iTjyvLo43P4tOoVu2 EfcqYuQUy+gc9pHEXJiJ/8ieiF3MCACq8uvjj0lVjx7Gr/CIeXW67iBOR4hTZ4JTs4VA b+zkxwiBybRxUTaPzCfZIxZ55gn5OG2nRWcPCR0qyEaaNiU1Hd+hhpxsAXvRRxyKFglS mZ03N7b8agl2USYcMSq2ZFlmvJnAhrE+nc5DlrmAYdXLJLjc2H7YBQ/VOwL/X/nOkdsZ BNOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ij3YvsL4Rul6XPZefX+VkrzglhCxXEgOUPXujCuZUiA=; b=rfEuGLBFp22YNPRS8tcIsmloWZfg7EfYfl9ijtvMtNZxAg0TPHmbOijtyAsw9Yf6li 0nms/KCF7m7tgqUqmUnr1gVXV9shAQZrfKj+RCswBIDLt3hsEQ7G67zJ9Pdpp7xCxchn zUYp8PocFNohIFORz3nhyhX1Jpno9cMyraMVvpqEbd4Ts6wVj5G9kYnKbYPsyaXv2S08 uxw8NP3aJHmJ8NMoSsiAmuLS7jKoEuzto4DVZJiLA6Xj5G6cnTiZuQFoizoWiyzeV2+K p11XC4SuU+C1xquxYLbyawewpCyZ/5DXkxSewnkOs9qFBPpYicDLsLqetSZcLG6Jzf7Z HY2Q== X-Gm-Message-State: AOAM533V4xon5OQcNa3o+QOIohuMcnr7MtHS+W+9wugKUc/KmfgDlWhe KcRTlVObMQnB65m/z7aGEQU= X-Received: by 2002:aca:5693:: with SMTP id k141mr2558176oib.35.1594348861915; Thu, 09 Jul 2020 19:41:01 -0700 (PDT) Received: from ubuntu-n2-xlarge-x86 ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id j16sm842047oib.35.2020.07.09.19.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 19:41:01 -0700 (PDT) Date: Thu, 9 Jul 2020 19:41:00 -0700 From: Nathan Chancellor To: kernel test robot Cc: Sven Van Asbroeck , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, Mark Brown Subject: Re: sound/soc/codecs/zl38060.c:614:34: warning: unused variable 'zl38_dt_ids' Message-ID: <20200710024100.GA2055744@ubuntu-n2-xlarge-x86> References: <202007100026.oufYkhwZ%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202007100026.oufYkhwZ%lkp@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 10, 2020 at 12:47:31AM +0800, kernel test robot wrote: > Hi Sven, > > FYI, the error/warning still remains. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7 > commit: 52e8a94baf9026276fcdc9ff21a50dc2ca0bc94b ASoC: Add initial ZL38060 driver > date: 3 months ago > config: x86_64-randconfig-r004-20200709 (attached as .config) > compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8) > 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 > git checkout 52e8a94baf9026276fcdc9ff21a50dc2ca0bc94b > # 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 >>): > > >> sound/soc/codecs/zl38060.c:614:34: warning: unused variable 'zl38_dt_ids' [-Wunused-const-variable] > static const struct of_device_id zl38_dt_ids[] = { > ^ > 1 warning generated. > > vim +/zl38_dt_ids +614 sound/soc/codecs/zl38060.c > > 613 > > 614 static const struct of_device_id zl38_dt_ids[] = { > 615 { .compatible = "mscc,zl38060", }, > 616 { /* sentinel */ } > 617 }; > 618 MODULE_DEVICE_TABLE(of, zl38_dt_ids); > 619 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > When CONFIG_SND_SOC_ZL38060 is y, MODULE_DEVICE_TABLE expands to nothing so zl38_dt_ids will be unused. This is a pretty common construct in the kernel and the only way I can think of to resolve this through the code is by adding __used annotations to all of these variables, which I think is overkill for this. Personally, I think this warning should be downgraded to W=2, thoughts? Cheers, Nathan