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] [ath6kl:ath-next-test 38/45] drivers/net/wireless/ath/ath10k/htt_tx.c:505 ath10k_htt_tx() warn: potential pointer math issue ('skb_cb-htt.txbuf' is a 352 bit pointer)
TO: Michal Kazior michal.kaz...@tieto.com Hi Michal, FYI, there are new smatch warnings show up in tree: git://github.com/kvalo/ath ath-next-test head: 4e53f6a3f1aac1a4a2d18f487f6e570b9402adc7 commit: 20b784ea3fb89de48c794cd889104aba64242f3b [38/45] [RFC/RFT 4/7] ath10k: bypass htc for htt tx path :: branch date: 2 hours ago :: commit date: 2 days ago drivers/net/wireless/ath/ath10k/htt_tx.c:505 ath10k_htt_tx() warn: potential pointer math issue ('skb_cb-htt.txbuf' is a 352 bit pointer) git remote add ath6kl git://github.com/kvalo/ath git remote update ath6kl git checkout 20b784ea3fb89de48c794cd889104aba64242f3b vim +505 drivers/net/wireless/ath/ath10k/htt_tx.c 20b784ea Michal Kazior 2014-02-17 489 skb_cb-htt.txbuf-cmd_tx.flags0 = flags0; 20b784ea Michal Kazior 2014-02-17 490 skb_cb-htt.txbuf-cmd_tx.flags1 = __cpu_to_le16(flags1); 20b784ea Michal Kazior 2014-02-17 491 skb_cb-htt.txbuf-cmd_tx.len = __cpu_to_le16(msdu-len); 20b784ea Michal Kazior 2014-02-17 492 skb_cb-htt.txbuf-cmd_tx.id = __cpu_to_le16(msdu_id); 20b784ea Michal Kazior 2014-02-17 493 skb_cb-htt.txbuf-cmd_tx.frags_paddr = __cpu_to_le32(frags_paddr); 20b784ea Michal Kazior 2014-02-17 494 skb_cb-htt.txbuf-cmd_tx.peerid = __cpu_to_le32(HTT_INVALID_PEERID); 20b784ea Michal Kazior 2014-02-17 495 20b784ea Michal Kazior 2014-02-17 496 ath10k_dbg(ATH10K_DBG_HTT, 20b784ea Michal Kazior 2014-02-17 497 htt tx flags0 %hhu flags1 %hu len %d id %hu frags_paddr %08x, msdu_paddr %08x vdev %hhu tid %hhu\n, 20b784ea Michal Kazior 2014-02-17 498 flags0, flags1, msdu-len, msdu_id, frags_paddr, 20b784ea Michal Kazior 2014-02-17 499 (u32)skb_cb-paddr, vdev_id, tid); 20b784ea Michal Kazior 2014-02-17 500 ath10k_dbg_dump(ATH10K_DBG_HTT_DUMP, NULL, htt tx msdu: , 20b784ea Michal Kazior 2014-02-17 501 msdu-data, msdu-len); 5e3dd157 Kalle Valo2013-06-12 502 20b784ea Michal Kazior 2014-02-17 503 sg_items[0].transfer_id = 0; 20b784ea Michal Kazior 2014-02-17 504 sg_items[0].transfer_context = NULL; 20b784ea Michal Kazior 2014-02-17 @505 sg_items[0].vaddr = skb_cb-htt.txbuf + 20b784ea Michal Kazior 2014-02-17 506 sizeof(skb_cb-htt.txbuf-frags); 20b784ea Michal Kazior 2014-02-17 507 sg_items[0].paddr = skb_cb-htt.txbuf_paddr + 20b784ea Michal Kazior 2014-02-17 508 sizeof(skb_cb-htt.txbuf-frags); 20b784ea Michal Kazior 2014-02-17 509 sg_items[0].len = sizeof(skb_cb-htt.txbuf-htc_hdr) + 20b784ea Michal Kazior 2014-02-17 510 sizeof(skb_cb-htt.txbuf-cmd_hdr) + 20b784ea Michal Kazior 2014-02-17 511 sizeof(skb_cb-htt.txbuf-cmd_tx); 20b784ea Michal Kazior 2014-02-17 512 20b784ea Michal Kazior 2014-02-17 513 sg_items[1].transfer_id = 0; --- 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] [sound:topic/asoc-enum-fixes 59/102] sound/soc/codecs/wm8995.c:887:14: sparse: duplicate const
TO: Takashi Iwai ti...@suse.de Hi Takashi, FYI, there are new sparse warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/asoc-enum-fixes head: cd968dad05210af141503aa10b796bf325b0c144 commit: b67b9dcee6b29477b0b618269d1c413ea2074c78 [59/102] ASoC: wm8995: Use SOC_ENUM_SINGLE_DECL() reproduce: make C=1 CF=-D__CHECK_ENDIAN__ :: branch date: 7 hours ago :: commit date: 7 hours ago sound/soc/codecs/wm8995.c:887:14: sparse: duplicate const git remote add sound git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git git remote update sound git checkout b67b9dcee6b29477b0b618269d1c413ea2074c78 vim +887 sound/soc/codecs/wm8995.c 6a504a75 Dimitris Papastamos 2010-12-22 8711, 1, 0), 6a504a75 Dimitris Papastamos 2010-12-22 872SOC_DAPM_SINGLE(AIF1.1 Switch, WM8995_DAC2_RIGHT_MIXER_ROUTING, 6a504a75 Dimitris Papastamos 2010-12-22 8730, 1, 0), 6a504a75 Dimitris Papastamos 2010-12-22 874 }; 6a504a75 Dimitris Papastamos 2010-12-22 875 6a504a75 Dimitris Papastamos 2010-12-22 876 static const struct snd_kcontrol_new in1l_pga = 6a504a75 Dimitris Papastamos 2010-12-22 877SOC_DAPM_SINGLE(IN1L Switch, WM8995_POWER_MANAGEMENT_2, 5, 1, 0); 6a504a75 Dimitris Papastamos 2010-12-22 878 6a504a75 Dimitris Papastamos 2010-12-22 879 static const struct snd_kcontrol_new in1r_pga = 6a504a75 Dimitris Papastamos 2010-12-22 880SOC_DAPM_SINGLE(IN1R Switch, WM8995_POWER_MANAGEMENT_2, 4, 1, 0); 6a504a75 Dimitris Papastamos 2010-12-22 881 6a504a75 Dimitris Papastamos 2010-12-22 882 static const char *adc_mux_text[] = { 6a504a75 Dimitris Papastamos 2010-12-22 883ADC, 6a504a75 Dimitris Papastamos 2010-12-22 884DMIC, 6a504a75 Dimitris Papastamos 2010-12-22 885 }; 6a504a75 Dimitris Papastamos 2010-12-22 886 b67b9dce Takashi Iwai2014-02-18 @887 static const SOC_ENUM_SINGLE_DECL(adc_enum, 0, 0, adc_mux_text); 6a504a75 Dimitris Papastamos 2010-12-22 888 6a504a75 Dimitris Papastamos 2010-12-22 889 static const struct snd_kcontrol_new adcl_mux = 6a504a75 Dimitris Papastamos 2010-12-22 890SOC_DAPM_ENUM_VIRT(ADCL Mux, adc_enum); 6a504a75 Dimitris Papastamos 2010-12-22 891 6a504a75 Dimitris Papastamos 2010-12-22 892 static const struct snd_kcontrol_new adcr_mux = 6a504a75 Dimitris Papastamos 2010-12-22 893SOC_DAPM_ENUM_VIRT(ADCR Mux, adc_enum); 6a504a75 Dimitris Papastamos 2010-12-22 894 6a504a75 Dimitris Papastamos 2010-12-22 895 static const char *spk_src_text[] = { --- 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] [ath6kl:ath-next-test 38/45] drivers/net/wireless/ath/ath10k/htt_tx.c:505 ath10k_htt_tx() warn: potential pointer math issue ('skb_cb-htt.txbuf' is a 352 bit pointer)
Hi Michal, FYI, there are new smatch warnings show up in tree: git://github.com/kvalo/ath ath-next-test head: 4e53f6a3f1aac1a4a2d18f487f6e570b9402adc7 commit: 20b784ea3fb89de48c794cd889104aba64242f3b [38/45] [RFC/RFT 4/7] ath10k: bypass htc for htt tx path drivers/net/wireless/ath/ath10k/htt_tx.c:505 ath10k_htt_tx() warn: potential pointer math issue ('skb_cb-htt.txbuf' is a 352 bit pointer) git remote add ath6kl git://github.com/kvalo/ath git remote update ath6kl git checkout 20b784ea3fb89de48c794cd889104aba64242f3b vim +505 drivers/net/wireless/ath/ath10k/htt_tx.c 20b784ea Michal Kazior 2014-02-17 489 skb_cb-htt.txbuf-cmd_tx.flags0 = flags0; 20b784ea Michal Kazior 2014-02-17 490 skb_cb-htt.txbuf-cmd_tx.flags1 = __cpu_to_le16(flags1); 20b784ea Michal Kazior 2014-02-17 491 skb_cb-htt.txbuf-cmd_tx.len = __cpu_to_le16(msdu-len); 20b784ea Michal Kazior 2014-02-17 492 skb_cb-htt.txbuf-cmd_tx.id = __cpu_to_le16(msdu_id); 20b784ea Michal Kazior 2014-02-17 493 skb_cb-htt.txbuf-cmd_tx.frags_paddr = __cpu_to_le32(frags_paddr); 20b784ea Michal Kazior 2014-02-17 494 skb_cb-htt.txbuf-cmd_tx.peerid = __cpu_to_le32(HTT_INVALID_PEERID); 20b784ea Michal Kazior 2014-02-17 495 20b784ea Michal Kazior 2014-02-17 496 ath10k_dbg(ATH10K_DBG_HTT, 20b784ea Michal Kazior 2014-02-17 497 htt tx flags0 %hhu flags1 %hu len %d id %hu frags_paddr %08x, msdu_paddr %08x vdev %hhu tid %hhu\n, 20b784ea Michal Kazior 2014-02-17 498 flags0, flags1, msdu-len, msdu_id, frags_paddr, 20b784ea Michal Kazior 2014-02-17 499 (u32)skb_cb-paddr, vdev_id, tid); 20b784ea Michal Kazior 2014-02-17 500 ath10k_dbg_dump(ATH10K_DBG_HTT_DUMP, NULL, htt tx msdu: , 20b784ea Michal Kazior 2014-02-17 501 msdu-data, msdu-len); 5e3dd157 Kalle Valo2013-06-12 502 20b784ea Michal Kazior 2014-02-17 503 sg_items[0].transfer_id = 0; 20b784ea Michal Kazior 2014-02-17 504 sg_items[0].transfer_context = NULL; 20b784ea Michal Kazior 2014-02-17 @505 sg_items[0].vaddr = skb_cb-htt.txbuf + 20b784ea Michal Kazior 2014-02-17 506 sizeof(skb_cb-htt.txbuf-frags); 20b784ea Michal Kazior 2014-02-17 507 sg_items[0].paddr = skb_cb-htt.txbuf_paddr + 20b784ea Michal Kazior 2014-02-17 508 sizeof(skb_cb-htt.txbuf-frags); 20b784ea Michal Kazior 2014-02-17 509 sg_items[0].len = sizeof(skb_cb-htt.txbuf-htc_hdr) + 20b784ea Michal Kazior 2014-02-17 510 sizeof(skb_cb-htt.txbuf-cmd_hdr) + 20b784ea Michal Kazior 2014-02-17 511 sizeof(skb_cb-htt.txbuf-cmd_tx); 20b784ea Michal Kazior 2014-02-17 512 20b784ea Michal Kazior 2014-02-17 513 sg_items[1].transfer_id = 0; --- 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] [sound:topic/asoc-enum-fixes 59/102] sound/soc/codecs/wm8995.c:887:14: sparse: duplicate const
Hi Takashi, FYI, there are new sparse warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/asoc-enum-fixes head: cd968dad05210af141503aa10b796bf325b0c144 commit: b67b9dcee6b29477b0b618269d1c413ea2074c78 [59/102] ASoC: wm8995: Use SOC_ENUM_SINGLE_DECL() reproduce: make C=1 CF=-D__CHECK_ENDIAN__ sound/soc/codecs/wm8995.c:887:14: sparse: duplicate const git remote add sound git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git git remote update sound git checkout b67b9dcee6b29477b0b618269d1c413ea2074c78 vim +887 sound/soc/codecs/wm8995.c 6a504a75 Dimitris Papastamos 2010-12-22 8711, 1, 0), 6a504a75 Dimitris Papastamos 2010-12-22 872SOC_DAPM_SINGLE(AIF1.1 Switch, WM8995_DAC2_RIGHT_MIXER_ROUTING, 6a504a75 Dimitris Papastamos 2010-12-22 8730, 1, 0), 6a504a75 Dimitris Papastamos 2010-12-22 874 }; 6a504a75 Dimitris Papastamos 2010-12-22 875 6a504a75 Dimitris Papastamos 2010-12-22 876 static const struct snd_kcontrol_new in1l_pga = 6a504a75 Dimitris Papastamos 2010-12-22 877SOC_DAPM_SINGLE(IN1L Switch, WM8995_POWER_MANAGEMENT_2, 5, 1, 0); 6a504a75 Dimitris Papastamos 2010-12-22 878 6a504a75 Dimitris Papastamos 2010-12-22 879 static const struct snd_kcontrol_new in1r_pga = 6a504a75 Dimitris Papastamos 2010-12-22 880SOC_DAPM_SINGLE(IN1R Switch, WM8995_POWER_MANAGEMENT_2, 4, 1, 0); 6a504a75 Dimitris Papastamos 2010-12-22 881 6a504a75 Dimitris Papastamos 2010-12-22 882 static const char *adc_mux_text[] = { 6a504a75 Dimitris Papastamos 2010-12-22 883ADC, 6a504a75 Dimitris Papastamos 2010-12-22 884DMIC, 6a504a75 Dimitris Papastamos 2010-12-22 885 }; 6a504a75 Dimitris Papastamos 2010-12-22 886 b67b9dce Takashi Iwai2014-02-18 @887 static const SOC_ENUM_SINGLE_DECL(adc_enum, 0, 0, adc_mux_text); 6a504a75 Dimitris Papastamos 2010-12-22 888 6a504a75 Dimitris Papastamos 2010-12-22 889 static const struct snd_kcontrol_new adcl_mux = 6a504a75 Dimitris Papastamos 2010-12-22 890SOC_DAPM_ENUM_VIRT(ADCL Mux, adc_enum); 6a504a75 Dimitris Papastamos 2010-12-22 891 6a504a75 Dimitris Papastamos 2010-12-22 892 static const struct snd_kcontrol_new adcr_mux = 6a504a75 Dimitris Papastamos 2010-12-22 893SOC_DAPM_ENUM_VIRT(ADCR Mux, adc_enum); 6a504a75 Dimitris Papastamos 2010-12-22 894 6a504a75 Dimitris Papastamos 2010-12-22 895 static const char *spk_src_text[] = { --- 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 mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [target:rdma-dif 21/31] drivers/target/target_core_sbc.c:585 sbc_set_prot_op_checks() warn: missing break? reassigning 'cmd-prot_checks'
TO: Sagi Grimberg sa...@mellanox.com CC: Nicholas Bellinger n...@linux-iscsi.org Hi Sagi, FYI, there are new smatch warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git rdma-dif head: d6fde573f3945ea505afa8bdd962e3f29912190d commit: 395e9836ce88d45757f862779d630f6aacae4a31 [21/31] Target/sbc: Set protection operation and relevant checks :: branch date: 2 hours ago :: commit date: 2 hours ago drivers/target/target_core_sbc.c:585 sbc_set_prot_op_checks() warn: missing break? reassigning 'cmd-prot_checks' git remote add target git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git git remote update target git checkout 395e9836ce88d45757f862779d630f6aacae4a31 vim +585 drivers/target/target_core_sbc.c 68ff9b9b Nicholas Bellinger 2013-08-19 569 return TCM_NO_SENSE; 68ff9b9b Nicholas Bellinger 2013-08-19 570 } 68ff9b9b Nicholas Bellinger 2013-08-19 571 395e9836 Sagi Grimberg 2014-02-19 572 static int 395e9836 Sagi Grimberg 2014-02-19 573 sbc_set_prot_op_checks(u8 protect, enum target_prot_type prot_type, 395e9836 Sagi Grimberg 2014-02-19 574bool is_write, struct se_cmd *cmd) 395e9836 Sagi Grimberg 2014-02-19 575 { 395e9836 Sagi Grimberg 2014-02-19 576 if (is_write) { 395e9836 Sagi Grimberg 2014-02-19 577 cmd-prot_op = protect ? TARGET_PROT_DOUT_PASS : 395e9836 Sagi Grimberg 2014-02-19 578 TARGET_PROT_DOUT_INSERT; 395e9836 Sagi Grimberg 2014-02-19 579 switch (protect) { 395e9836 Sagi Grimberg 2014-02-19 580 case 0x0: 395e9836 Sagi Grimberg 2014-02-19 581 case 0x3: 395e9836 Sagi Grimberg 2014-02-19 582 cmd-prot_checks = 0; 395e9836 Sagi Grimberg 2014-02-19 583 case 0x1: 395e9836 Sagi Grimberg 2014-02-19 584 case 0x5: 395e9836 Sagi Grimberg 2014-02-19 @585 cmd-prot_checks = TARGET_DIF_CHECK_GUARD; 395e9836 Sagi Grimberg 2014-02-19 586 if (prot_type == TARGET_DIF_TYPE1_PROT) 395e9836 Sagi Grimberg 2014-02-19 587 cmd-prot_checks |= TARGET_DIF_CHECK_REFTAG; 395e9836 Sagi Grimberg 2014-02-19 588 break; 395e9836 Sagi Grimberg 2014-02-19 589 case 0x2: 395e9836 Sagi Grimberg 2014-02-19 590 if (prot_type == TARGET_DIF_TYPE1_PROT) 395e9836 Sagi Grimberg 2014-02-19 591 cmd-prot_checks = TARGET_DIF_CHECK_REFTAG; 395e9836 Sagi Grimberg 2014-02-19 592 break; 395e9836 Sagi Grimberg 2014-02-19 593 case 0x4: --- 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