lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mhng-24035d0e-a382-4a48-89eb-eb00213fca7e@palmer-si-x1e>
Date:   Sun, 23 Jun 2019 20:59:46 -0700 (PDT)
From:   Palmer Dabbelt <palmer@...ive.com>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
CC:     davem@...emloft.net, netdev@...r.kernel.org,
        linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
        yash.shah@...ive.com
Subject:     Re: linux-next: build failure after merge of the net-next tree

On Sun, 23 Jun 2019 20:12:45 PDT (-0700), Stephen Rothwell wrote:
> Hi all,
>
> On Thu, 20 Jun 2019 19:13:48 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>>
>> After merging the net-next tree, today's linux-next build (powerpc
>> allyesconfig) failed like this:
>> 
>> drivers/net/ethernet/cadence/macb_main.c:48:16: error: field 'hw' has incomplete type
>>   struct clk_hw hw;
>>                 ^~
>> drivers/net/ethernet/cadence/macb_main.c:4003:21: error: variable 'fu540_c000_ops' has initializer but incomplete type
>>  static const struct clk_ops fu540_c000_ops = {
>>                      ^~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4004:3: error: 'const struct clk_ops' has no member named 'recalc_rate'
>>   .recalc_rate = fu540_macb_tx_recalc_rate,
>>    ^~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4004:17: warning: excess elements in struct initializer
>>   .recalc_rate = fu540_macb_tx_recalc_rate,
>>                  ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4004:17: note: (near initialization for 'fu540_c000_ops')
>> drivers/net/ethernet/cadence/macb_main.c:4005:3: error: 'const struct clk_ops' has no member named 'round_rate'
>>   .round_rate = fu540_macb_tx_round_rate,
>>    ^~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4005:16: warning: excess elements in struct initializer
>>   .round_rate = fu540_macb_tx_round_rate,
>>                 ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4005:16: note: (near initialization for 'fu540_c000_ops')
>> drivers/net/ethernet/cadence/macb_main.c:4006:3: error: 'const struct clk_ops' has no member named 'set_rate'
>>   .set_rate = fu540_macb_tx_set_rate,
>>    ^~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4006:14: warning: excess elements in struct initializer
>>   .set_rate = fu540_macb_tx_set_rate,
>>               ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4006:14: note: (near initialization for 'fu540_c000_ops')
>> drivers/net/ethernet/cadence/macb_main.c: In function 'fu540_c000_clk_init':
>> drivers/net/ethernet/cadence/macb_main.c:4013:23: error: storage size of 'init' isn't known
>>   struct clk_init_data init;
>>                        ^~~~
>> drivers/net/ethernet/cadence/macb_main.c:4032:12: error: implicit declaration of function 'clk_register'; did you mean 'sock_register'? [-Werror=implicit-function-declaration]
>>   *tx_clk = clk_register(NULL, &mgmt->hw);
>>             ^~~~~~~~~~~~
>>             sock_register
>> drivers/net/ethernet/cadence/macb_main.c:4013:23: warning: unused variable 'init' [-Wunused-variable]
>>   struct clk_init_data init;
>>                        ^~~~
>> drivers/net/ethernet/cadence/macb_main.c: In function 'macb_probe':
>> drivers/net/ethernet/cadence/macb_main.c:4366:2: error: implicit declaration of function 'clk_unregister'; did you mean 'sock_unregister'? [-Werror=implicit-function-declaration]
>>   clk_unregister(tx_clk);
>>   ^~~~~~~~~~~~~~
>>   sock_unregister
>> drivers/net/ethernet/cadence/macb_main.c: At top level:
>> drivers/net/ethernet/cadence/macb_main.c:4003:29: error: storage size of 'fu540_c000_ops' isn't known
>>  static const struct clk_ops fu540_c000_ops = {
>>                              ^~~~~~~~~~~~~~
>> 
>> Caused by commit
>> 
>>   c218ad559020 ("macb: Add support for SiFive FU540-C000")
>> 
>> CONFIG_COMMON_CLK is not set for this build.
>> 
>> I have reverted that commit for today.
>
> I am still reverting that commit.  Has this problem been fixed in some
> subtle way?

I don't think so.  I'm assuming something like this is necessary

diff --git a/drivers/net/ethernet/cadence/Kconfig b/drivers/net/ethernet/cadence/Kconfig
index 1766697c9c5a..d13db9e9c818 100644
--- a/drivers/net/ethernet/cadence/Kconfig
+++ b/drivers/net/ethernet/cadence/Kconfig
@@ -23,6 +23,7 @@ config MACB
        tristate "Cadence MACB/GEM support"
        depends on HAS_DMA
        select PHYLIB
+       depends on COMMON_CLK
        ---help---
          The Cadence MACB ethernet interface is found on many Atmel AT32 and
          AT91 parts.  This driver also supports the Cadence GEM (Gigabit
@@ -42,7 +43,7 @@ config MACB_USE_HWSTAMP

 config MACB_PCI
        tristate "Cadence PCI MACB/GEM support"
-       depends on MACB && PCI && COMMON_CLK
+       depends on MACB && PCI
        ---help---
          This is PCI wrapper for MACB driver.

at a minimum, though it may be saner to #ifdef support for the SiFive clock
driver as that's only useful on some systems.  Assuming I can reproduce the
build failure (which shouldn't be too hard), I'll send out a patch that adds a
Kconfig for the FU540 clock driver to avoid adding a COMMON_CLK dependency for
all MACB systems.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ