Skip to content
Snippets Groups Projects
  • Alexandru Gagniuc's avatar
    ec0512b1
    Revert "lib: introduce HASH_CALCULATE option" · ec0512b1
    Alexandru Gagniuc authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
    
    When we think of Kconfig, we usually think of features that we like
    to enable or not. Ideally, we wouldn't use Kconfig to fix a build
    issue, although sometimes it might make sense. With Kconfig it's hard
    to guarantee that the fix is universal. We can only say that it works
    for the set of tested configurations. In the majority of cases, it's
    preferable to let the linker figure things out for us.
    
    The reverted commit attempted to fix a build issue by adding an
    invisible Kconfig option. This is wrong in several ways:
    
    It invents a new Kconfig variable when CONFIG_HASH already
    exists for the same purpose.
    Second, hash-checksum.c makes use of the hash_progressive_lookup_algo()
    symbol, which is only provided with CONFIG_HASH, but this dependency
    was not expressed in the reverted patch.
    
    It feels like Kconfig is turning into a listing of all available
    source files, and a buffet to 'select' which ones to compile. The
    purpose of this revert is to enable the next change to make use of
    CONFIG_HASH instead of adding to Kconfig.
    
    This reverts commit 87316da0.
    
    Signed-off-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
    Acked-by: default avatarMasahisa Kojima <masahisa.kojima@linaro.org>
    ec0512b1
    History
    Revert "lib: introduce HASH_CALCULATE option"
    Alexandru Gagniuc authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
    
    When we think of Kconfig, we usually think of features that we like
    to enable or not. Ideally, we wouldn't use Kconfig to fix a build
    issue, although sometimes it might make sense. With Kconfig it's hard
    to guarantee that the fix is universal. We can only say that it works
    for the set of tested configurations. In the majority of cases, it's
    preferable to let the linker figure things out for us.
    
    The reverted commit attempted to fix a build issue by adding an
    invisible Kconfig option. This is wrong in several ways:
    
    It invents a new Kconfig variable when CONFIG_HASH already
    exists for the same purpose.
    Second, hash-checksum.c makes use of the hash_progressive_lookup_algo()
    symbol, which is only provided with CONFIG_HASH, but this dependency
    was not expressed in the reverted patch.
    
    It feels like Kconfig is turning into a listing of all available
    source files, and a buffet to 'select' which ones to compile. The
    purpose of this revert is to enable the next change to make use of
    CONFIG_HASH instead of adding to Kconfig.
    
    This reverts commit 87316da0.
    
    Signed-off-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
    Acked-by: default avatarMasahisa Kojima <masahisa.kojima@linaro.org>