From: kernel test robot <lkp@intel.com>
To: Sumit Kumar <sumit.kumar@oss.qualcomm.com>,
Manivannan Sadhasivam <mani@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>,
Akhil Vinod <akhil.vinod@oss.qualcomm.com>,
Subramanian Ananthanarayanan
<subramanian.ananthanarayanan@oss.qualcomm.com>,
linux-kernel@vger.kernel.org, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, quic_vpernami@quicinc.com,
Sumit Kumar <sumit.kumar@oss.qualcomm.com>
Subject: Re: [PATCH v2 3/3] bus: mhi: ep: Add loopback driver for data path testing
Date: Mon, 10 Nov 2025 06:40:17 +0800 [thread overview]
Message-ID: <202511100649.KfikwcaY-lkp@intel.com> (raw)
In-Reply-To: <20251104-loopback_mhi-v2-3-727a3fd9aa74@oss.qualcomm.com>
Hi Sumit,
kernel test robot noticed the following build warnings:
[auto build test WARNING on e6b9dce0aeeb91dfc0974ab87f02454e24566182]
url: https://github.com/intel-lab-lkp/linux/commits/Sumit-Kumar/bus-mhi-host-Add-loopback-driver-with-sysfs-interface/20251104-174320
base: e6b9dce0aeeb91dfc0974ab87f02454e24566182
patch link: https://lore.kernel.org/r/20251104-loopback_mhi-v2-3-727a3fd9aa74%40oss.qualcomm.com
patch subject: [PATCH v2 3/3] bus: mhi: ep: Add loopback driver for data path testing
config: csky-randconfig-r061-20251110 (https://download.01.org/0day-ci/archive/20251110/202511100649.KfikwcaY-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511100649.KfikwcaY-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/bus/mhi/ep/mhi_ep_loopback.c:80:2-7: WARNING: NULL check before some freeing functions is not needed.
--
>> drivers/bus/mhi/ep/mhi_ep_loopback.c:46:8-15: WARNING opportunity for kmemdup
vim +80 drivers/bus/mhi/ep/mhi_ep_loopback.c
37
38 static void mhi_ep_loopback_ul_callback(struct mhi_ep_device *mhi_dev,
39 struct mhi_result *mhi_res)
40 {
41 struct mhi_ep_loopback *mhi_ep_lb = dev_get_drvdata(&mhi_dev->dev);
42 struct mhi_ep_loopback_work *mhi_ep_lb_work;
43 void *buf;
44
45 if (!(mhi_res->transaction_status)) {
> 46 buf = kmalloc(mhi_res->bytes_xferd, GFP_KERNEL);
47 if (!buf) {
48 dev_err(&mhi_dev->dev, "Failed to allocate buffer\n");
49 return;
50 }
51
52 memcpy(buf, mhi_res->buf_addr, mhi_res->bytes_xferd);
53
54 mhi_ep_lb_work = kmalloc(sizeof(*mhi_ep_lb_work), GFP_KERNEL);
55 if (!mhi_ep_lb_work) {
56 dev_err(&mhi_dev->dev, "Unable to allocate the work structure\n");
57 kfree(buf);
58 return;
59 }
60
61 INIT_WORK(&mhi_ep_lb_work->work, mhi_ep_loopback_work_handler);
62 mhi_ep_lb_work->mdev = mhi_dev;
63 mhi_ep_lb_work->buf = buf;
64 mhi_ep_lb_work->len = mhi_res->bytes_xferd;
65
66 queue_work(mhi_ep_lb->loopback_wq, &mhi_ep_lb_work->work);
67 }
68 }
69
70 static void mhi_ep_loopback_dl_callback(struct mhi_ep_device *mhi_dev,
71 struct mhi_result *mhi_res)
72 {
73 void *buf;
74
75 if (mhi_res->transaction_status)
76 return;
77
78 buf = mhi_res->buf_addr;
79 if (buf)
> 80 kfree(buf);
81 }
82
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-11-09 22:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 5:39 [PATCH v2 0/3] bus: mhi: Add loopback driver Sumit Kumar
2025-11-04 5:39 ` [PATCH v2 1/3] bus: mhi: host: Add loopback driver with sysfs interface Sumit Kumar
2025-11-05 22:17 ` Bjorn Andersson
2025-11-07 12:28 ` Manivannan Sadhasivam
2025-11-10 4:00 ` Bjorn Andersson
2025-11-10 6:26 ` Manivannan Sadhasivam
2025-11-10 14:28 ` Bjorn Andersson
2025-11-04 5:39 ` [PATCH v2 2/3] bus: mhi: ep: Create mhi_ep_queue_buf API for raw buffer queuing Sumit Kumar
2025-11-05 22:20 ` Bjorn Andersson
2025-11-04 5:39 ` [PATCH v2 3/3] bus: mhi: ep: Add loopback driver for data path testing Sumit Kumar
2025-11-05 22:31 ` Bjorn Andersson
2025-11-09 22:40 ` kernel test robot [this message]
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=202511100649.KfikwcaY-lkp@intel.com \
--to=lkp@intel.com \
--cc=akhil.vinod@oss.qualcomm.com \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mhi@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_vpernami@quicinc.com \
--cc=subramanian.ananthanarayanan@oss.qualcomm.com \
--cc=sumit.kumar@oss.qualcomm.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