[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201804272222.PkA9fncY%fengguang.wu@intel.com>
Date: Fri, 27 Apr 2018 23:07:13 +0800
From: kbuild test robot <lkp@...el.com>
To: Felix Manlunas <felix.manlunas@...ium.com>
Cc: kbuild-all@...org, davem@...emloft.net, netdev@...r.kernel.org,
raghu.vatsavayi@...ium.com, derek.chickles@...ium.com,
satananda.burla@...ium.com, felix.manlunas@...ium.com,
intiyaz.basha@...ium.com
Subject: Re: [PATCH net-next 6/6] liquidio: enhanced ethtool --set-channels
feature
Hi Intiyaz,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Felix-Manlunas/liquidio-enhanced-ethtool-set-channels-feature/20180427-195934
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:869:22: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] major @@ got short [unsigned] [usertype] major @@
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:869:22: expected unsigned short [unsigned] [usertype] major
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:869:22: got restricted __be16 [usertype] <noident>
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:870:22: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] minor @@ got short [unsigned] [usertype] minor @@
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:870:22: expected unsigned short [unsigned] [usertype] minor
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:870:22: got restricted __be16 [usertype] <noident>
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:871:22: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] micro @@ got short [unsigned] [usertype] micro @@
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:871:22: expected unsigned short [unsigned] [usertype] micro
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:871:22: got restricted __be16 [usertype] <noident>
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:840:5: sparse: symbol 'lio_23xx_reconfigure_queue_count' was not declared. Should it be static?
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1126:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1126:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1126:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1126:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1126:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1126:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1126:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1128:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1128:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1128:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1128:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1128:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1128:20: sparse: expression using sizeof(void)
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1128:20: sparse: expression using sizeof(void)
Please review and possibly fold the followup patch.
vim +869 drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
839
> 840 int lio_23xx_reconfigure_queue_count(struct lio *lio)
841 {
842 struct octeon_device *oct = lio->oct_dev;
843 struct liquidio_if_cfg_context *ctx;
844 u32 resp_size, ctx_size, data_size;
845 struct liquidio_if_cfg_resp *resp;
846 struct octeon_soft_command *sc;
847 union oct_nic_if_cfg if_cfg;
848 struct lio_version *vdata;
849 u32 ifidx_or_pfnum;
850 int retval;
851 int j;
852
853 resp_size = sizeof(struct liquidio_if_cfg_resp);
854 ctx_size = sizeof(struct liquidio_if_cfg_context);
855 data_size = sizeof(struct lio_version);
856 sc = (struct octeon_soft_command *)
857 octeon_alloc_soft_command(oct, data_size,
858 resp_size, ctx_size);
859 if (!sc) {
860 dev_err(&oct->pci_dev->dev, "%s: Failed to allocate soft command\n",
861 __func__);
862 return -1;
863 }
864
865 resp = (struct liquidio_if_cfg_resp *)sc->virtrptr;
866 ctx = (struct liquidio_if_cfg_context *)sc->ctxptr;
867 vdata = (struct lio_version *)sc->virtdptr;
868
> 869 vdata->major = cpu_to_be16(LIQUIDIO_BASE_MAJOR_VERSION);
> 870 vdata->minor = cpu_to_be16(LIQUIDIO_BASE_MINOR_VERSION);
> 871 vdata->micro = cpu_to_be16(LIQUIDIO_BASE_MICRO_VERSION);
872
873 ifidx_or_pfnum = oct->pf_num;
874 WRITE_ONCE(ctx->cond, 0);
875 ctx->octeon_id = lio_get_device_id(oct);
876 init_waitqueue_head(&ctx->wc);
877
878 if_cfg.u64 = 0;
879 if_cfg.s.num_iqueues = oct->sriov_info.num_pf_rings;
880 if_cfg.s.num_oqueues = oct->sriov_info.num_pf_rings;
881 if_cfg.s.base_queue = oct->sriov_info.pf_srn;
882 if_cfg.s.gmx_port_id = oct->pf_num;
883
884 sc->iq_no = 0;
885 octeon_prepare_soft_command(oct, sc, OPCODE_NIC,
886 OPCODE_NIC_QCOUNT_UPDATE, 0,
887 if_cfg.u64, 0);
888 sc->callback = lio_if_cfg_callback;
889 sc->callback_arg = sc;
890 sc->wait_time = LIO_IFCFG_WAIT_TIME;
891
892 retval = octeon_send_soft_command(oct, sc);
893 if (retval == IQ_SEND_FAILED) {
894 dev_err(&oct->pci_dev->dev,
895 "iq/oq config failed status: %x\n",
896 retval);
897 goto qcount_update_fail;
898 }
899
900 if (sleep_cond(&ctx->wc, &ctx->cond) == -EINTR) {
901 dev_err(&oct->pci_dev->dev, "Wait interrupted\n");
902 return -1;
903 }
904
905 retval = resp->status;
906 if (retval) {
907 dev_err(&oct->pci_dev->dev, "iq/oq config failed\n");
908 goto qcount_update_fail;
909 }
910
911 octeon_swap_8B_data((u64 *)(&resp->cfg_info),
912 (sizeof(struct liquidio_if_cfg_info)) >> 3);
913
914 lio->ifidx = ifidx_or_pfnum;
915 lio->linfo.num_rxpciq = hweight64(resp->cfg_info.iqmask);
916 lio->linfo.num_txpciq = hweight64(resp->cfg_info.iqmask);
917 for (j = 0; j < lio->linfo.num_rxpciq; j++) {
918 lio->linfo.rxpciq[j].u64 =
919 resp->cfg_info.linfo.rxpciq[j].u64;
920 }
921
922 for (j = 0; j < lio->linfo.num_txpciq; j++) {
923 lio->linfo.txpciq[j].u64 =
924 resp->cfg_info.linfo.txpciq[j].u64;
925 }
926
927 lio->linfo.hw_addr = resp->cfg_info.linfo.hw_addr;
928 lio->linfo.gmxport = resp->cfg_info.linfo.gmxport;
929 lio->linfo.link.u64 = resp->cfg_info.linfo.link.u64;
930 lio->txq = lio->linfo.txpciq[0].s.q_no;
931 lio->rxq = lio->linfo.rxpciq[0].s.q_no;
932
933 octeon_free_soft_command(oct, sc);
934 dev_info(&oct->pci_dev->dev, "Queue count updated to %d\n",
935 lio->linfo.num_rxpciq);
936
937 return 0;
938
939 qcount_update_fail:
940 octeon_free_soft_command(oct, sc);
941
942 return -1;
943 }
944
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Powered by blists - more mailing lists