Re: [scsi] WARNING: at fs/sysfs/dir.c:530 sysfs_add_one()
On Wed, Jun 12, 2013 at 07:34:43PM -0700, James Bottomley wrote: > On Thu, 2013-06-13 at 09:30 +0800, Fengguang Wu wrote: > > Greetings, > > > > I got the below dmesg and the first bad commit is > > > > commit a256ba092ec57213f96059d41ac5473ff92f5e7c > > Author: Nicholas Bellinger > > Date: Sat May 18 02:40:43 2013 -0700 > > > > scsi: Split scsi_dispatch_cmd into __scsi_dispatch_cmd setup > > > > Signed-off-by: Nicholas Bellinger > > You may be evaluating a bogus branch because no such commit has darkened > the SCSI list, so it obviously can't be on upstream track. Yeah, sorry I should probably not CC linux-scsi. The bug is still in a private tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git scsi-mq Thanks, Fengguang -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [scsi:for-next 11/19] drivers/scsi/ipr.c:8700:16: warning: array subscript is above array bounds
Hi Wendy, On Wed, Jan 02, 2013 at 07:05:47PM -0500, wenxi...@linux.vnet.ibm.com wrote: > Hi Fengguang, > > We built 32bit kernel for "current jejb for-next tree" on x86 > platform by using your config file. Seems We couldn't reproduce the > error in our environment. What options you use to make 32bit kernel? > We used: > > make ARCH=i386 V=1 -Wall. > > Also can you reproduce this with current jejb for-next tree in your > environment? Yes I can reproduce the warning at commit 7af0de314b738e26bf4d49a6f30d00ce56343107 as well as 7ff768a5feade4fa51f038d97b7eb9f72152b7c1. I'm running gcc 4.6.3 and 4.7.2, the reproduce command line is: make ARCH=i386 drivers/scsi/ipr.o Thanks, Fengguang > Quoting kbuild test robot : > > >tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next > >head: 7ff768a5feade4fa51f038d97b7eb9f72152b7c1 > >commit: 7af0de314b738e26bf4d49a6f30d00ce56343107 [11/19] [SCSI] > >ipr: Add support for MSI-X and distributed completion > >config: i386-randconfig-x243 (attached as .config) > > > >All warnings: > > > >drivers/scsi/ipr.c: In function 'ipr_probe': > >drivers/scsi/ipr.c:8700:16: warning: array subscript is above > >array bounds [-Warray-bounds] > > > >vim +8700 drivers/scsi/ipr.c > > > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8684 > > ioa_cfg->hrrq[i].min_cmd_id = > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8685 > > IPR_NUM_INTERNAL_CMD_BLKS + > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8686 > >(i - > >1) * entries_each_hrrq; > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8687 > > ioa_cfg->hrrq[i].max_cmd_id = > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8688 > > (IPR_NUM_INTERNAL_CMD_BLKS + > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8689 > >i * > >entries_each_hrrq - 1); > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8690 > >} > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8691} else { > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8692 > > entries_each_hrrq = IPR_NUM_CMD_BLKS; > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8693 > > ioa_cfg->hrrq[i].min_cmd_id = 0; > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8694 > > ioa_cfg->hrrq[i].max_cmd_id = (entries_each_hrrq - 1); > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8695} > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8696 > > ioa_cfg->hrrq[i].size = entries_each_hrrq; > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8697} > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8698 > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8699i = > >IPR_NUM_CMD_BLKS - > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 @8700 > > ioa_cfg->hrrq[ioa_cfg->hrrq_num - 1].max_cmd_id - 1; > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8701if (i > 0) { > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8702 > > ioa_cfg->hrrq[ioa_cfg->hrrq_num - 1].size += i; > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8703 > > ioa_cfg->hrrq[ioa_cfg->hrrq_num - 1].max_cmd_id += i; > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8704} > >7af0de31 wenxi...@linux.vnet.ibm.com 2012-12-03 8705 > >^1da177e Linus Torvalds 2005-04-16 8706for (i = > >0; i < IPR_NUM_CMD_BLKS; i++) { > >203fa3fe Kleber Sacilotto de Souza 2012-08-22 8707ipr_cmd > >= > >pci_pool_alloc(ioa_cfg->ipr_cmd_pool, GFP_KERNEL, &dma_addr); > >^1da177e Linus Torvalds 2005-04-16 8708 > > > >--- > >0-DAY kernel build testing backend Open Source Technology Center > >Fengguang Wu, Yuanhan Liu Intel Corporation > > -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [lkp] [PATCH 13/25] scsi: hisi_sas: add path from phyup irq to SAS framework
Hi Julian, Oops, this is awkward.. I'll check it, thank you for the reminder! Thanks, Fengguang On Tue, Oct 13, 2015 at 11:27:05AM +1100, Julian Calaby wrote: > Hi kbuild test robot people, > > On Tue, Oct 13, 2015 at 9:03 AM, kbuild test robot wrote: > > Hi John, > > > > [auto build test WARNING on scsi/for-next -- if it's inappropriate base, > > please suggest rules for selecting the more suitable base] > > > > url: > > https://github.com/0day-ci/linux/commits/John-Garry/HiSilicon-SAS-driver/20151012-231929 > > reproduce: > > # apt-get install sparse > > make ARCH=x86_64 allmodconfig > > make C=1 CF=-D__CHECK_ENDIAN__ > > > > > > sparse warnings: (new ones prefixed by >>) > > Your script seems to have lost the actual warnings here. > > > Please review and possibly fold the followup patch. > > Thanks, > > -- > Julian Calaby > > Email: julian.cal...@gmail.com > Profile: http://www.google.com/profiles/julian.calaby/ -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [kbuild-all] [RFC PATCH] phy: exynos-ufs: exynos_ufs_phy_calibrate() can be static
On Tue, Oct 13, 2015 at 05:08:58PM +0530, Alim Akhtar wrote: > HI > How I am support to handle this patch? Should I just fix these warnings in > my patch or I just add this as a separate patch on the top of the series? Alim, you can simply fold it into your patch. Thanks, Fengguang > On 10/01/2015 04:34 PM, kbuild test robot wrote: > > > >Signed-off-by: Fengguang Wu > >--- > > phy-exynos-ufs.c |6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > >diff --git a/drivers/phy/phy-exynos-ufs.c b/drivers/phy/phy-exynos-ufs.c > >index 343fcaf..835ee78 100644 > >--- a/drivers/phy/phy-exynos-ufs.c > >+++ b/drivers/phy/phy-exynos-ufs.c > >@@ -66,7 +66,7 @@ static bool match_cfg_to_pwr_mode(u8 desc, u8 required_pwr) > > return false; > > } > > > >-int exynos_ufs_phy_calibrate(struct phy *phy, enum phy_cfg_tag tag, u8 pwr) > >+static int exynos_ufs_phy_calibrate(struct phy *phy, enum phy_cfg_tag tag, > >u8 pwr) > > { > > struct exynos_ufs_phy *ufs_phy = get_exynos_ufs_phy(phy); > > struct exynos_ufs_phy_cfg **cfgs = ufs_phy->cfg; > >@@ -93,14 +93,14 @@ out: > > return 0; > > } > > > >-void exynos_ufs_phy_set_lane_cnt(struct phy *phy, u8 lane_cnt) > >+static void exynos_ufs_phy_set_lane_cnt(struct phy *phy, u8 lane_cnt) > > { > > struct exynos_ufs_phy *ufs_phy = get_exynos_ufs_phy(phy); > > > > ufs_phy->lane_cnt = lane_cnt; > > } > > > >-int exynos_ufs_phy_wait_for_lock_acq(struct phy *phy) > >+static int exynos_ufs_phy_wait_for_lock_acq(struct phy *phy) > > { > > struct exynos_ufs_phy *ufs_phy = get_exynos_ufs_phy(phy); > > const unsigned int timeout_us = 10; > > > ___ > kbuild-all mailing list > kbuild-...@lists.01.org > https://lists.01.org/mailman/listinfo/kbuild-all -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
drivers/scsi/ipr.c:8448:2-19: alloc with no test
Hi Brian, FYI, coccinelle warns about drivers/scsi/ipr.c:8448:2-19: alloc with no test, possible model on line 8457 vi +8448 drivers/scsi/ipr.c 8443 if (ioa_cfg->sis64) { 8444 ioa_cfg->target_ids = kzalloc(sizeof(unsigned long) * 8445 BITS_TO_LONGS(ioa_cfg->max_devs_supported), GFP_KERNEL); 8446 ioa_cfg->array_ids = kzalloc(sizeof(unsigned long) * 8447 BITS_TO_LONGS(ioa_cfg->max_devs_supported), GFP_KERNEL); > 8448 ioa_cfg->vset_ids = kzalloc(sizeof(unsigned long) * 8449 BITS_TO_LONGS(ioa_cfg->max_devs_supported), GFP_KERNEL); 8450 } 8451 Thanks, Fengguang -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] megaraid_sas: combine kmalloc+memset into kzalloc
Use kzalloc rather than kmalloc followed by memset with 0. Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Signed-off-by: Fengguang Wu --- drivers/scsi/megaraid/megaraid_sas_fusion.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) --- linux.orig/drivers/scsi/megaraid/megaraid_sas_fusion.c 2012-06-07 05:39:57.418846382 +0800 +++ linux/drivers/scsi/megaraid/megaraid_sas_fusion.c 2012-08-24 23:25:02.261560445 +0800 @@ -461,8 +461,8 @@ megasas_alloc_cmds_fusion(struct megasas * Allocate the dynamic array first and then allocate individual * commands. */ - fusion->cmd_list = kmalloc(sizeof(struct megasas_cmd_fusion *) - *max_cmd, GFP_KERNEL); + fusion->cmd_list = kzalloc(sizeof(struct megasas_cmd_fusion *) + * max_cmd, GFP_KERNEL); if (!fusion->cmd_list) { printk(KERN_DEBUG "megasas: out of memory. Could not alloc " @@ -470,9 +470,6 @@ megasas_alloc_cmds_fusion(struct megasas goto fail_cmd_list; } - memset(fusion->cmd_list, 0, sizeof(struct megasas_cmd_fusion *) - *max_cmd); - max_cmd = instance->max_fw_cmds; for (i = 0; i < max_cmd; i++) { fusion->cmd_list[i] = kmalloc(sizeof(struct megasas_cmd_fusion), -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[scsi:misc 49/55] drivers/scsi/mvumi.c:1880:3: error: implicit declaration of function 'virt_to_bus'
Hi Shun, FYI, kernel build failed on tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc head: e1daec5547bdb8a53b023852d578409005c69ea7 commit: 8b3fa849abc2b62920d7e4fc4f8e6ce3d0783623 [49/55] [SCSI] mvumi: Add support for Marvell SAS/SATA RAID-on-Chip(ROC) 88RC9580 config: powerpc-allmodconfig All related error/warning messages: drivers/scsi/mvumi.c: In function 'mvumi_send_command': drivers/scsi/mvumi.c:1880:3: error: implicit declaration of function 'virt_to_bus' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors vim +1880 drivers/scsi/mvumi.c 1875 frame_len = sizeof(*ib_frame) - 4 + 1876 ib_frame->sg_counts * sizeof(struct mvumi_sgl); 1877 if (mhba->hba_capability & HS_CAPABILITY_SUPPORT_DYN_SRC) { 1878 struct mvumi_dyn_list_entry *dle; 1879 dle = ib_entry; > 1880 dle->src_low_addr = virt_to_bus(ib_frame) & 0x; 1881 dle->src_high_addr = 1882 ((virt_to_bus(ib_frame) >> 16) >> 16) & 0x; 1883 dle->if_length = (frame_len >> 2) & 0xFFF; 1884 } else { 1885 memcpy(ib_entry, ib_frame, frame_len); --- 0-DAY kernel build testing backend Open Source Technology Centre Fengguang Wu, Yuanhan Liu Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[scsi:for-next 92/128] drivers/scsi/qla2xxx/qla_isr.c:1684:56: warning: 'rval' may be used uninitialized in this function
Hi Saurav, FYI, there are new compile warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next head: 71cfff4af0525891941199b142b759d00b293959 commit: 387fddaa3564503c9f82d091d2ebe390f3af62a1 [92/128] [SCSI] qla2xxx: Implementation of bidirectional. config: x86_64-allmodconfig All error/warnings: drivers/scsi/qla2xxx/qla_isr.c: In function 'qla2x00_status_entry': drivers/scsi/qla2xxx/qla_isr.c:1684:56: warning: 'rval' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/scsi/qla2xxx/qla_isr.c:1558:11: note: 'rval' was declared here It could be uninitialized due to the test in line 1598. vim +1684 drivers/scsi/qla2xxx/qla_isr.c 1596 switch (comp_status) { 1597 case CS_COMPLETE: > 1598 if (scsi_status == 0) { 1599 bsg_job->reply->reply_payload_rcv_len = 1600 bsg_job->reply_payload.payload_len; 1601 rval = EXT_STATUS_OK; 1602 } 1603 goto done; 1604 ... 1674 ql_dbg(ql_dbg_user, vha, 0x70bb, 1675 "Command completed with completion status=0x%x " 1676 "thread_id=%d\n", comp_status, thread_id); 1677 rval = EXT_STATUS_ERR; 1678 break; 1679 } 1680 bsg_job->reply->reply_payload_rcv_len = 0; 1681 1682 done: 1683 /* Return the vendor specific reply to API */ > 1684 bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] = rval; 1685 bsg_job->reply_len = sizeof(struct fc_bsg_reply); 1686 /* Always return DID_OK, bsg will send the vendor specific response 1687 * in this case only */ 1688 sp->done(vha, sp, (DID_OK << 6)); 1689 1690 } --- 0-DAY kernel build testing backend Open Source Technology Centre Fengguang Wu, Yuanhan Liu Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
bfa_ioc.c:3407 code aligned with following code on line 3409
Hi Krishna, According to these (old) coccinelle warnings, bfa_cb_sfp_state_query() has very weird indents and "if" blocks: drivers/scsi/bfa/bfa_ioc.c:3407:3-18: code aligned with following code on line 3409 drivers/scsi/bfa/bfa_ioc.c:3415:4-19: code aligned with following code on line 3417 3400 static void 3401 bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp) 3402 { 3403 bfa_trc(sfp, sfp->portspeed); 3404 if (sfp->media) { 3405 bfa_sfp_media_get(sfp); 3406 if (sfp->state_query_cbfn) > 3407 > sfp->state_query_cbfn(sfp->state_query_cbarg, 3408 sfp->status); 3409 sfp->media = NULL; 3410 } 3411 3412 if (sfp->portspeed) { 3413 sfp->status = bfa_sfp_speed_valid(sfp, sfp->portspeed); 3414 if (sfp->state_query_cbfn) 3415 sfp->state_query_cbfn(sfp->state_query_cbarg, 3416 sfp->status); > 3417 sfp->portspeed = > BFA_PORT_SPEED_UNKNOWN; 3418 } 3419 3420 sfp->state_query_lock = 0; 3421 sfp->state_query_cbfn = NULL; 3422 } The code was introduced by commit 51e569aa1f0c10bd71af05e76e4ba0e42c51e4ab Author: Krishna Gudipati Commit: James Bottomley CommitDate: Wed Jun 29 17:22:26 2011 -0500 [SCSI] bfa: Added support to obtain SFP info. Thanks, Fengguang -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [scsi:misc 36/36] drivers/scsi/csiostor/csio_attr.c:92:41: sparse: incorrect type in assignment (different base types)
Hi Naresh, On Fri, Nov 16, 2012 at 03:41:53PM +0530, Naresh Kumar Inna wrote: > On 11/15/2012 11:59 PM, kbuild test robot wrote: > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc > > head: 0779fa137a73170b6c796fdb476f1455ba67b9aa > > commit: 0779fa137a73170b6c796fdb476f1455ba67b9aa [36/36] [SCSI] csiostor: > > Chelsio FCoE offload driver > > > > > > sparse warnings: > > > > Thanks for your report. My pleasure! > My run of 'make C=2' to run sparse never reported these. Is there > someway I can run your tool locally so I can clean up my next set of > patches before sending them? This will enable more sparse type checks: make C=1 CF=-D__CHECK_ENDIAN__ > With respect to the warnings, will correct type-casting help me get rid > of most of them? As long as the type-casting is *correct* ;-) Thanks, Fengguang -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [kbuild-all] [target:master 1/2] drivers/target/target_core_transport.o: warning: objtool: __transport_wait_for_tasks()+0x22: function has unreachable instruction
Hi Nicholas, Sorry please ignore this one -- it looks like false warning from old gcc 4.4 and 4.6 -- we just enabled old compiler tests which triggered 10k these warnings.. Thanks, Fengguang On Tue, Jul 19, 2016 at 09:43:35PM +0800, kbuild test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master head: 39993fc9aebdf68a25134b140447b335a2418a76 commit: 15ce22fa491aa3bab7acd89ac40a9fc27aeed915 [1/2] target: Fix for hang of Ordered task in TCM config: x86_64-randconfig-a0-07191719 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: git checkout 15ce22fa491aa3bab7acd89ac40a9fc27aeed915 # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers/target/target_core_transport.o: warning: objtool: __transport_wait_for_tasks()+0x22: function has unreachable instruction --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ kbuild-all mailing list kbuild-...@lists.01.org https://lists.01.org/mailman/listinfo/kbuild-all -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html