Re: [kbuild] [net-next:master 77/82] net/tipc/socket.c:1572 tipc_connect() warn: missing break? reassigning 'res'
Falls through intentionally, but there is no comment. regards, dan carpenter On Wed, Feb 19, 2014 at 07:31:53AM +0800, kbuild test robot wrote: TO: Ying Xue ying@windriver.com Hi Ying, FYI, there are new smatch warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: f7b12606b5de323a2bb5ca1696558efde8f25441 commit: 247f0f3c3176c55b46cb9a20011d3d6757634815 [77/82] tipc: align tipc function names with common naming practice in the network :: branch date: 16 minutes ago :: commit date: 60 minutes ago net/tipc/socket.c:1572 tipc_connect() warn: missing break? reassigning 'res' git remote add net-next git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git git remote update net-next git checkout 247f0f3c3176c55b46cb9a20011d3d6757634815 vim +/res +1572 net/tipc/socket.c 584d24b3 Ying Xue 2012-11-29 1556 * indicate send_msg() is never blocked. 584d24b3 Ying Xue 2012-11-29 1557 */ 584d24b3 Ying Xue 2012-11-29 1558if (!timeout) 584d24b3 Ying Xue 2012-11-29 1559m.msg_flags = MSG_DONTWAIT; 584d24b3 Ying Xue 2012-11-29 1560 247f0f3c Ying Xue 2014-02-18 1561res = tipc_sendmsg(NULL, sock, m, 0); 584d24b3 Ying Xue 2012-11-29 1562if ((res 0) (res != -EWOULDBLOCK)) 584d24b3 Ying Xue 2012-11-29 1563goto exit; 584d24b3 Ying Xue 2012-11-29 1564 584d24b3 Ying Xue 2012-11-29 1565/* Just entered SS_CONNECTING state; the only 584d24b3 Ying Xue 2012-11-29 1566 * difference is that return value in non-blocking 584d24b3 Ying Xue 2012-11-29 1567 * case is EINPROGRESS, rather than EALREADY. 584d24b3 Ying Xue 2012-11-29 1568 */ 584d24b3 Ying Xue 2012-11-29 1569res = -EINPROGRESS; 584d24b3 Ying Xue 2012-11-29 1570case SS_CONNECTING: 78eb3a53 Ying Xue 2014-01-17 1571if (previous == SS_CONNECTING) 78eb3a53 Ying Xue 2014-01-17 @1572res = -EALREADY; 78eb3a53 Ying Xue 2014-01-17 1573if (!timeout) 78eb3a53 Ying Xue 2014-01-17 1574goto exit; 78eb3a53 Ying Xue 2014-01-17 1575timeout = msecs_to_jiffies(timeout); 78eb3a53 Ying Xue 2014-01-17 1576/* Wait until an 'ACK' or 'RST' arrives, or a timeout occurs */ 78eb3a53 Ying Xue 2014-01-17 1577res = tipc_wait_for_connect(sock, timeout); 584d24b3 Ying Xue 2012-11-29 1578break; 584d24b3 Ying Xue 2012-11-29 1579case SS_CONNECTED: 584d24b3 Ying Xue 2012-11-29 1580res = -EISCONN; :: The code at line 1572 was first introduced by commit :: 78eb3a5379a52f291556483ea55b8a37e2ed4d5b tipc: standardize connect routine :: TO: Ying Xue ying@windriver.com :: CC: David S. Miller da...@davemloft.net --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [net-next:master 77/82] net/tipc/socket.c:1572 tipc_connect() warn: missing break? reassigning 'res'
TO: Ying Xue ying@windriver.com Hi Ying, FYI, there are new smatch warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: f7b12606b5de323a2bb5ca1696558efde8f25441 commit: 247f0f3c3176c55b46cb9a20011d3d6757634815 [77/82] tipc: align tipc function names with common naming practice in the network :: branch date: 16 minutes ago :: commit date: 60 minutes ago net/tipc/socket.c:1572 tipc_connect() warn: missing break? reassigning 'res' git remote add net-next git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git git remote update net-next git checkout 247f0f3c3176c55b46cb9a20011d3d6757634815 vim +/res +1572 net/tipc/socket.c 584d24b3 Ying Xue 2012-11-29 1556 * indicate send_msg() is never blocked. 584d24b3 Ying Xue 2012-11-29 1557 */ 584d24b3 Ying Xue 2012-11-29 1558 if (!timeout) 584d24b3 Ying Xue 2012-11-29 1559 m.msg_flags = MSG_DONTWAIT; 584d24b3 Ying Xue 2012-11-29 1560 247f0f3c Ying Xue 2014-02-18 1561 res = tipc_sendmsg(NULL, sock, m, 0); 584d24b3 Ying Xue 2012-11-29 1562 if ((res 0) (res != -EWOULDBLOCK)) 584d24b3 Ying Xue 2012-11-29 1563 goto exit; 584d24b3 Ying Xue 2012-11-29 1564 584d24b3 Ying Xue 2012-11-29 1565 /* Just entered SS_CONNECTING state; the only 584d24b3 Ying Xue 2012-11-29 1566 * difference is that return value in non-blocking 584d24b3 Ying Xue 2012-11-29 1567 * case is EINPROGRESS, rather than EALREADY. 584d24b3 Ying Xue 2012-11-29 1568 */ 584d24b3 Ying Xue 2012-11-29 1569 res = -EINPROGRESS; 584d24b3 Ying Xue 2012-11-29 1570 case SS_CONNECTING: 78eb3a53 Ying Xue 2014-01-17 1571 if (previous == SS_CONNECTING) 78eb3a53 Ying Xue 2014-01-17 @1572 res = -EALREADY; 78eb3a53 Ying Xue 2014-01-17 1573 if (!timeout) 78eb3a53 Ying Xue 2014-01-17 1574 goto exit; 78eb3a53 Ying Xue 2014-01-17 1575 timeout = msecs_to_jiffies(timeout); 78eb3a53 Ying Xue 2014-01-17 1576 /* Wait until an 'ACK' or 'RST' arrives, or a timeout occurs */ 78eb3a53 Ying Xue 2014-01-17 1577 res = tipc_wait_for_connect(sock, timeout); 584d24b3 Ying Xue 2012-11-29 1578 break; 584d24b3 Ying Xue 2012-11-29 1579 case SS_CONNECTED: 584d24b3 Ying Xue 2012-11-29 1580 res = -EISCONN; :: The code at line 1572 was first introduced by commit :: 78eb3a5379a52f291556483ea55b8a37e2ed4d5b tipc: standardize connect routine :: TO: Ying Xue ying@windriver.com :: CC: David S. Miller da...@davemloft.net --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild