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 X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33F54C47083 for ; Wed, 2 Jun 2021 18:18:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CD9AD61027 for ; Wed, 2 Jun 2021 18:18:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD9AD61027 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1EF726B0036; Wed, 2 Jun 2021 14:18:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 19FDB6B006C; Wed, 2 Jun 2021 14:18:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F34BA6B0070; Wed, 2 Jun 2021 14:18:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0027.hostedemail.com [216.40.44.27]) by kanga.kvack.org (Postfix) with ESMTP id C1FF56B0036 for ; Wed, 2 Jun 2021 14:18:02 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 59B228249980 for ; Wed, 2 Jun 2021 18:18:02 +0000 (UTC) X-FDA: 78209592804.08.99B26A3 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by imf02.hostedemail.com (Postfix) with ESMTP id AE6884202A1C for ; Wed, 2 Jun 2021 18:17:54 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id f30so4830468lfj.1 for ; Wed, 02 Jun 2021 11:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6O7NkYJCtgCzilxV+5vlrLDI0TjVrb6xj3PkeIdIWGQ=; b=cJbRrLchrCWXNVnBRS8v9OmPMYi0ezifbEslDWY9qZU29a3YfwHz16xxXjLP9gVFP2 6loIjNmrmiOmNUcTYFLEa8wH0ZSAiBT+VJoAXuxAsNmudlmZfcL2N3JWwpfREwG5Puqb b1E82UxIx4vUEBa0J3qyFKgEiOMEuPoIo/pwBSide2yldy1kMHE1OWreQA+3TjbbJjma j+xXxJ8H3VWjcYms3bWwIe83V0t48fQX0VH3uPABh0HihkkDeN22Fspf3nEVRBzg87/Y 7w8TtysCogABW5DZfP5w5cOUZiVVYuFleAiN4U/wbSQ+yz7noMGFD0m9Sc0RIH5JNdgM +Dpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6O7NkYJCtgCzilxV+5vlrLDI0TjVrb6xj3PkeIdIWGQ=; b=SR4lAfthfrZS1e2PJcSZhzpgbxTCnO0mV5UpUkibGLHYRMGzpqe2voLimozeQUsAfG n7Uj0GCv0WlPvsZjHM7KIH8ybMFfLuzFmkQQrAX7RtF/4aG80sM9ZXdfHF88Lenl4UPR rHjmAVt9FHcEd+DD+z8BTbG0oEvdQoMhctXg7dbhUyDGqjKhReYot83J6kS1Fn9LLCtf gksuYXDEehPQue4W9C54m1Fu+XE4UBmb67lZ3vpmlPK3B2oLgNqr0oW/G7tp2xqQguiF fBdy6av0nzZ+VZpOu3UzPHjSW3qPT6VyQX8E2BiTjVtYyuQmee7puO18NnAQCk5maUc9 /KwA== X-Gm-Message-State: AOAM531FdDdfO7yjX3FRJk/TYHo6IgDiDkkahHFyoaVPOApeZNmdkbvz 65X8mKUS6Yb1VoihhAqyoqoa6C5nzLFCqgVXsFGZYA== X-Google-Smtp-Source: ABdhPJw/SzSpOy8cPnrC/UTnwf/cBqeooBtrMjji9GPyN56fI//J+0CfzNzSz+CkGN9QpniVOXqpNBV9mbBIRUX2OgE= X-Received: by 2002:a05:6512:220c:: with SMTP id h12mr24364736lfu.374.1622657880204; Wed, 02 Jun 2021 11:18:00 -0700 (PDT) MIME-Version: 1.0 References: <202106021822.Do0Ih08d-lkp@intel.com> In-Reply-To: From: Nick Desaulniers Date: Wed, 2 Jun 2021 11:17:48 -0700 Message-ID: Subject: Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' To: Sergio Paracuellos Cc: kernel test robot , kbuild-all@lists.01.org, clang-built-linux , Linux Memory Management List , Vinod Koul Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: AE6884202A1C Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=cJbRrLch; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf02.hostedemail.com: domain of ndesaulniers@google.com designates 209.85.167.46 as permitted sender) smtp.mailfrom=ndesaulniers@google.com X-Rspamd-Server: rspam03 X-Stat-Signature: suex1mkqwwgfkb6gsetr6yktszxm6gzy X-HE-Tag: 1622657874-513979 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jun 2, 2021 at 11:09 AM Sergio Paracuellos wrote: > > Hi Nick, > > On Wed, Jun 2, 2021 at 6:47 PM Nick Desaulniers wrote: > > > > On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos > > wrote: > > > > > > Hi, > > > > > > On Wed, Jun 2, 2021 at 12:27 PM kernel test robot wrote: > > > > > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > > > head: ed5d0667a6540293c9485dd95babb5f1e241226a > > > > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver > > > > config: x86_64-randconfig-r016-20210602 (attached as .config) > > > > ^ randconfig > > > > > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966) > > > > 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/next/linux-next.git/commit/?id=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a > > > > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > > > > git fetch --no-tags linux-next master > > > > git checkout 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a > > > > # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast] > > > > (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port); > > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info' > > > > _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__) > > > > > > Already fixed in: > > > https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036 > > > > > > > ^~~~~~~~~~~ > > > > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable] > > > > static const struct of_device_id mt7621_pci_phy_ids[] = { > > > > ^ > > > > > > Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I > > > missing something?? > > > > Pretty sure there's a config in MODULE_DEVICE_TABLE that's being > > disabled by the randconfig; the definition of mt7621_pci_phy_ids > > should also be behind preprocessor checks for that. > > So, the driver uses 'mt7621_pci_phy_ids' in two places : > > static const struct of_device_id mt7621_pci_phy_ids[] = { > { .compatible = "mediatek,mt7621-pci-phy" }, > {}, > }; > MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids); > ^ > This one is inside the 'MODULE' preprocessor directive. > > static struct platform_driver mt7621_pci_phy_driver = { > .probe = mt7621_pci_phy_probe, > .driver = { > .name = "mt7621-pci-phy", > .of_match_table = of_match_ptr(mt7621_pci_phy_ids), > ^ > This one is inside 'CONFIG_OF' > }, > }; > > randconfig is not setting 'CONFIG_OF' nor defining MODULE. I've been ^ yeah gating the definition on CONFIG_OF would resolve this. > looking into different drivers code and all of them follow the same > pattern and nothing is behind preprocessor checks at all. So I wonder They are starting to when they get these warnings from 0day bot; there's a lot of drivers though. > if this is really something that needs to be fixed. It's a W=1 build as well; fix it or don't. I'm a sign, not a cop. > > Thanks in advance for clarifications. > > Best regards, > Sergio Paracuellos > > > > > > > > > > > 2 warnings generated. > > > > > > > > > > > > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c > > > > > > > > d87da32372a03c Sergio Paracuellos 2020-11-21 340 > > > > d87da32372a03c Sergio Paracuellos 2020-11-21 @341 static const struct of_device_id mt7621_pci_phy_ids[] = { > > > > d87da32372a03c Sergio Paracuellos 2020-11-21 342 { .compatible = "mediatek,mt7621-pci-phy" }, > > > > d87da32372a03c Sergio Paracuellos 2020-11-21 343 {}, > > > > d87da32372a03c Sergio Paracuellos 2020-11-21 344 }; > > > > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01 345 MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids); > > > > d87da32372a03c Sergio Paracuellos 2020-11-21 346 > > > > > > > > :::::: The code at line 341 was first introduced by commit > > > > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY > > > > > > > > :::::: TO: Sergio Paracuellos > > > > :::::: CC: Vinod Koul > > > > > > > > --- > > > > 0-DAY CI Kernel Test Service, Intel Corporation > > > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > > > > > > Best regards, > > > Sergio Paracuellos > > > > > > -- > > > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > > > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > > > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com. > > > > > > > > -- > > Thanks, > > ~Nick Desaulniers -- Thanks, ~Nick Desaulniers