All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro@nvidia.com>
To: kbuild-all@lists.01.org
Subject: Re: [leon-rdma:rdma-next 58/59] drivers/infiniband/core/uverbs_cmd.c:820:6: warning: variable 'new_mr' is used uninitialized whenever 'if' condition is true
Date: Thu, 05 Nov 2020 10:22:23 +0200	[thread overview]
Message-ID: <20201105082223.GO5429@unreal> (raw)
In-Reply-To: <202011050034.V5X38pwZ-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2079 bytes --]

On Thu, Nov 05, 2020 at 12:33:39AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
> head:   e0a81838e0d3c558bfd2776fd6630470c4bdee0e
> commit: ce258f66e947591682a30f874692a72381dbfaf0 [58/59] RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr
> config: x86_64-randconfig-a003-20201104 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a6d15d40701ad38f29e4ff93703b3ffa7b204611)
> 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 x86_64 cross compiling tool for clang build
>         # apt-get install binutils-x86-64-linux-gnu
>         # https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?id=ce258f66e947591682a30f874692a72381dbfaf0
>         git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
>         git fetch --no-tags leon-rdma rdma-next
>         git checkout ce258f66e947591682a30f874692a72381dbfaf0
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
>
> 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 >>):

Thanks

diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index bea1a1aeea22..cfdf89dd92b2 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -766,9 +766,9 @@ static int ib_uverbs_rereg_mr(struct uverbs_attr_bundle *attrs)
 	struct ib_mr                *mr;
 	int                          ret;
 	struct ib_uobject	    *uobj;
+	struct ib_mr *new_mr = NULL;
 	struct ib_uobject *new_uobj;
 	struct ib_device *ib_dev;
-	struct ib_mr *new_mr;

 	ret = uverbs_request(attrs, &cmd, sizeof(cmd));
 	if (ret)

      reply	other threads:[~2020-11-05  8:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 16:33 [leon-rdma:rdma-next 58/59] drivers/infiniband/core/uverbs_cmd.c:820:6: warning: variable 'new_mr' is used uninitialized whenever 'if' condition is true kernel test robot
2020-11-05  8:22 ` Leon Romanovsky [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=20201105082223.GO5429@unreal \
    --to=leonro@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.