xiaoxiang781216 commented on a change in pull request #151: Fix kconfig warning URL: https://github.com/apache/incubator-nuttx/pull/151#discussion_r370443637
########## File path: arch/arm/src/lpc31xx/Kconfig ########## @@ -60,7 +60,7 @@ config LPC31_SPI config LPC31_USBOTG bool "USB OTG" default n - select USBHOST_HAVE_ASYNCH + select USBHOST_HAVE_ASYNCH if USBHOST Review comment: Yes, I follow STM32. But actually, I think there are many places which misuse select/depend/if. I copy the related stuff from https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt: - reverse dependencies: "select" <symbol> ["if" <expr>] While normal dependencies reduce the upper limit of a symbol (see below), reverse dependencies can be used to force a lower limit of another symbol. The value of the current menu symbol is used as the minimal value <symbol> can be set to. If <symbol> is selected multiple times, the limit is set to the largest selection. Reverse dependencies can only be used with boolean or tristate symbols. Note: select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over. - weak reverse dependencies: "imply" <symbol> ["if" <expr>] This is similar to "select" as it enforces a lower limit on another symbol except that the "implied" symbol's value may still be set to n from a direct dependency or with a visible prompt. This document has many bad example. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services