mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jens Wiklander <jens.wiklander@linaro.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [jens-wiklander-tee:testing/tuxbuild 6/13] drivers/tee/tee_shm.c:52:17: warning: no previous prototype for 'shm_alloc_helper'
Date: Fri, 14 Jan 2022 15:15:50 +0800	[thread overview]
Message-ID: <202201141526.DF7opbkO-lkp@intel.com> (raw)

tree:   http://git.linaro.org/people/jens.wiklander/linux-tee testing/tuxbuild
head:   9ea0d125d4c9a4144b8641c454e97406b483722d
commit: b056eac4e504db8ee3fb03b4d13f1c9f2653bee8 [6/13] tee: replace tee_shm_alloc()
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220114/202201141526.DF7opbkO-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.2.0
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
        git remote add jens-wiklander-tee http://git.linaro.org/people/jens.wiklander/linux-tee
        git fetch --no-tags jens-wiklander-tee testing/tuxbuild
        git checkout b056eac4e504db8ee3fb03b4d13f1c9f2653bee8
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/tee/

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/tee/tee_shm.c:52:17: warning: no previous prototype for 'shm_alloc_helper' [-Wmissing-prototypes]
      52 | struct tee_shm *shm_alloc_helper(struct tee_context *ctx, size_t size,
         |                 ^~~~~~~~~~~~~~~~


vim +/shm_alloc_helper +52 drivers/tee/tee_shm.c

    51	
  > 52	struct tee_shm *shm_alloc_helper(struct tee_context *ctx, size_t size,
    53					 size_t align, u32 flags, int id)
    54	{
    55		struct tee_device *teedev = ctx->teedev;
    56		struct tee_shm *shm;
    57		void *ret;
    58		int rc;
    59	
    60		if (!tee_device_get(teedev))
    61			return ERR_PTR(-EINVAL);
    62	
    63		if (!teedev->pool) {
    64			/* teedev has been detached from driver */
    65			ret = ERR_PTR(-EINVAL);
    66			goto err_dev_put;
    67		}
    68	
    69		shm = kzalloc(sizeof(*shm), GFP_KERNEL);
    70		if (!shm) {
    71			ret = ERR_PTR(-ENOMEM);
    72			goto err_dev_put;
    73		}
    74	
    75		refcount_set(&shm->refcount, 1);
    76		shm->flags = flags;
    77		shm->id = id;
    78	
    79		/*
    80		 * We're assigning this as it is needed if the shm is to be
    81		 * registered. If this function returns OK then the caller expected
    82		 * to call teedev_ctx_get() or clear shm->ctx in case it's not
    83		 * needed any longer.
    84		 */
    85		shm->ctx = ctx;
    86	
    87		rc = teedev->pool->ops->alloc(teedev->pool, shm, size, align);
    88		if (rc) {
    89			ret = ERR_PTR(rc);
    90			goto err_kfree;
    91		}
    92	
    93		teedev_ctx_get(ctx);
    94		return shm;
    95	err_kfree:
    96		kfree(shm);
    97	err_dev_put:
    98		tee_device_put(teedev);
    99		return ret;
   100	}
   101	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

                 reply	other threads:[~2022-01-14  7:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202201141526.DF7opbkO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jens.wiklander@linaro.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome