- 18 Nov, 2016 40 commits
-
-
Allan Stephens authored
Makes the purpose and capabilities of the kernel event logger clearer, and leaves much of the low-level detail relating to use of the configuration options and APIs to the configuration option guide and API guide, respectively. Also corrects some bugs in the example code for retrieving event information. Also updates the API guide to make a clear distinction between the general purpose event logger framework and the kernel event logger (which is a specific instance of this framework). Change-Id: I924f65092b2b0e5050af13376b5da85a6cdc1a65 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
Prepares the kernel event logger APIs for inclusion in the API guide. Also corrects a couple of other issues: * Gets rid of obsolete thread monitor code. * Renames "timer_func" global variable to "_sys_k_timer_func" to align it with kernel naming conventions. Change-Id: I93d403f83ae44ff45dda489c2ead7bfec6ce1fa3 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
Event logger APIs still express timeout delays in ticks; need to convert to milliseconds when using unified kernel APIs. Change-Id: I5fab66be660621cd2029417eaff3758e3ef4ba2c Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Juan Manuel Cruz authored
If an i2c transaction fails the sample will hang the program into an infinite circle. This commit will remove the infinite circle and report back the error code from the i2c transaction. Change-Id: I38d350a805af6bec43f2fa8d4af6ce4e3cc27662 Coverity-CID: 151991 Coverity-CID: 151992 Signed-off-by:
Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
-
Juan Manuel Cruz authored
If the gpio or spi devices are not found there is no need to keep the device busy in a loop for this particular sample. Since it is not possible to continue execution it is better to simply end the application. Change-Id: Ie25ea970a479db2a2f339ca2b37f88541a45ef97 Coverity-CID: 151973 Signed-off-by:
Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
-
Vinicius Costa Gomes authored
When an option code or length representation is encoded in a 16-bit value, the access was wrong. Coverity-CID: 151963 Change-Id: Ie7741998cbde348ccf490a6686e68a1ace99920e Signed-off-by:
Vinicius Costa Gomes <vinicius.gomes@intel.com>
-
Anas Nashif authored
Enable this option to test any usage of structs and variables inside macros. Change-Id: I6ec64fb865e87fc0771ae10f0c4eb63f6144c88a Signed-off-by:
Anas Nashif <anas.nashif@intel.com>
-
Benjamin Walsh authored
When moving arch-specific thread structure to arch-agnostic, some field accesses were missed when used in K_DEBUG statements, which are turned off by default. Change-Id: Ife0f49b8185a0db468deab73555f7034f20ca3e8 Signed-off-by:
Benjamin Walsh <benjamin.walsh@windriver.com>
-
Benjamin Walsh authored
Prio should be an int, since values are small integers, not a fixed-size int32_t. It aligns with the prio parameters of the other APIs. Stack size should be size_t. Change-Id: Id29751b86c4ad7a7c2a7ffe446c2a96ae83c77bf Signed-off-by:
Benjamin Walsh <benjamin.walsh@windriver.com>
-
Inaky Perez-Gonzalez authored
The divide-by-zero test was using an uninitialized variable that Coverity was unhappy about. Simple fix to just initialize to any non zero value. Change-Id: I9e5865a99e7a8eb3ee52421cc3dcb6717dca1ad1 Coverity-ID: 152053 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Inaky Perez-Gonzalez authored
Coverity complained about the use of strncpy() to fill up a buffer of size N with a string of the same size didn't leave room for the final \0. This is a valid concern; however, the usage is valid too, as the writer intended to create a pattern that later can be tested--addind a \0 would break the pattern. So instead, use memcpy() for the same function. Change-Id: If52d02ce41731348f4a2d750c79f9e1c51f3afcf Coverity-ID: 151947 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Inaky Perez-Gonzalez authored
Coverity reported 150819 issue, which steams off Flex generated code from zconf.l in which sprintf() was use. Because of that, the conf_read_simple() @name parameter could be used to overrun zconf_open() @fullname by crafting SRCTREE and KCONFIG_ALLCONFIG environment variables. Change-Id: I2cff817dccafe0e06b35636bbb7be95e062410af Coverity-ID: 150819 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Inaky Perez-Gonzalez authored
Coverity complains about using an uninitialized variable; there is no reason to do so; thus fixed to avoid maintaining a whitelist. Change-Id: I657f9e7d46b1b9b091e36638c1951b93903fbec3 Coverity-ID: 152048 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Inaky Perez-Gonzalez authored
This is not a strictly necessary initialization, as the data is not used, but will keep Coverity happy. It being a testcase, there are no size or speed penalties to the overall kernel and avoids having to manage a whitelist for an issue in scanning tools. Change-Id: I0ddcf43ca1114356d58f93de57232864246ffe07 Coverity-ID: 152052 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Inaky Perez-Gonzalez authored
Coverity complained about the code using an uninitialized chunk of memory; harmless, but fixed to avoid having to whitelist. Change-Id: I5c890ff78fab2799b882b8e4a25c15476702d132 Coverity-ID: 152049 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Inaky Perez-Gonzalez authored
Coverity complains about an easy-to-fix uninitialized variable. Change-Id: I04bf670c7137df25165d4e37f2f7df2d4004c478 Coverity-ID: 152050 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Inaky Perez-Gonzalez authored
Coverity complains about this (harmless) issue, so simple fix. Change-Id: Ibac952157cb0541dbd150d681515280091409864 Coverity-ID: 152051 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Inaky Perez-Gonzalez authored
Fix usage of an uninitialized variable detected by Coverity. In theory GCC should pick up this situation, but it does not. I've experimented with adding -Wextra and -Wuninitialized but I cannot get GCC to complain. I might be missing something else, but in the meantime, this is a simple fix to remove this issue. Change-Id: I6fec37719719dfaf7077ce1f464605c93efa8ea2 Coverity-ID: 152054 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-
Anas Nashif authored
Change-Id: I6b3f07714322ad79aeec2342621a4cddfe84cb2c Signed-off-by:
Anas Nashif <anas.nashif@intel.com>
-
Paul Sokolovsky authored
Pinmux driver almost certainly should be initialized before the rest of hardware devices (which may need specific pins already configured for them), and usually after generic GPIO drivers. Thus, its priority should be between KERNEL_INIT_PRIORITY_DEFAULT (default 40) and KERNEL_INIT_PRIORITY_DEVICE (default 50). Thus, we set PINMUX_INIT_PRIORITY to 45. There are exceptions to the rule above for particular boards. For example, BOARD=galileo has GPIO and pinmuxer on I2C bus and thus overrides PINMUX_INIT_PRIORITY to be much higher. Note that while PINMUX_INIT_PRIORITY was defined previously (at 60), it was used only for galileo, which overrides it anyway. This fix was prompted by investigation why eth_ksdk driver was non-functional after kernel priorities re-hashing: both eth_ksdk and pinmux used the same priority, and eth_ksdk happened to run before pinmux. While bumping eth_ksdk priority would help in the particular case, the same would likely reoccur with other drivers like I2C, SPI, etc. Change-Id: Ie5ca3135c1ee2fe8d9cf48d5c12e62eac63487f7 Signed-off-by:
Paul Sokolovsky <paul.sokolovsky@linaro.org>
-
Inaky Perez-Gonzalez authored
By default, when a 'fatal fault' message is seen in the output of any testcase, it is consider an inmediate fatal condition and the test case is aborted. However, in all such cases, the testcase is provoking the situation to verify the condition is caught. In this case it shall NOT be considered a fatal fault and the default overriden to allow it to proceed. Change-Id: Id4e9138e5f0fcb8cd77efbb1831897fb0946ba20 Signed-off-by:
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> (cherry picked from commit da5f3a5c)
-
Allan Stephens authored
Change-Id: Ie989b45b19e5e70958301dd8d903cf2876709f5a Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
Also fixes up Kernel Primer examples to use these macros. Change-Id: Ib1bc9e3f85ab75f81986bc3930fb287266a886b5 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
Rewrites the example of a timer's expiry routine offloading processing that can't be done at interrupt level. The example now submits work to the system workqueue directly, rather than using an alert. This saves footprint by eliminating the need for alert-related API support that isn't needed. (This is a true savings, since the alert code just called the same workqueue APIs the example now calls directly.) Change-Id: I378e40aef33014f2c75c4f57531f75247d50e479 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
Change-Id: I82453c1fb5365d7dfe35cb1bc9eba50c71a47b17 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
Change-Id: I5ea1bd28f355d78c724948568c160ef1b32b5eb5 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
Return value descriptions using the "@retval" tag now reflect the fact that they appear on a separate line from the value they are describing. Change-Id: I3e3e347d133ad998e7db50a99369d41cbfb9efcc Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
The API guide now does a better job of explaining how to use a workqueue. Also hides information about workqueue internals and fixes several errors and omissions. Change-Id: I6492c1c6105c258ce98365ca33059d8f32c1be41 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
The API guide now does a better job of explaining how to correctly write these functions. Change-Id: Ib1df55eb28fa408f3f786f122353e37505002f07 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Allan Stephens authored
Also adds a link to function-type API that was missing. Change-Id: Ie671ad2f239cdca3ac1a2eb33248dfecfa251c79 Signed-off-by:
Allan Stephens <allan.stephens@windriver.com>
-
Baohong Liu authored
Proceed to LCD programming only if device binding succeeds. Otherwise, dereferencing a NULL pointer will happen. This was caught by Coverity. Coverity-CID: 151986 Change-Id: Ibdb658f530203428aa3e53f358e0788fc1502b06 Signed-off-by:
Baohong Liu <baohong.liu@intel.com>
-
Javier B Perez authored
Coverity detected some constant value in the vars, due to the exclusive config select in the code. Change-Id: Id27b658f3cd70dce626fef054457a9c726b3b957 CID: 151974, 151972 and 151971 Signed-off-by:
Javier B Perez <javier.b.perez.hernandez@intel.com>
-
Sergio Rodriguez authored
This fixes an always false evaluation of the gpio I/O direction This issue was reported by Coverity Coverity-CID: 151978 Change-Id: I93ec3319a3f18d564c961a5cbd9dcc9c60efbeb7 Signed-off-by:
Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
-
Sergio Rodriguez authored
The GPIO_INT_ACTIVE_LOW value is zero so the mask assignement is never executed. Using the bit complement GPIO_INT_ACTIVE_HIGH the proper mask is assigned This issue was reported by Coverity Coverity-CID: 151966 Change-Id: Ibc7d2e4c3ebee249b5ab9719f8177cc14c0d1d33 Signed-off-by:
Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
-
Sergio Rodriguez authored
The bitfield determining the I/O direction already defines the pin as either input or output, cannot be none or both at the same time This issue was reported by Coverity Coverity-CID: 151970 Change-Id: I18d5387139d6834004ba3269c5b54176bdc97ea7 Signed-off-by:
Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
-
Baohong Liu authored
Stop the app from running if device binding fails. Otherwise, dereferencing NULL pointer will happen. This was caught by Coverity. Coverity-CID: 151988 Change-Id: I8245d938498a51123249fbd069935900ad660314 Signed-off-by:
Baohong Liu <baohong.liu@intel.com>
-
Flavio Santes authored
This commit fixes an issue in the test_ccm_mode.c file: sizeof(data) is used to compute the length of the array pointed to by the 'uint8_t *data' pointer. At the same function scope, there is a variable (dlen) that already specifies the required length, so we use that variable instead of the 'sizeof' function call. This issue was not reported by Coverity, although is worth to fix it. Change-Id: I27cbf8c7000a4189a42d193f6445996d4b852aa6 Signed-off-by:
Flavio Santes <flavio.santes@intel.com>
-
Flavio Santes authored
This commit fixes the wrong sizeof argument error reported by Coverity. Coverity-CID: 152032 Change-Id: I2ee3089b4b840f4a1b8ba0303e92a3311c07ffeb Signed-off-by:
Flavio Santes <flavio.santes@intel.com>
-
Flavio Santes authored
This commit fixes the dead code issue reported by Coverity. Coverity-CID: 151977 Change-Id: Iaa31c032456f48e1af1d1c9d722f051ac5519ccf Signed-off-by:
Flavio Santes <flavio.santes@intel.com>
-
Flavio Santes authored
This commit fixes the dead code issue reported by Coverity. Coverity-CID: 151975 Change-Id: I449341d1f540abe149e8ad9197a64d52cd5722cd Signed-off-by:
Flavio Santes <flavio.santes@intel.com>
-