zephyr/subsys/net/lib/lwm2m
Ulf Magnusson eddd98f811 kconfig: Replace some single-symbol 'if's with 'depends on'
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.

There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.

The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).

Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.

Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.

Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.

The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.

(Everything above is true for choices, menus, and comments as well.)

Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 08:32:42 -05:00
..
buf_util.h net: lwm2m: move to flat buffers 2019-01-31 23:02:56 -05:00
CMakeLists.txt net: lwm2m: add IPSO Accelerometer object support 2019-08-02 12:00:35 +03:00
ipso_accelerometer.c net: lwm2m: add optional timestamp resources to some IPSO objects 2019-12-18 10:43:59 +02:00
ipso_buzzer.c net: lwm2m: add IPSO Buzzer object support 2019-08-02 12:00:35 +03:00
ipso_light_control.c net: lwm2m: cleanup memset usage during init 2019-08-02 12:00:35 +03:00
ipso_onoff_switch.c net: lwm2m: add optional timestamp resources to some IPSO objects 2019-12-18 10:43:59 +02:00
ipso_push_button.c net: lwm2m: add optional timestamp resources to some IPSO objects 2019-12-18 10:43:59 +02:00
ipso_temp_sensor.c net: lwm2m: add optional timestamp resources to some IPSO objects 2019-12-18 10:43:59 +02:00
ipso_timer.c net: lwm2m: cleanup memset usage during init 2019-08-02 12:00:35 +03:00
Kconfig kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
Kconfig.ipso net: lwm2m: add optional timestamp resources to some IPSO objects 2019-12-18 10:43:59 +02:00
lwm2m_engine.c net: lwm2m: Cleanup special handling of DNS for offloading 2019-10-15 23:31:08 +03:00
lwm2m_engine.h net: lwm2m: rework resource instance storage / access methods 2019-08-02 12:00:35 +03:00
lwm2m_obj_connmon.c net: lwm2m: fix IP address max calc in conn mon obj 2019-08-09 23:22:13 +03:00
lwm2m_obj_device.c net: lwm2m: implement utc_offset and timezone 2020-02-06 10:19:47 +02:00
lwm2m_obj_firmware.c net: lwm2m: rework resource instance storage / access methods 2019-08-02 12:00:35 +03:00
lwm2m_obj_firmware_pull.c net: lwm2m: firmware_pull: fix multiple last_block notifications 2019-08-29 19:49:29 +02:00
lwm2m_obj_location.c net: lwm2m: add Location object support 2019-08-02 12:00:35 +03:00
lwm2m_obj_security.c net: lwm2m: cleanup memset usage during init 2019-08-02 12:00:35 +03:00
lwm2m_obj_server.c net: lwm2m: cleanup memset usage during init 2019-08-02 12:00:35 +03:00
lwm2m_object.h net: lwm2m: rework resource instance storage / access methods 2019-08-02 12:00:35 +03:00
lwm2m_rd_client.c net: lwm2m: support client-initiated De-register 2019-09-08 12:36:33 +02:00
lwm2m_rd_client.h net: lwm2m: support for LwM2M bootstrap 2019-01-31 23:02:56 -05:00
lwm2m_rw_json.c net: lwm2m: json: use plain text formatter for float32/64 2019-08-28 10:58:11 +02:00
lwm2m_rw_json.h net: lwm2m: remove lwm2m_engine_obj from most handlers/formatter OPs 2019-08-02 12:00:35 +03:00
lwm2m_rw_oma_tlv.c net: lwm2m: rework resource instance storage / access methods 2019-08-02 12:00:35 +03:00
lwm2m_rw_oma_tlv.h net: lwm2m: remove lwm2m_engine_obj from most handlers/formatter OPs 2019-08-02 12:00:35 +03:00
lwm2m_rw_plain_text.c net: lwm2m: fix printf warning 2019-09-23 22:29:12 +03:00
lwm2m_rw_plain_text.h net: lwm2m: plain text: expose put_float32/64 functions 2019-08-28 10:58:11 +02:00
lwm2m_util.c net: lwm2m: tlv: fix float32/64 sign handling 2019-08-28 10:58:11 +02:00
lwm2m_util.h net: lwm2m: fix float32/64 handling 2019-02-12 21:19:49 -05:00