oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: jasperwang@tencent.com, kaixuxia@tencent.com,
	frankjpliu@tencent.com, kasong@tencent.com,
	sagazchen@tencent.com, kernelxing@tencent.com,
	aurelianliu@tencent.com, jason.zeng@intel.com,
	wu.zheng@intel.com, yingbao.jia@intel.com, pei.p.jia@intel.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [opencloudos:next 6599/6620] drivers/crypto/ccp/hygon/tdm-dev.c:93:13: warning: variable 'ret' set but not used
Date: Wed, 15 May 2024 15:40:19 +0800	[thread overview]
Message-ID: <202405151512.NWtdOFHk-lkp@intel.com> (raw)

tree:   https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git next
head:   24bcde27d3b11d99cdceaa28d2ba6213e1678e90
commit: 0e593db3fec9ea1f08b5b2b37f7c0b7147086858 [6599/6620] newfeature: crypto: tdm: Add Hygon TDM driver
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240515/202405151512.NWtdOFHk-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240515/202405151512.NWtdOFHk-lkp@intel.com/reproduce)

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/202405151512.NWtdOFHk-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/crypto/ccp/hygon/tdm-dev.c: In function 'list_enqueue':
>> drivers/crypto/ccp/hygon/tdm-dev.c:93:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      93 |         int ret = 0;
         |             ^~~
   drivers/crypto/ccp/hygon/tdm-dev.c: In function 'psp_create_measure_task':
>> drivers/crypto/ccp/hygon/tdm-dev.c:605:27: warning: variable 'head' set but not used [-Wunused-but-set-variable]
     605 |         struct list_head *head = NULL;
         |                           ^~~~
   In file included from include/linux/string.h:294,
                    from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from arch/x86/include/asm/paravirt.h:17,
                    from arch/x86/include/asm/cpuid.h:62,
                    from arch/x86/include/asm/processor.h:19,
                    from arch/x86/include/asm/timex.h:5,
                    from include/linux/timex.h:67,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from drivers/crypto/ccp/hygon/tdm-dev.c:10:
   In function 'fortify_memcpy_chk',
       inlined from 'tdm_get_vpcr_audit' at drivers/crypto/ccp/hygon/tdm-dev.c:1362:2:
   include/linux/fortify-string.h:592:25: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning]
     592 |                         __read_overflow2_field(q_size_field, size);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/ret +93 drivers/crypto/ccp/hygon/tdm-dev.c

    90	
    91	static int list_enqueue(void *entry)
    92	{
  > 93		int ret = 0;
    94		struct list_head *head, *entry_list = NULL;
    95		rwlock_t *lock = NULL;
    96	
    97		if (!entry) {
    98			ret = -DYN_NULL_POINTER;
    99			pr_err("Null pointer\n");
   100			goto end;
   101		}
   102	
   103		head = &dyn_head.head;
   104		lock = &dyn_head.lock;
   105		entry_list = &(((struct tdm_task_ctx *)entry)->list);
   106	
   107		write_lock(lock);
   108		if (entry_list)
   109			list_add_tail(entry_list, head);
   110		write_unlock(lock);
   111	
   112	end:
   113		return 0;
   114	}
   115	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-05-15  7:40 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=202405151512.NWtdOFHk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aurelianliu@tencent.com \
    --cc=frankjpliu@tencent.com \
    --cc=jason.zeng@intel.com \
    --cc=jasperwang@tencent.com \
    --cc=kaixuxia@tencent.com \
    --cc=kasong@tencent.com \
    --cc=kernelxing@tencent.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pei.p.jia@intel.com \
    --cc=sagazchen@tencent.com \
    --cc=wu.zheng@intel.com \
    --cc=yingbao.jia@intel.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 read-only IMAP folder(s) and NNTP newsgroup(s).