lkml.org 
[lkml]   [2018]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: fsl-dpaa2/ethsw: Fix TCI values overwrite
Hi Razvan,

I love your patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on next-20180327]
[cannot apply to v4.16-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Razvan-Stefanescu/staging-fsl-dpaa2-ethsw-Fix-TCI-values-overwrite/20180328-154703
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All error/warnings (new ones prefixed by >>):

drivers/staging/fsl-dpaa2/ethsw/dpsw.c: In function 'dpsw_if_get_tci':
>> drivers/staging/fsl-dpaa2/ethsw/dpsw.c:547:9: error: variable 'cmd' has initializer but incomplete type
struct mc_command cmd = { 0 };
^~~~~~~~~~
>> drivers/staging/fsl-dpaa2/ethsw/dpsw.c:547:28: warning: excess elements in struct initializer
struct mc_command cmd = { 0 };
^
drivers/staging/fsl-dpaa2/ethsw/dpsw.c:547:28: note: (near initialization for 'cmd')
>> drivers/staging/fsl-dpaa2/ethsw/dpsw.c:547:20: error: storage size of 'cmd' isn't known
struct mc_command cmd = { 0 };
^~~
drivers/staging/fsl-dpaa2/ethsw/dpsw.c:547:20: warning: unused variable 'cmd' [-Wunused-variable]

vim +/cmd +547 drivers/staging/fsl-dpaa2/ethsw/dpsw.c

530
531 /**
532 * dpsw_if_get_tci() - Get default VLAN Tag Control Information (TCI)
533 * @mc_io: Pointer to MC portal's I/O object
534 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
535 * @token: Token of DPSW object
536 * @if_id: Interface Identifier
537 * @cfg: Tag Control Information Configuration
538 *
539 * Return: Completion status. '0' on Success; Error code otherwise.
540 */
541 int dpsw_if_get_tci(struct fsl_mc_io *mc_io,
542 u32 cmd_flags,
543 u16 token,
544 u16 if_id,
545 struct dpsw_tci_cfg *cfg)
546 {
> 547 struct mc_command cmd = { 0 };
548 struct dpsw_cmd_if_get_tci *cmd_params;
549 struct dpsw_rsp_if_get_tci *rsp_params;
550 int err;
551
552 /* prepare command */
553 cmd.header = mc_encode_cmd_header(DPSW_CMDID_IF_GET_TCI,
554 cmd_flags,
555 token);
556 cmd_params = (struct dpsw_cmd_if_get_tci *)cmd.params;
557 cmd_params->if_id = cpu_to_le16(if_id);
558
559 /* send command to mc*/
560 err = mc_send_command(mc_io, &cmd);
561 if (err)
562 return err;
563
564 /* retrieve response parameters */
565 rsp_params = (struct dpsw_rsp_if_get_tci *)cmd.params;
566 cfg->pcp = rsp_params->pcp;
567 cfg->dei = rsp_params->dei;
568 cfg->vlan_id = le16_to_cpu(rsp_params->vlan_id);
569
570 return 0;
571 }
572

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-03-28 12:18    [W:0.077 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site