From: kernel test robot <lkp@intel.com>
To: Nilesh Javali <njavali@marvell.com>, martin.petersen@oracle.com
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-scsi@vger.kernel.org,
GR-QLogic-Storage-Upstream@marvell.com
Subject: Re: [PATCH 1/7] qla2xxx: Implementation to get and manage host, target stats and initiator port
Date: Tue, 29 Dec 2020 14:57:23 +0800 [thread overview]
Message-ID: <202012291415.zfMGIOLt-lkp@intel.com> (raw)
In-Reply-To: <20201223090422.16500-2-njavali@marvell.com>
[-- Attachment #1: Type: text/plain, Size: 5199 bytes --]
Hi Nilesh,
I love your patch! Perhaps something to improve:
[auto build test WARNING on be1b500212541a70006887bae558ff834d7365d0]
url: https://github.com/0day-ci/linux/commits/Nilesh-Javali/qla2xxx-driver-enhancements/20201223-171449
base: be1b500212541a70006887bae558ff834d7365d0
config: arm-randconfig-r003-20201229 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/91215cb3603060400922e6d25eebb732dc0e4e7a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nilesh-Javali/qla2xxx-driver-enhancements/20201223-171449
git checkout 91215cb3603060400922e6d25eebb732dc0e4e7a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/scsi/qla2xxx/qla_bsg.c:2657:3: warning: variable 'data' is uninitialized when used here [-Wuninitialized]
data->status = EXT_STATUS_BUFFER_TOO_SMALL;
^~~~
drivers/scsi/qla2xxx/qla_bsg.c:2627:36: note: initialize the variable 'data' to silence this warning
struct ql_vnd_tgt_stats_resp *data;
^
= NULL
1 warning generated.
vim +/data +2657 drivers/scsi/qla2xxx/qla_bsg.c
2617
2618 static int
2619 qla2x00_get_tgt_stats(struct bsg_job *bsg_job)
2620 {
2621 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job));
2622 struct fc_bsg_reply *bsg_reply = bsg_job->reply;
2623 struct ql_vnd_tgt_stats_param *req_data;
2624 u32 req_data_len;
2625 int ret = 0;
2626 u64 response_len = 0;
2627 struct ql_vnd_tgt_stats_resp *data;
2628 struct fc_rport *rport = NULL;
2629
2630 if (!vha->flags.online) {
2631 ql_log(ql_log_warn, vha, 0x0000, "Host is not online.\n");
2632 return -EIO;
2633 }
2634
2635 req_data_len = bsg_job->request_payload.payload_len;
2636
2637 if (req_data_len != sizeof(struct ql_vnd_stat_entry)) {
2638 ql_log(ql_log_warn, vha, 0x0000, "req_data_len invalid.\n");
2639 return -EIO;
2640 }
2641
2642 req_data = kzalloc(sizeof(*req_data), GFP_KERNEL);
2643 if (!req_data) {
2644 ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
2645 return -ENOMEM;
2646 }
2647
2648 /* Copy the request buffer in req_data */
2649 sg_copy_to_buffer(bsg_job->request_payload.sg_list,
2650 bsg_job->request_payload.sg_cnt,
2651 req_data, req_data_len);
2652
2653 response_len = sizeof(struct ql_vnd_tgt_stats_resp) +
2654 sizeof(struct ql_vnd_stat_entry);
2655
2656 if (response_len > bsg_job->reply_payload.payload_len) {
> 2657 data->status = EXT_STATUS_BUFFER_TOO_SMALL;
2658 bsg_reply->reply_data.vendor_reply.vendor_rsp[0] = EXT_STATUS_BUFFER_TOO_SMALL;
2659 bsg_job->reply_payload.payload_len = sizeof(struct ql_vnd_mng_host_stats_resp);
2660
2661 bsg_reply->reply_payload_rcv_len =
2662 sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
2663 bsg_job->reply_payload.sg_cnt, &data,
2664 sizeof(struct ql_vnd_tgt_stats_resp));
2665
2666 bsg_reply->result = DID_OK;
2667 bsg_job_done(bsg_job, bsg_reply->result,
2668 bsg_reply->reply_payload_rcv_len);
2669 goto tgt_stat_out;
2670 }
2671
2672 /* structure + size for one entry */
2673 data = kzalloc(response_len, GFP_KERNEL);
2674 if (!data) {
2675 kfree(req_data);
2676 return -ENOMEM;
2677 }
2678
2679 rport = qla2xxx_find_rport(vha, req_data->tgt_id);
2680 if (!rport) {
2681 ql_log(ql_log_warn, vha, 0x0000, "target %d not found.\n", req_data->tgt_id);
2682 ret = EXT_STATUS_INVALID_PARAM;
2683 data->status = EXT_STATUS_INVALID_PARAM;
2684 goto reply;
2685 }
2686
2687 ret = qla2xxx_get_tgt_stats(fc_bsg_to_shost(bsg_job), req_data->stat_type,
2688 rport, (void *)data, response_len);
2689
2690 bsg_reply->reply_data.vendor_reply.vendor_rsp[0] = EXT_STATUS_OK;
2691 reply:
2692 bsg_reply->reply_payload_rcv_len =
2693 sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
2694 bsg_job->reply_payload.sg_cnt, data,
2695 response_len);
2696 bsg_reply->result = DID_OK;
2697 bsg_job_done(bsg_job, bsg_reply->result,
2698 bsg_reply->reply_payload_rcv_len);
2699
2700 kfree(data);
2701 tgt_stat_out:
2702 kfree(req_data);
2703
2704 return ret;
2705 }
2706
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30171 bytes --]
next prev parent reply other threads:[~2020-12-29 6:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 9:04 [PATCH 0/7] qla2xxx driver enhancements Nilesh Javali
2020-12-23 9:04 ` [PATCH 1/7] qla2xxx: Implementation to get and manage host, target stats and initiator port Nilesh Javali
2020-12-29 6:57 ` kernel test robot [this message]
2020-12-23 9:04 ` [PATCH 2/7] qla2xxx: Add error counters to debugfs node Nilesh Javali
2020-12-23 9:04 ` [PATCH 3/7] qla2xxx: Move some messages from debug to normal log level Nilesh Javali
2020-12-23 9:04 ` [PATCH 4/7] qla2xxx: Wait for ABTS response on I/O timeouts for NVMe Nilesh Javali
2020-12-23 9:04 ` [PATCH 5/7] qla2xxx: Fix mailbox Ch erroneous error Nilesh Javali
2020-12-23 9:04 ` [PATCH 6/7] qla2xxx: Enable NVME CONF (BIT_7) when enabling SLER Nilesh Javali
2020-12-23 9:04 ` [PATCH 7/7] qla2xxx: Update version to 10.02.00.105-k Nilesh Javali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202012291415.zfMGIOLt-lkp@intel.com \
--to=lkp@intel.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=njavali@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox