RE: [PATCH v21 13/16] PCI: dwc: rcar-gen4: Add R-Car Gen4 PCIe controller support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi kerenl test robot,

> From: kernel test robot, Sent: Friday, September 22, 2023 10:47 PM
>
> Hi Yoshihiro,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on pci/next]
> [also build test WARNING on pci/for-linus linus/master v6.6-rc2 next-20230921]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
<snip URLs>]
>
> url:
...
> base:
...
next
> patch link:
...
> patch subject: [PATCH v21 13/16] PCI: dwc: rcar-gen4: Add R-Car Gen4 PCIe controller support
> config: sparc-allyesconfig
...
> compiler: sparc64-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build):
...
>
> 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@xxxxxxxxx>
> | Closes:
...
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/pci/controller/dwc/pcie-rcar-gen4.c:155:5: warning: no previous prototype for 'rcar_gen4_pcie_common_init'
> [-Wmissing-prototypes]
>      155 | int rcar_gen4_pcie_common_init(struct rcar_gen4_pcie *rcar)
>          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/pci/controller/dwc/pcie-rcar-gen4.c:197:6: warning: no previous prototype for 'rcar_gen4_pcie_common_deinit'
> [-Wmissing-prototypes]
>      197 | void rcar_gen4_pcie_common_deinit(struct rcar_gen4_pcie *rcar)
>          |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/pci/controller/dwc/pcie-rcar-gen4.c:205:5: warning: no previous prototype for 'rcar_gen4_pcie_prepare'
> [-Wmissing-prototypes]
>      205 | int rcar_gen4_pcie_prepare(struct rcar_gen4_pcie *rcar)
>          |     ^~~~~~~~~~~~~~~~~~~~~~
> >> drivers/pci/controller/dwc/pcie-rcar-gen4.c:220:6: warning: no previous prototype for 'rcar_gen4_pcie_unprepare'
> [-Wmissing-prototypes]
>      220 | void rcar_gen4_pcie_unprepare(struct rcar_gen4_pcie *rcar)
>          |      ^~~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/pci/controller/dwc/pcie-rcar-gen4.c:228:5: warning: no previous prototype for 'rcar_gen4_pcie_get_resources'
> [-Wmissing-prototypes]
>      228 | int rcar_gen4_pcie_get_resources(struct rcar_gen4_pcie *rcar)
>          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/pci/controller/dwc/pcie-rcar-gen4.c:242:24: warning: no previous prototype for 'rcar_gen4_pcie_devm_alloc'
> [-Wmissing-prototypes]
>      242 | struct rcar_gen4_pcie *rcar_gen4_pcie_devm_alloc(struct platform_device *pdev)
>          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~

Thank you for the review! I should have added "static" to each function.
I'll submit v22 patch series later.

Best regards,
Yoshihiro Shimoda

>
> vim +/rcar_gen4_pcie_common_init +155 drivers/pci/controller/dwc/pcie-rcar-gen4.c
>
>    154
>  > 155        int rcar_gen4_pcie_common_init(struct rcar_gen4_pcie *rcar)
>    156        {
>    157                struct dw_pcie *dw = &rcar->dw;
>    158                u32 val;
>    159                int ret;
>    160
>    161                ret = clk_bulk_prepare_enable(DW_PCIE_NUM_CORE_CLKS, dw->core_clks);
>    162                if (ret) {
>    163                        dev_err(dw->dev, "Failed to enable ref clocks\n");
>    164                        return ret;
>    165                }
>    166
>    167                if (!reset_control_status(dw->core_rsts[DW_PCIE_PWR_RST].rstc))
>    168                        reset_control_assert(dw->core_rsts[DW_PCIE_PWR_RST].rstc);
>    169
>    170                val = readl(rcar->base + PCIEMSR0);
>    171                if (rcar->mode == DW_PCIE_RC_TYPE) {
>    172                        val |= DEVICE_TYPE_RC;
>    173                } else if (rcar->mode == DW_PCIE_EP_TYPE) {
>    174                        val |= DEVICE_TYPE_EP;
>    175                } else {
>    176                        ret = -EINVAL;
>    177                        goto err_unprepare;
>    178                }
>    179
>    180                if (dw->num_lanes < 4)
>    181                        val |= BIFUR_MOD_SET_ON;
>    182
>    183                writel(val, rcar->base + PCIEMSR0);
>    184
>    185                ret = reset_control_deassert(dw->core_rsts[DW_PCIE_PWR_RST].rstc);
>    186                if (ret)
>    187                        goto err_unprepare;
>    188
>    189                return 0;
>    190
>    191        err_unprepare:
>    192                clk_bulk_disable_unprepare(DW_PCIE_NUM_CORE_CLKS, dw->core_clks);
>    193
>    194                return ret;
>    195        }
>    196
>  > 197        void rcar_gen4_pcie_common_deinit(struct rcar_gen4_pcie *rcar)
>    198        {
>    199                struct dw_pcie *dw = &rcar->dw;
>    200
>    201                reset_control_assert(dw->core_rsts[DW_PCIE_PWR_RST].rstc);
>    202                clk_bulk_disable_unprepare(DW_PCIE_NUM_CORE_CLKS, dw->core_clks);
>    203        }
>    204
>  > 205        int rcar_gen4_pcie_prepare(struct rcar_gen4_pcie *rcar)
>    206        {
>    207                struct device *dev = rcar->dw.dev;
>    208                int err;
>    209
>    210                pm_runtime_enable(dev);
>    211                err = pm_runtime_resume_and_get(dev);
>    212                if (err < 0) {
>    213                        dev_err(dev, "Failed to resume/get Runtime PM\n");
>    214                        pm_runtime_disable(dev);
>    215                }
>    216
>    217                return err;
>    218        }
>    219
>  > 220        void rcar_gen4_pcie_unprepare(struct rcar_gen4_pcie *rcar)
>    221        {
>    222                struct device *dev = rcar->dw.dev;
>    223
>    224                pm_runtime_put(dev);
>    225                pm_runtime_disable(dev);
>    226        }
>    227
>  > 228        int rcar_gen4_pcie_get_resources(struct rcar_gen4_pcie *rcar)
>    229        {
>    230                /* Renesas-specific registers */
>    231                rcar->base = devm_platform_ioremap_resource_byname(rcar->pdev, "app");
>    232
>    233                return PTR_ERR_OR_ZERO(rcar->base);
>    234        }
>    235
>    236        static const struct dw_pcie_ops dw_pcie_ops = {
>    237                .start_link = rcar_gen4_pcie_start_link,
>    238                .stop_link = rcar_gen4_pcie_stop_link,
>    239                .link_up = rcar_gen4_pcie_link_up,
>    240        };
>    241
>  > 242        struct rcar_gen4_pcie *rcar_gen4_pcie_devm_alloc(struct platform_device *pdev)
>    243        {
>    244                struct device *dev = &pdev->dev;
>    245                struct rcar_gen4_pcie *rcar;
>    246
>    247                rcar = devm_kzalloc(dev, sizeof(*rcar), GFP_KERNEL);
>    248                if (!rcar)
>    249                        return ERR_PTR(-ENOMEM);
>    250
>    251                rcar->dw.ops = &dw_pcie_ops;
>    252                rcar->dw.dev = dev;
>    253                rcar->pdev = pdev;
>    254                dw_pcie_cap_set(&rcar->dw, EDMA_UNROLL);
>    255                dw_pcie_cap_set(&rcar->dw, REQ_RES);
>    256                platform_set_drvdata(pdev, rcar);
>    257
>    258                return rcar;
>    259        }
>    260
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
> %7Cyoshihiro.shimoda.uh%40renesas.com%7Cbcb9117ada5545f21dd908dbbb7279cf%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%
> 7C638309872567098849%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30
> 00%7C%7C%7C&sdata=hZzw8jndtIs8RuMO9fvilRhybUCLFgA7gEyUSEdxZuI%3D&reserved=0




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux