From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6365DC43334 for ; Thu, 21 Jul 2022 02:10:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9ABB6B0074; Wed, 20 Jul 2022 22:10:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E4A0B6B0075; Wed, 20 Jul 2022 22:10:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D11158E0001; Wed, 20 Jul 2022 22:10:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BF9E06B0074 for ; Wed, 20 Jul 2022 22:10:11 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 95FC0AB0B4 for ; Thu, 21 Jul 2022 02:10:11 +0000 (UTC) X-FDA: 79709477022.04.0998831 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by imf10.hostedemail.com (Postfix) with ESMTP id 41D32C008B for ; Thu, 21 Jul 2022 02:10:11 +0000 (UTC) Received: by mail-pl1-f170.google.com with SMTP id y15so469006plp.10 for ; Wed, 20 Jul 2022 19:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q+yhNpMQkGS6Yd2NW8byn73RjKQp6M05xkM0h+dlv2A=; b=oI6p/pl8UsljvqbXas/blBvpIAMZZQmZN7tBPFi5TWkRXZCR+MjJcc2eF9bhrJO6+g 789meojm8wx+bFPFiCa3/5XyWSyPYM5ekXkv1SygKFtucA6khiTyE+4xq/SLX95gPXWJ KgJBvCNftxNS9JOLE9KgpuFHxvkPS3adgd91z4tjOZ1ZX8oskOYBJzV8zLAcegs2doUO OAXrEQK1LhlG1Vh176mFm3Zv0gPGhyIZ6G53H+Qjkq0+X0aSjlcDPPmhDYHfPA8W6pv3 UrFQTxq12/6Nmk8dHOx7V51eibBQeTshb8iIudnO51+HurxDaxQZL6h6LlxVWGs4sXOF l2XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q+yhNpMQkGS6Yd2NW8byn73RjKQp6M05xkM0h+dlv2A=; b=5dR0qz6UKZHyCgcTLxQt7tYNCU1l8D+Tj9/2h8g8MHzE29VqcGuIrAGekJwsoGIdwk g6Po89hdWzbT3UUB3FqdPlbj1s8H+qsqJba8ho4H1YziRK0ToCaNfeiLxx3ZCmyACVLk SYzhDShQy4XNVuLkqs88zFzEOw0o6Zys1LANU2we0M7pKJ/Ld4v5dP/k47P91Z1aVmhM dr/+bVuovmf7i1SPq404ZQqM5cpbpjarZwOOOpbiPOZQYkGEhe5984fJIslvts70/StU liojVmeGwu2R6ce6vnAUOh5omftelyFnZXxXKbQ/TYTihfCMUEZbC/WvG2UhtRx7mvp6 5MRQ== X-Gm-Message-State: AJIora8U68t//qgfic0+VeM529jDxOrRtL+p6kMIq02OL1REzD1QgMcy iD1Tq5FG3xGkB16uhLUIlg+4zXLfjxwLsHCCO6Y= X-Google-Smtp-Source: AGRyM1us5A+QI/5yjTIs7GZ+Fibcy0BvdHO3bStp0vjnwVqspi54LF+nf5RFfgyPvHj5rHYmO+vzhYG4oUUlEIT7Hko= X-Received: by 2002:a17:90a:d3d8:b0:1f2:2cd:a1ca with SMTP id d24-20020a17090ad3d800b001f202cda1camr8851620pjw.135.1658369410178; Wed, 20 Jul 2022 19:10:10 -0700 (PDT) MIME-Version: 1.0 References: <202207150400.NMBYJFkA-lkp@intel.com> In-Reply-To: <202207150400.NMBYJFkA-lkp@intel.com> From: Souptick Joarder Date: Thu, 21 Jul 2022 07:39:58 +0530 Message-ID: Subject: Re: [linux-next:master 10618/10678] drivers/scsi/qla2xxx/qla_init.c:171:10: warning: variable 'bail' set but not used To: kernel test robot Cc: Quinn Tran , llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List , "Martin K. Petersen" , Himanshu Madhani , Nilesh Javali Content-Type: text/plain; charset="UTF-8" ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="oI6p/pl8"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf10.hostedemail.com: domain of jrdr.linux@gmail.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=jrdr.linux@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658369411; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=q+yhNpMQkGS6Yd2NW8byn73RjKQp6M05xkM0h+dlv2A=; b=iRIOnXw5wh6IcVdYgcHaDAmNyTJNLw9bVNERVZaVGrp8Whok+U/umI6obJJEXVJtVlQAja QQ3Zq9aj44y5JKZyhFEfstJWhRYGqCidvWJDH7vjaxL2RD25xSlfF2/Uqp6uAvzFP5O1gi E2fhsoj+mfXTNsEt+egpmbZb6qtfZzo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658369411; a=rsa-sha256; cv=none; b=sSrvI6VfyMNTTtvckO2Fnnk5y10An79bc+gj4vSFW7j7fBbv/qUgl+Fwwk/uBJXsBzK2uA EO+m2MfEpYw07vwWS62QcWtN0XuRhWHvVebIUKB6HK8fLsKgR3cJZ0ZPUuBGH2b55YYGSw wD1EoeZa/mgjYnWyP7mW/DGOvYAyKUM= X-Rspamd-Queue-Id: 41D32C008B Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="oI6p/pl8"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf10.hostedemail.com: domain of jrdr.linux@gmail.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=jrdr.linux@gmail.com X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: sh83o8kwbats6ibrc16713mzgaze8ixj X-HE-Tag: 1658369411-527729 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jul 15, 2022 at 1:38 AM kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 37b355fdaf31ee18bda9a93c2a438dc1cbf57ec9 > commit: c8c2a9053c4b28167c2a63e78d7949b775d238b6 [10618/10678] scsi: qla2xxx: Fix imbalance vha->vref_count > config: riscv-randconfig-r002-20220714 (https://download.01.org/0day-ci/archive/20220715/202207150400.NMBYJFkA-lkp@intel.com/config) > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e61b9c556267086ef9b743a0b57df302eef831b) > 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 riscv cross compiling tool for clang build > # apt-get install binutils-riscv64-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c8c2a9053c4b28167c2a63e78d7949b775d238b6 > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout c8c2a9053c4b28167c2a63e78d7949b775d238b6 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/scsi/qla2xxx/ > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > In file included from drivers/scsi/qla2xxx/qla_init.c:6: > In file included from drivers/scsi/qla2xxx/qla_def.h:14: > In file included from include/linux/pci.h:38: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:11: > In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/riscv/include/asm/io.h:136: > include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __raw_readb(PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' > #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) > ^ > In file included from drivers/scsi/qla2xxx/qla_init.c:6: > In file included from drivers/scsi/qla2xxx/qla_def.h:14: > In file included from include/linux/pci.h:38: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:11: > In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/riscv/include/asm/io.h:136: > include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' > #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) > ^ > In file included from drivers/scsi/qla2xxx/qla_init.c:6: > In file included from drivers/scsi/qla2xxx/qla_def.h:14: > In file included from include/linux/pci.h:38: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:11: > In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/riscv/include/asm/io.h:136: > include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writeb(value, PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; > ~~~~~~~~~~ ^ > >> drivers/scsi/qla2xxx/qla_init.c:171:10: warning: variable 'bail' set but not used [-Wunused-but-set-variable] > uint8_t bail; > ^ > drivers/scsi/qla2xxx/qla_init.c:2023:10: warning: variable 'bail' set but not used [-Wunused-but-set-variable] > uint8_t bail; > ^ > drivers/scsi/qla2xxx/qla_init.c:5533:7: warning: variable 'found_devs' set but not used [-Wunused-but-set-variable] > int found_devs; > ^ > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > error: A dwo section may not contain relocations > fatal error: too many errors emitted, stopping now [-ferror-limit=] > 10 warnings and 20 errors generated. > > Kconfig warnings: (for reference only) > WARNING: unmet direct dependencies detected for DRM_TTM > Depends on HAS_IOMEM && DRM && MMU > Selected by > - DRM_TTM_HELPER && HAS_IOMEM && DRM > - DRM_HISI_HIBMC && HAS_IOMEM && DRM && PCI && (ARM64 || COMPILE_TEST > > > vim +/bail +171 drivers/scsi/qla2xxx/qla_init.c > > 164 > 165 int qla24xx_async_abort_cmd(srb_t *cmd_sp, bool wait) > 166 { > 167 scsi_qla_host_t *vha = cmd_sp->vha; > 168 struct srb_iocb *abt_iocb; > 169 srb_t *sp; > 170 int rval = QLA_FUNCTION_FAILED; > > 171 uint8_t bail; > 172 > 173 /* ref: INIT for ABTS command */ > 174 sp = qla2xxx_get_qpair_sp(cmd_sp->vha, cmd_sp->qpair, cmd_sp->fcport, > 175 GFP_ATOMIC); > 176 if (!sp) > 177 return QLA_MEMORY_ALLOC_FAILED; > 178 > 179 QLA_VHA_MARK_BUSY(vha, bail); Looking into other 2 callers of QLA_VHA_MARK_BUSY(), this check is needed. Although I am not sure if returning NULL is appropriate or any other error value should be returned ? I will post a patch if this change is fine. + if (bail) + return NULL; > 180 abt_iocb = &sp->u.iocb_cmd; > 181 sp->type = SRB_ABT_CMD; > 182 sp->name = "abort"; > 183 sp->qpair = cmd_sp->qpair; > 184 sp->cmd_sp = cmd_sp; > 185 if (wait) > 186 sp->flags = SRB_WAKEUP_ON_COMP; > 187 > 188 init_completion(&abt_iocb->u.abt.comp); > 189 /* FW can send 2 x ABTS's timeout/20s */ > 190 qla2x00_init_async_sp(sp, 42, qla24xx_abort_sp_done); > 191 sp->u.iocb_cmd.timeout = qla24xx_abort_iocb_timeout; > 192 > 193 abt_iocb->u.abt.cmd_hndl = cmd_sp->handle; > 194 abt_iocb->u.abt.req_que_no = cpu_to_le16(cmd_sp->qpair->req->id); > 195 > 196 ql_dbg(ql_dbg_async, vha, 0x507c, > 197 "Abort command issued - hdl=%x, type=%x\n", cmd_sp->handle, > 198 cmd_sp->type); > 199 > 200 rval = qla2x00_start_sp(sp); > 201 if (rval != QLA_SUCCESS) { > 202 /* ref: INIT */ > 203 kref_put(&sp->cmd_kref, qla2x00_sp_release); > 204 return rval; > 205 } > 206 > 207 if (wait) { > 208 wait_for_completion(&abt_iocb->u.abt.comp); > 209 rval = abt_iocb->u.abt.comp_status == CS_COMPLETE ? > 210 QLA_SUCCESS : QLA_ERR_FROM_FW; > 211 /* ref: INIT */ > 212 kref_put(&sp->cmd_kref, qla2x00_sp_release); > 213 } > 214 > 215 return rval; > 216 } > 217 > > -- > 0-DAY CI Kernel Test Service > https://01.org/lkp >