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] [day] [month] [year] [list]
Date: Tue, 2 Jul 2024 12:18:45 +0800
From: kernel test robot <lkp@...el.com>
To: Piotr Wojtaszczyk <piotr.wojtaszczyk@...esys.com>,
	Vinod Koul <vkoul@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	"J.M.B. Downing" <jonathan.downing@...tel.com>,
	Vladimir Zapolskiy <vz@...ia.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Russell King <linux@...linux.org.uk>,
	Michael Turquette <mturquette@...libre.com>,
	Stephen Boyd <sboyd@...nel.org>, Andi Shyti <andi.shyti@...nel.org>,
	Miquel Raynal <miquel.raynal@...tlin.com>,
	Richard Weinberger <richard@....at>,
	Vignesh Raghavendra <vigneshr@...com>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
	Yangtao Li <frank.li@...o.com>, Arnd Bergmann <arnd@...db.de>,
	Li Zetao <lizetao1@...wei.com>, Chancel Liu <chancel.liu@....com>,
	Michael Ellerman <mpe@...erman.id.au>, dmaengine@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, alsa-devel@...a-project.org,
	linuxppc-dev@...ts.ozlabs.org, linux-sound@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev
Subject: Re: [Patch v4 06/10] dmaengine: Add dma router for pl08x in LPC32XX
 SoC

Hi Piotr,

kernel test robot noticed the following build warnings:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on robh/for-next linus/master v6.10-rc6]
[cannot apply to broonie-sound/for-next next-20240701]
[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
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Piotr-Wojtaszczyk/dt-bindings-dma-pl08x-Add-dma-cells-description/20240701-203615
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20240620175657.358273-7-piotr.wojtaszczyk%40timesys.com
patch subject: [Patch v4 06/10] dmaengine: Add dma router for pl08x in LPC32XX SoC
config: arm-allmodconfig
compiler: arm-linux-gnueabi-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407021100.XiZcQQ0k-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/dma/lpc32xx-dmamux.c: In function 'lpc32xx_dmamux_release':
>> drivers/dma/lpc32xx-dmamux.c:81:23: warning: unused variable 'flags' [-Wunused-variable]
      81 |         unsigned long flags;
         |                       ^~~~~
   drivers/dma/lpc32xx-dmamux.c: In function 'lpc32xx_dmamux_probe':
>> drivers/dma/lpc32xx-dmamux.c:157:13: warning: unused variable 'ret' [-Wunused-variable]
     157 |         int ret;
         |             ^~~


vim +/flags +81 drivers/dma/lpc32xx-dmamux.c

    76	
    77	static void lpc32xx_dmamux_release(struct device *dev, void *route_data)
    78	{
    79		struct lpc32xx_dmamux_data *dmamux = dev_get_drvdata(dev);
    80		struct lpc32xx_dmamux *mux = route_data;
  > 81		unsigned long flags;
    82	
    83		dev_dbg(dev, "releasing dma request signal %d routed to %s\n",
    84			mux->signal, mux->muxval ? mux->name_sel1 : mux->name_sel1);
    85	
    86		guard(spinlock)(&dmamux->lock);
    87	
    88		mux->busy = false;
    89	}
    90	
    91	static void *lpc32xx_dmamux_reserve(struct of_phandle_args *dma_spec,
    92					    struct of_dma *ofdma)
    93	{
    94		struct platform_device *pdev = of_find_device_by_node(ofdma->of_node);
    95		struct device *dev = &pdev->dev;
    96		struct lpc32xx_dmamux_data *dmamux = platform_get_drvdata(pdev);
    97		unsigned long flags;
    98		struct lpc32xx_dmamux *mux = NULL;
    99		int i;
   100	
   101		if (dma_spec->args_count != 3) {
   102			dev_err(&pdev->dev, "invalid number of dma mux args\n");
   103			return ERR_PTR(-EINVAL);
   104		}
   105	
   106		for (i = 0; i < ARRAY_SIZE(lpc32xx_muxes); i++) {
   107			if (lpc32xx_muxes[i].signal == dma_spec->args[0])
   108				mux = &lpc32xx_muxes[i];
   109		}
   110		if (!mux) {
   111			dev_err(&pdev->dev, "invalid mux request number: %d\n",
   112				dma_spec->args[0]);
   113			return ERR_PTR(-EINVAL);
   114		}
   115	
   116		if (dma_spec->args[2] > 1) {
   117			dev_err(&pdev->dev, "invalid dma mux value: %d\n",
   118				dma_spec->args[1]);
   119			return ERR_PTR(-EINVAL);
   120		}
   121	
   122		/* The of_node_put() will be done in the core for the node */
   123		dma_spec->np = of_parse_phandle(ofdma->of_node, "dma-masters", 0);
   124		if (!dma_spec->np) {
   125			dev_err(&pdev->dev, "can't get dma master\n");
   126			return ERR_PTR(-EINVAL);
   127		}
   128	
   129		spin_lock_irqsave(&dmamux->lock, flags);
   130		if (mux->busy) {
   131			spin_unlock_irqrestore(&dmamux->lock, flags);
   132			dev_err(dev, "dma request signal %d busy, routed to %s\n",
   133				mux->signal, mux->muxval ? mux->name_sel1 : mux->name_sel1);
   134			of_node_put(dma_spec->np);
   135			return ERR_PTR(-EBUSY);
   136		}
   137	
   138		mux->busy = true;
   139		mux->muxval = dma_spec->args[2] ? BIT(mux->bit) : 0;
   140	
   141		regmap_update_bits(dmamux->reg, mux->muxreg, BIT(mux->bit), mux->muxval);
   142		spin_unlock_irqrestore(&dmamux->lock, flags);
   143	
   144		dma_spec->args[2] = 0;
   145		dma_spec->args_count = 2;
   146	
   147		dev_dbg(dev, "dma request signal %d routed to %s\n",
   148			mux->signal, mux->muxval ? mux->name_sel1 : mux->name_sel1);
   149	
   150		return mux;
   151	}
   152	
   153	static int lpc32xx_dmamux_probe(struct platform_device *pdev)
   154	{
   155		struct device_node *np = pdev->dev.of_node;
   156		struct lpc32xx_dmamux_data *dmamux;
 > 157		int ret;
   158	
   159		dmamux = devm_kzalloc(&pdev->dev, sizeof(*dmamux), GFP_KERNEL);
   160		if (!dmamux)
   161			return -ENOMEM;
   162	
   163		dmamux->reg = syscon_node_to_regmap(np->parent);
   164		if (IS_ERR(dmamux->reg)) {
   165			dev_err(&pdev->dev, "syscon lookup failed\n");
   166			return PTR_ERR(dmamux->reg);
   167		}
   168	
   169		spin_lock_init(&dmamux->lock);
   170		platform_set_drvdata(pdev, dmamux);
   171		dmamux->dmarouter.dev = &pdev->dev;
   172		dmamux->dmarouter.route_free = lpc32xx_dmamux_release;
   173	
   174		return of_dma_router_register(np, lpc32xx_dmamux_reserve,
   175					      &dmamux->dmarouter);
   176	}
   177	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

View attachment "reproduce" of type "text/plain" (748 bytes)

View attachment "config" of type "text/plain" (383143 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ