[PATCH v1 03/12] crypto: qat - address recursive dependency when fw signing is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2015-05-07 at 20:28 +0200, Luis R. Rodriguez wrote:
> Here's a simple test Kconfig entry one can use to test this:
> 
> Let's say rock climbers hate locker rooms, but swimmer need them. We can
> then have:
> 
> config GYM                                                                      
>         tristate                                                                
>         default n                                                               
>                                                                                 
> config LOCKER                                                                   
>         tristate                                                                
>         default n                                                               
>         depends on GYM                                                          
>                                                                                 
> config SWIMMING                                                                 
>         tristate                                                                
>         default n                                                               
>         select GYM                                                              
>         select LOCKER                                                           
>                                                                                 
> config ROCK_CLIMBING                                                            
>         tristate                                                                
>         default n                                                               
>         depends on !LOCKER                                                      
>         select GYM  
> 
> Kbuild seems to believe that because swimmers need lockers that rock climbers
> need them too. That is obviously not true.
> 
> mcgrof at ergon ~/linux-next (git::your-swimming-dad)$ make allnoconfig
> scripts/kconfig/conf --allnoconfig Kconfig
> drivers/crypto/qat/Kconfig:25:error: recursive dependency detected!
> drivers/crypto/qat/Kconfig:25:	symbol GYM is selected by ROCK_CLIMBING
> drivers/crypto/qat/Kconfig:40:	symbol ROCK_CLIMBING depends on LOCKER
> drivers/crypto/qat/Kconfig:29:	symbol LOCKER depends on GYM
> #
> # configuration written to .config
> #

The same error can be seen with this Kconfig file (simplified in some
places):

# test with 'make KBUILD_KCONFIG=Kconfig.your-swimming-dad menuconfig'
mainmenu "Your swimming dad"

config MODULES
	def_bool y
	option modules

config GYM
        tristate "Gym"

config LOCKER
        tristate "Locker"
	depends on GYM

config ROCK_CLIMBING
        tristate "Rock climbing"
	depends on LOCKER
	select GYM

But then I think it's helpful to also play with this very similar file:

# test with 'make KBUILD_KCONFIG=Kconfig.your-swimming-mom menuconfig'
mainmenu "Your swimming mom"

config MODULES
	def_bool y
	option modules

config GYM
        tristate "Gym"
	depends on ROCK_CLIMBING

config LOCKER
        tristate "Locker"
	depends on GYM

config ROCK_CLIMBING
        tristate "Rock climbing"
	depends on LOCKER

This triggers the same error but with this as first line:
    symbol GYM depends on ROCK_CLIMBING

Now the circular dependency in mom's Kconfig file is rather obvious. The
circular dependency in dad's file too, once you adapt to the reverse
logic of select statements. (The part that makes my brain hurt.)

Tomorrow, after a (western European) night of sleep, I hope to explain
why the error in dad's file makes sense. I'm not much of a teacher so I
need a clear head to do that.

Thanks,


Paul Bolle




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux