<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 19, 2016 at 6:31 AM, Robert P. J. Day <span dir="ltr"><<a href="mailto:rpjday@crashcourse.ca" target="_blank">rpjday@crashcourse.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
(ok, let's see if i can avoid embarrassing myself with an overly<br>
simple question ...)<br>
<br>
reading YP kernel-dev manual, and there is an example of a kernel<br>
config fragment:<br>
<br>
CONFIG_SERIAL_8250=y<br>
CONFIG_SERIAL_8250_CONSOLE=y<br>
CONFIG_SERIAL_8250_PCI=y<br>
CONFIG_SERIAL_8250_NR_UARTS=4<br>
CONFIG_SERIAL_8250_RUNTIME_<wbr>UARTS=4<br>
CONFIG_SERIAL_CORE=y<br>
CONFIG_SERIAL_CORE_CONSOLE=y<br>
<br>
all well and good, but is it clear that one can cut that down based on<br>
the defaults in the Kconfig file? since the Kconfig file contains:<br>
<br>
config SERIAL_8250_NR_UARTS<br>
int "Maximum number of 8250/16550 serial ports"<br>
depends on SERIAL_8250<br>
default "4"<br>
help<br>
Set this to the number of serial ports you want the driver<br>
to support. This includes any ports discovered via ACPI or<br>
PCI enumeration and any ports that may be added at run-time<br>
via hot-plug, or any ISA multi-port serial cards.<br>
<br>
config SERIAL_8250_RUNTIME_UARTS<br>
int "Number of 8250/16550 serial ports to register at runtime"<br>
depends on SERIAL_8250<br>
range 0 SERIAL_8250_NR_UARTS<br>
default "4"<br>
help<br>
Set this to the maximum number of serial ports you want<br>
the kernel to register at boot time. This can be overridden<br>
with the module parameter "nr_uarts", or boot-time parameter<br>
8250.nr_uarts<br>
<br>
is it accurate to say that the two fragment lines related to UARTs<br>
could be omitted? (yes, it's more informative to have them there, but<br>
technically, they're not required, correct?)<br></blockquote><div><br><br></div><div>correct. In the end, it comes down to how much future proofing, readability<br></div><div>and segmentation you want in fragments. Some folks like to put everything<br></div><div>into a fragments .. others trust the kernel to not change a default and mess<br></div><div>with their functionality :)<br> </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
similarly, another line could be omitted given the Kconfig lines:<br>
<br>
config SERIAL_8250<br>
tristate "8250/16550 and compatible serial support"<br>
select SERIAL_CORE<br>
<br>
however, given the following in the same Kconfig file:<br>
<br>
config SERIAL_8250_DEPRECATED_OPTIONS<br>
bool "Support 8250_core.* kernel options (DEPRECATED)"<br>
depends on SERIAL_8250<br>
default y<br>
<br>
if you didn't want deprecated options, you *would* have to explicitly<br>
deselect that option with:<br>
<br>
# CONFIG_SERIAL_8250_DEPRECATED_<wbr>OPTIONS is not set<br>
<br>
yes?<br></blockquote><div><br></div><div>Correct. As long as some other Kconfig doesn't "select <foo>", you can<br></div><div>turn the default off this way. There is another subtlety that if a Kconfig option<br></div><div>doesn't have help text, you also can't change it from a default .. but that's<br></div><div>not my fault, that's the fun of the kernel configuration subsystem :D<br><br></div><div>Bruce<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
just making sure i'm not overlooking any subtleties.<br>
<br>
rday<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--<br>
<br>
==============================<wbr>==============================<wbr>============<br>
Robert P. J. Day Ottawa, Ontario, CANADA<br>
<a href="http://crashcourse.ca" rel="noreferrer" target="_blank">http://crashcourse.ca</a><br>
<br>
Twitter: <a href="http://twitter.com/rpjday" rel="noreferrer" target="_blank">http://twitter.com/rpjday</a><br>
LinkedIn: <a href="http://ca.linkedin.com/in/rpjday" rel="noreferrer" target="_blank">http://ca.linkedin.com/in/<wbr>rpjday</a><br>
==============================<wbr>==============================<wbr>============<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>