Re: [PATCH] staging: typec: tcpm: Consider port_type while determining unattached_state

From: kbuild test robot
Date: Fri Aug 11 2017 - 19:43:26 EST


Hi Badhri,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.13-rc4 next-20170811]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Badhri-Jagan-Sridharan/staging-typec-tcpm-Consider-port_type-while-determining-unattached_state/20170812-071822
config: i386-randconfig-x019-201732 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/wait.h:6,
from include/linux/completion.h:11,
from drivers/staging/typec/tcpm.c:17:
drivers/staging/typec/tcpm.c: In function 'unattached_state':
drivers/staging/typec/tcpm.c:2101:10: error: 'struct tcpm_port' has no member named 'port_type'
if (port->port_type == TYPEC_PORT_DRP) {
^
include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers/staging/typec/tcpm.c:2101:2: note: in expansion of macro 'if'
if (port->port_type == TYPEC_PORT_DRP) {
^~
drivers/staging/typec/tcpm.c:2101:10: error: 'struct tcpm_port' has no member named 'port_type'
if (port->port_type == TYPEC_PORT_DRP) {
^
include/linux/compiler.h:156:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers/staging/typec/tcpm.c:2101:2: note: in expansion of macro 'if'
if (port->port_type == TYPEC_PORT_DRP) {
^~
drivers/staging/typec/tcpm.c:2101:10: error: 'struct tcpm_port' has no member named 'port_type'
if (port->port_type == TYPEC_PORT_DRP) {
^
include/linux/compiler.h:167:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^~~~
>> drivers/staging/typec/tcpm.c:2101:2: note: in expansion of macro 'if'
if (port->port_type == TYPEC_PORT_DRP) {
^~
drivers/staging/typec/tcpm.c:2106:17: error: 'struct tcpm_port' has no member named 'port_type'
} else if (port->port_type == TYPEC_PORT_DFP) {
^
include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
drivers/staging/typec/tcpm.c:2106:9: note: in expansion of macro 'if'
} else if (port->port_type == TYPEC_PORT_DFP) {
^~
drivers/staging/typec/tcpm.c:2106:17: error: 'struct tcpm_port' has no member named 'port_type'
} else if (port->port_type == TYPEC_PORT_DFP) {
^
include/linux/compiler.h:156:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
drivers/staging/typec/tcpm.c:2106:9: note: in expansion of macro 'if'
} else if (port->port_type == TYPEC_PORT_DFP) {
^~
drivers/staging/typec/tcpm.c:2106:17: error: 'struct tcpm_port' has no member named 'port_type'
} else if (port->port_type == TYPEC_PORT_DFP) {
^
include/linux/compiler.h:167:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^~~~
drivers/staging/typec/tcpm.c:2106:9: note: in expansion of macro 'if'
} else if (port->port_type == TYPEC_PORT_DFP) {
^~
drivers/staging/typec/tcpm.c: At top level:
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:390:2: note: in expansion of macro 'if'
if (p_size == (size_t)-1 && q_size == (size_t)-1)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:380:2: note: in expansion of macro 'if'
if (p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:378:2: note: in expansion of macro 'if'
if (__builtin_constant_p(size) && p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:369:2: note: in expansion of macro 'if'
if (p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:367:2: note: in expansion of macro 'if'
if (__builtin_constant_p(size) && p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:358:2: note: in expansion of macro 'if'
if (p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:356:2: note: in expansion of macro 'if'
if (__builtin_constant_p(size) && p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:348:2: note: in expansion of macro 'if'

vim +/if +2101 drivers/staging/typec/tcpm.c

2098
2099 static inline enum tcpm_state unattached_state(struct tcpm_port *port)
2100 {
> 2101 if (port->port_type == TYPEC_PORT_DRP) {
2102 if (port->pwr_role == TYPEC_SOURCE)
2103 return SRC_UNATTACHED;
2104 else
2105 return SNK_UNATTACHED;
2106 } else if (port->port_type == TYPEC_PORT_DFP) {
2107 return SRC_UNATTACHED;
2108 } else {
2109 return SNK_UNATTACHED;
2110 }
2111 }
2112

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip