* [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'
@ 2020-07-31 22:05 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-31 22:05 UTC (permalink / raw)
To: kbuild-all
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-31 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 22:05 [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' kernel test robot
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.