From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [intel-linux-intel-lts:5.4/yocto 4/4] drivers//platform/x86/intel_isi_mb.c:136:10: warning: no previous prototype for 'memcpy_s'
Date: Sat, 01 Aug 2020 06:05:25 +0800 [thread overview]
Message-ID: <202008010618.85D6ENTD%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3741 bytes --]
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: bb69a3235e529564e97bc62e31920eee5cfaeb9d
commit: bb69a3235e529564e97bc62e31920eee5cfaeb9d [4/4] ISI Mailbox driver for interacting with Intel Safety Island
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout bb69a3235e529564e97bc62e31920eee5cfaeb9d
# save the attached .config to linux build tree
make W=1 ARCH=i386
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//platform/x86/intel_isi_mb.c:136:10: warning: no previous prototype for 'memcpy_s' [-Wmissing-prototypes]
136 | uint32_t memcpy_s(void *destination, size_t dest_size, void *source,
| ^~~~~~~~
>> drivers//platform/x86/intel_isi_mb.c:403:13: warning: no previous prototype for 'isi_pci_dev_irq_handler' [-Wmissing-prototypes]
403 | irqreturn_t isi_pci_dev_irq_handler(int irq, void *ctx)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers//platform/x86/intel_isi_mb.c: In function 'isi_hw_send':
drivers//platform/x86/intel_isi_mb.c:445:24: warning: unused variable 'tlp_cnt' [-Wunused-variable]
445 | uint32_t doorbell_in, tlp_cnt;
| ^~~~~~~
drivers//platform/x86/intel_isi_mb.c:444:6: warning: unused variable 'len' [-Wunused-variable]
444 | int len = tx_size;
| ^~~
drivers//platform/x86/intel_isi_mb.c: In function 'sync_cmd_req_resp':
drivers//platform/x86/intel_isi_mb.c:852:33: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
852 | if ((sync_req->req_buffer_size >= 0U) &&
| ^~
drivers//platform/x86/intel_isi_mb.c: In function 'isi_dev_ioctl':
>> drivers//platform/x86/intel_isi_mb.c:1004:25: warning: variable 'pctx' set but not used [-Wunused-but-set-variable]
1004 | struct isi_driver_ctx *pctx;
| ^~~~
vim +/memcpy_s +136 drivers//platform/x86/intel_isi_mb.c
122
123 /*
124 * Function :
125 * memcpy_s
126 * Parameters :
127 * void *destination Pointer to destination buffer
128 * size_t dest_size Size of destination buffer
129 * const void *source Constant pointer to source buffer
130 * size_t count Size in bytes to be copied into the destination
131 * buffer.
132 * Return type : 0 - On Success -EINVAL - on Failure Description
133 * This function is local implementation of a library function memcpy_s to fix
134 * Klockwork issue.
135 */
> 136 uint32_t memcpy_s(void *destination, size_t dest_size, void *source,
137 size_t count)
138 {
139 uint32_t status;
140
141 char *src = (char *)source;
142 char *dest = (char *)destination;
143
144 /* Input check. */
145 if ((NULL != src) && (NULL != dest) && (dest_size > 0) && (count > 0) &&
146 (dest_size >= count) && (dest != src)) {
147 /* Overlap condition. */
148 if (((dest > src) && (dest < (src + count))) ||
149 ((src > dest) && (src < (dest + dest_size)))) {
150 status = -EINVAL;
151 } else {
152 memcpy(destination, source, count);
153 status = 0;
154 }
155 } else {
156 status = -EINVAL;
157 }
158
159 return status;
160 }
161
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 70297 bytes --]
reply other threads:[~2020-07-31 22:05 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=202008010618.85D6ENTD%lkp@intel.com \
--to=lkp@intel.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.