Fix this compile-time warning:
rptun/rptun.c:956:22: warning: '%lx' directive output may be truncated writing between 1 and 16 bytes into a region of size 14 [-Wformat-truncation=]
956 | snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
| ^~~~~
rptun/rptun.c:956:25: note: format string is defined here
956 | snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
rptun/rptun.c:956:22: note: directive argument in the range [1, 18446744073709551615]
956 | snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
| ^~~~~
rptun/rptun.c:956:3: note: 'snprintf' output between 4 and 19 bytes into a destination of size 16
956 | snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
State of problem:
- Some drivers that do not support write operations (does not
have write handler or ioctl do not perform any write actions)
are registered with write permissions
- Some drivers that do not support read operation (does not
have read handler or ioctl do not perform any read actions)
are registered with read permissions
- Some drivers are registered with execute permissions
Solution:
- Iterate code where register_driver() is used and change 'mode'
parameter to reflect the actual read/write operations executed
by a driver
- Remove execute permissions from 'mode' parameter
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
For CEVA platform CHAR_BIT is 16, and will do lots of extra work
when use IPC.
We will not support this platform anymore, so remove all the b2c operations.
Signed-off-by: ligd <liguiding1@xiaomi.com>
to avoid blocking the main thread initialization process
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib8ab2a661ee9540bb03d9d4d851a8d8ee212404e
This reverts commit b9ace36fcc.
This change was added by PR 625 but has a serious logic flaw. It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:
else ifeq ($(WINTOOL),y)
DEFINE = "$(TOPDIR)/tools/define.sh"
INCDIR = "$(TOPDIR)/tools/incdir.sh" -w
This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined. As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
This commit does two things:
1. First, it reorganizes the driver Kconfig files so that each is self contained. Before, a part of the driver configuration was in drivers/Kconfig and the rest was in in drivers/xyz/Konfig. Now, all of the driver configuration is consolitated in the latter.
2. Second, this commit correct numerous serious errors introduced in a previous reorganization of the driver Kconfig files. This was first noted by Nicholas Chin in PR270 for the case of the drivers/i2c/Kconfig but some examination indicates that the error was introduced into several other Kconfig files as well.
The nature of the introduced error was basically this:
- Nothing must intervene between the menuconfig selection and the following conditional configuration otpions.
- A previous PR erroneously introduced unconditional options between the menuconfig and the following confditional logic, thus corrupting the driver menus.
This error was easy to make because the driver Kconfig files were not well modularized. Making them fully self-contained should eliminate this kind of error in the future.
This port was effort of a number of people, I rather arbitrarily gave authorship to Guiding Li because he has the largest number of fundamental quashed commits from the Xiamoi repository.
Squashed commit of the following:
Author: Xiang Xiao <xiaoxiang@pinecone.net>
include/nuttx/b2c.h and libx/libc/string: Add non-standard string functions to deal with cases where there are more than 8-bits in a type char.
Author: Gregory Nutt <gnutt@nuttx.org>
Fix several build issues/missing definitiona needed for OpenAMP build in drivers/.
Add OpenAMP code has been reviewed and ran through tools/nxstyle (with all reports accounted for).
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
tools/: Fix the minor issue in Makefile
Author: Gregory Nutt <gnutt@nuttx.org>
drivers/rptun/rptun.c: Review for coding standard. Run against tools/nxstyle.
tools/LibTargets.mk: Fix some TABs that were turned into spaces by a copy-paste.
fs/hostfs: Add configure and build support for hostfs RPC.
drivers/timer: Add configure and build support for syslog RTC.
drivers/syslog: Add configure and build support for syslog RPC.
drivers/serial: Add configure and build support for serial RPC.
Kconfig, tools/*.mk. openamp/: Add basic OpenAMP build support.
drivers/rptun: Add configure and build support for OpenAMP tunnel drivers.
drivers/net: Update Make.defs and Kconfig for OpenSDA support.
Remove drivers/clk/clk-rpmsg.c drivers/power/rpmsg_regulator.c. These depend on upstreaming support for a new subsystem based on the clk/regulator is model from Linux. Removed because we want to separate the activities. We will just try to get the basic OpenAMP support in place for now.
Remove drivers/misc/misc_rpmsg.c and include/nuttx/misc/misc_rpmsg.h. These are specific to the Xiaomi application.
Author: zhuyanlin <zhuyanlin@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.
Author: Jianli Dong <dongjianli@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.
Author: Guiding Li <liguiding@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.