From: kbuild test robot <lkp@intel.com>
To: "Bryant G. Ly" <bryantly@linux.vnet.ibm.com>
Cc: kbuild-all@01.org, benh@kernel.crashing.org, mpe@ellerman.id.au,
gregkh@linuxfoundation.org, arnd@arndb.de, mikey@neuling.org,
rdunlap@infradead.org, tlfalcon@linux.vnet.ibm.com,
corbet@lwn.net, linus.walleij@linaro.org,
mrochs@linux.vnet.ibm.com, linux-doc@vger.kernel.org,
fbarrat@linux.vnet.ibm.com, adreznec@linux.vnet.ibm.com,
"Bryant G. Ly" <bryantly@linux.vnet.ibm.com>,
pombredanne@nexb.com, akpm@linux-foundation.org,
msuchanek@suse.de, linuxppc-dev@lists.ozlabs.org,
davem@davemloft.net, seroyer@linux.vnet.ibm.com
Subject: Re: [PATCH v1 1/1] misc: IBM Virtual Management Channel Driver
Date: Wed, 25 Apr 2018 20:00:15 +0800 [thread overview]
Message-ID: <201804251839.LqFDcYEY%fengguang.wu@intel.com> (raw)
In-Reply-To: <1524494812-60150-2-git-send-email-bryantly@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 3969 bytes --]
Hi Bryant,
I love your patch! Perhaps something to improve:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on v4.17-rc2 next-20180424]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Bryant-G-Ly/misc-IBM-Virtual-Management-Channel-Driver/20180424-060306
config: powerpc64-allyesconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc64
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers//misc/ibmvmc.c: In function 'ibmvmc_probe':
>> drivers//misc/ibmvmc.c:2133:5: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (rc == H_RESOURCE)
^
drivers//misc/ibmvmc.c:2111:6: note: 'rc' was declared here
int rc;
^~
vim +/rc +2133 drivers//misc/ibmvmc.c
2097
2098 /**
2099 * ibmvmc_init_crq_queue - Init CRQ Queue
2100 *
2101 * @adapter: crq_server_adapter struct
2102 *
2103 * Return:
2104 * 0 - Success
2105 * Non-zero - Failure
2106 */
2107 static int ibmvmc_init_crq_queue(struct crq_server_adapter *adapter)
2108 {
2109 struct vio_dev *vdev = to_vio_dev(adapter->dev);
2110 struct crq_queue *queue = &adapter->queue;
2111 int rc;
2112 int retrc;
2113
2114 queue->msgs = (struct ibmvmc_crq_msg *)get_zeroed_page(GFP_KERNEL);
2115
2116 if (!queue->msgs)
2117 goto malloc_failed;
2118
2119 queue->size = PAGE_SIZE / sizeof(*queue->msgs);
2120
2121 queue->msg_token = dma_map_single(adapter->dev, queue->msgs,
2122 queue->size * sizeof(*queue->msgs),
2123 DMA_BIDIRECTIONAL);
2124
2125 if (dma_mapping_error(adapter->dev, queue->msg_token))
2126 goto map_failed;
2127
2128 retrc = plpar_hcall_norets(H_REG_CRQ,
2129 vdev->unit_address,
2130 queue->msg_token, PAGE_SIZE);
2131 retrc = rc;
2132
> 2133 if (rc == H_RESOURCE)
2134 rc = ibmvmc_reset_crq_queue(adapter);
2135
2136 if (rc == 2) {
2137 dev_warn(adapter->dev, "Partner adapter not ready\n");
2138 retrc = 0;
2139 } else if (rc != 0) {
2140 dev_err(adapter->dev, "Error %d opening adapter\n", rc);
2141 goto reg_crq_failed;
2142 }
2143
2144 queue->cur = 0;
2145 spin_lock_init(&queue->lock);
2146
2147 tasklet_init(&adapter->work_task, ibmvmc_task, (unsigned long)adapter);
2148
2149 if (request_irq(vdev->irq,
2150 ibmvmc_handle_event,
2151 0, "ibmvmc", (void *)adapter) != 0) {
2152 dev_err(adapter->dev, "couldn't register irq 0x%x\n",
2153 vdev->irq);
2154 goto req_irq_failed;
2155 }
2156
2157 rc = vio_enable_interrupts(vdev);
2158 if (rc != 0) {
2159 dev_err(adapter->dev, "Error %d enabling interrupts!!!\n", rc);
2160 goto req_irq_failed;
2161 }
2162
2163 return retrc;
2164
2165 req_irq_failed:
2166 /* Cannot have any work since we either never got our IRQ registered,
2167 * or never got interrupts enabled
2168 */
2169 tasklet_kill(&adapter->work_task);
2170 h_free_crq(vdev->unit_address);
2171 reg_crq_failed:
2172 dma_unmap_single(adapter->dev,
2173 queue->msg_token,
2174 queue->size * sizeof(*queue->msgs), DMA_BIDIRECTIONAL);
2175 map_failed:
2176 free_page((unsigned long)queue->msgs);
2177 malloc_failed:
2178 return -ENOMEM;
2179 }
2180
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 56234 bytes --]
prev parent reply other threads:[~2018-04-25 12:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 14:46 [PATCH v1 0/1] misc: IBM Virtual Management Channel Driver Bryant G. Ly
2018-04-23 14:46 ` [PATCH v1 1/1] " Bryant G. Ly
2018-04-23 18:38 ` Randy Dunlap
2018-04-23 19:53 ` Greg KH
2018-04-23 21:06 ` Bryant G. Ly
2018-04-23 21:17 ` Randy Dunlap
2018-04-24 14:29 ` Greg KH
2018-04-24 15:21 ` Randy Dunlap
2018-04-25 8:29 ` Linus Walleij
2018-04-25 12:00 ` kbuild 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=201804251839.LqFDcYEY%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=adreznec@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=bryantly@linux.vnet.ibm.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=fbarrat@linux.vnet.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=mrochs@linux.vnet.ibm.com \
--cc=msuchanek@suse.de \
--cc=pombredanne@nexb.com \
--cc=rdunlap@infradead.org \
--cc=seroyer@linux.vnet.ibm.com \
--cc=tlfalcon@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).