lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 14 Oct 2019 16:14:56 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Jon Hunter <jonathanh@...dia.com>
Cc:     kbuild-all@...ts.01.org, Jassi Brar <jassisinghbrar@...il.com>,
        Thierry Reding <thierry.reding@...il.com>,
        linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
        Jon Hunter <jonathanh@...dia.com>
Subject: Re: [PATCH] mailbox: tegra: Fix superfluous IRQ error message

Hi Jon,

I love your patch! Yet something to improve:

[auto build test ERROR on tegra/for-next]
[cannot apply to v5.4-rc3 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Jon-Hunter/mailbox-tegra-Fix-superfluous-IRQ-error-message/20191014-052329
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers//mailbox/tegra-hsp.c: In function 'tegra_hsp_probe':
>> drivers//mailbox/tegra-hsp.c:660:8: error: implicit declaration of function 'platform_get_irq_byname_optional'; did you mean 'platform_get_irq_optional'? [-Werror=implicit-function-declaration]
     err = platform_get_irq_byname_optional(pdev, "doorbell");
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           platform_get_irq_optional
   cc1: some warnings being treated as errors

vim +660 drivers//mailbox/tegra-hsp.c

   630	
   631	static int tegra_hsp_probe(struct platform_device *pdev)
   632	{
   633		struct tegra_hsp *hsp;
   634		struct resource *res;
   635		unsigned int i;
   636		u32 value;
   637		int err;
   638	
   639		hsp = devm_kzalloc(&pdev->dev, sizeof(*hsp), GFP_KERNEL);
   640		if (!hsp)
   641			return -ENOMEM;
   642	
   643		hsp->dev = &pdev->dev;
   644		hsp->soc = of_device_get_match_data(&pdev->dev);
   645		INIT_LIST_HEAD(&hsp->doorbells);
   646		spin_lock_init(&hsp->lock);
   647	
   648		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   649		hsp->regs = devm_ioremap_resource(&pdev->dev, res);
   650		if (IS_ERR(hsp->regs))
   651			return PTR_ERR(hsp->regs);
   652	
   653		value = tegra_hsp_readl(hsp, HSP_INT_DIMENSIONING);
   654		hsp->num_sm = (value >> HSP_nSM_SHIFT) & HSP_nINT_MASK;
   655		hsp->num_ss = (value >> HSP_nSS_SHIFT) & HSP_nINT_MASK;
   656		hsp->num_as = (value >> HSP_nAS_SHIFT) & HSP_nINT_MASK;
   657		hsp->num_db = (value >> HSP_nDB_SHIFT) & HSP_nINT_MASK;
   658		hsp->num_si = (value >> HSP_nSI_SHIFT) & HSP_nINT_MASK;
   659	
 > 660		err = platform_get_irq_byname_optional(pdev, "doorbell");
   661		if (err >= 0)
   662			hsp->doorbell_irq = err;
   663	
   664		if (hsp->num_si > 0) {
   665			unsigned int count = 0;
   666	
   667			hsp->shared_irqs = devm_kcalloc(&pdev->dev, hsp->num_si,
   668							sizeof(*hsp->shared_irqs),
   669							GFP_KERNEL);
   670			if (!hsp->shared_irqs)
   671				return -ENOMEM;
   672	
   673			for (i = 0; i < hsp->num_si; i++) {
   674				char *name;
   675	
   676				name = kasprintf(GFP_KERNEL, "shared%u", i);
   677				if (!name)
   678					return -ENOMEM;
   679	
   680				err = platform_get_irq_byname_optional(pdev, name);
   681				if (err >= 0) {
   682					hsp->shared_irqs[i] = err;
   683					count++;
   684				}
   685	
   686				kfree(name);
   687			}
   688	
   689			if (count == 0) {
   690				devm_kfree(&pdev->dev, hsp->shared_irqs);
   691				hsp->shared_irqs = NULL;
   692			}
   693		}
   694	
   695		/* setup the doorbell controller */
   696		hsp->mbox_db.of_xlate = tegra_hsp_db_xlate;
   697		hsp->mbox_db.num_chans = 32;
   698		hsp->mbox_db.dev = &pdev->dev;
   699		hsp->mbox_db.ops = &tegra_hsp_db_ops;
   700	
   701		hsp->mbox_db.chans = devm_kcalloc(&pdev->dev, hsp->mbox_db.num_chans,
   702						  sizeof(*hsp->mbox_db.chans),
   703						  GFP_KERNEL);
   704		if (!hsp->mbox_db.chans)
   705			return -ENOMEM;
   706	
   707		if (hsp->doorbell_irq) {
   708			err = tegra_hsp_add_doorbells(hsp);
   709			if (err < 0) {
   710				dev_err(&pdev->dev, "failed to add doorbells: %d\n",
   711				        err);
   712				return err;
   713			}
   714		}
   715	
   716		err = devm_mbox_controller_register(&pdev->dev, &hsp->mbox_db);
   717		if (err < 0) {
   718			dev_err(&pdev->dev, "failed to register doorbell mailbox: %d\n",
   719				err);
   720			return err;
   721		}
   722	
   723		/* setup the shared mailbox controller */
   724		hsp->mbox_sm.of_xlate = tegra_hsp_sm_xlate;
   725		hsp->mbox_sm.num_chans = hsp->num_sm;
   726		hsp->mbox_sm.dev = &pdev->dev;
   727		hsp->mbox_sm.ops = &tegra_hsp_sm_ops;
   728	
   729		hsp->mbox_sm.chans = devm_kcalloc(&pdev->dev, hsp->mbox_sm.num_chans,
   730						  sizeof(*hsp->mbox_sm.chans),
   731						  GFP_KERNEL);
   732		if (!hsp->mbox_sm.chans)
   733			return -ENOMEM;
   734	
   735		if (hsp->shared_irqs) {
   736			err = tegra_hsp_add_mailboxes(hsp, &pdev->dev);
   737			if (err < 0) {
   738				dev_err(&pdev->dev, "failed to add mailboxes: %d\n",
   739				        err);
   740				return err;
   741			}
   742		}
   743	
   744		err = devm_mbox_controller_register(&pdev->dev, &hsp->mbox_sm);
   745		if (err < 0) {
   746			dev_err(&pdev->dev, "failed to register shared mailbox: %d\n",
   747				err);
   748			return err;
   749		}
   750	
   751		platform_set_drvdata(pdev, hsp);
   752	
   753		if (hsp->doorbell_irq) {
   754			err = devm_request_irq(&pdev->dev, hsp->doorbell_irq,
   755					       tegra_hsp_doorbell_irq, IRQF_NO_SUSPEND,
   756					       dev_name(&pdev->dev), hsp);
   757			if (err < 0) {
   758				dev_err(&pdev->dev,
   759				        "failed to request doorbell IRQ#%u: %d\n",
   760					hsp->doorbell_irq, err);
   761				return err;
   762			}
   763		}
   764	
   765		if (hsp->shared_irqs) {
   766			err = tegra_hsp_request_shared_irq(hsp);
   767			if (err < 0)
   768				return err;
   769		}
   770	
   771		return 0;
   772	}
   773	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (71975 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ