All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>, oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 2/2] dmaengine: pxa: Enable compile test
Date: Sun, 30 Mar 2025 18:24:23 +0200	[thread overview]
Message-ID: <bfb4739a-abfc-424b-87a0-889316767810@kernel.org> (raw)
In-Reply-To: <171f0c41-b88e-4e27-8819-4195417136fa@stanley.mountain>

On 21/03/2025 15:57, Dan Carpenter wrote:
> [ Ancient email got eaten by msmtp. Resending.  -dan ]
> 
> Hi Krzysztof,
> 
> kernel test robot noticed the following build warnings:
> 
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Krzysztof-Kozlowski/dmaengine-pxa-Enable-compile-test/20250115-031547
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
> patch link:    https://lore.kernel.org/r/20250114191316.857154-1-krzysztof.kozlowski%40linaro.org
> patch subject: [PATCH v2 2/2] dmaengine: pxa: Enable compile test
> config: parisc-randconfig-r072-20250124 (https://download.01.org/0day-ci/archive/20250125/202501252153.wCMpgWlF-lkp@intel.com/config)
> compiler: hppa-linux-gcc (GCC) 14.2.0
> 
> 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@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202501252153.wCMpgWlF-lkp@intel.com/
> 
> New smatch warnings:
> drivers/dma/pxa_dma.c:595 clear_chan_irq() warn: variable dereferenced before check 'phy->vchan' (see line 593)
> 
> vim +595 drivers/dma/pxa_dma.c
> 
> a57e16cf03339c Robert Jarzmik 2015-05-25  584  static unsigned int clear_chan_irq(struct pxad_phy *phy)
> a57e16cf03339c Robert Jarzmik 2015-05-25  585  {
> a57e16cf03339c Robert Jarzmik 2015-05-25  586  	u32 dcsr;
> a57e16cf03339c Robert Jarzmik 2015-05-25  587  	u32 dint = readl(phy->base + DINT);
> a57e16cf03339c Robert Jarzmik 2015-05-25  588  
> a57e16cf03339c Robert Jarzmik 2015-05-25  589  	if (!(dint & BIT(phy->idx)))
> a57e16cf03339c Robert Jarzmik 2015-05-25  590  		return PXA_DCSR_RUN;
> a57e16cf03339c Robert Jarzmik 2015-05-25  591  
> a57e16cf03339c Robert Jarzmik 2015-05-25  592  	/* clear irq */
> a57e16cf03339c Robert Jarzmik 2015-05-25 @593  	dcsr = phy_readl_relaxed(phy, DCSR);
>                                                                          ^^^
> if phy->vchan is NULL this will crash


Correct, but my commit only enabled compile testing thus allowed this to
be checked on some popular platforms. Issue was already there.

The code is called pxad_chan_handler(), which already has BUG_ON() on
this, so I expect that condition is not possible.

It would be nice to rewrite the code, but I am afraid it is way too old
platform and no one cares enough.

Best regards,
Krzysztof

  reply	other threads:[~2025-03-30 16:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 19:10 [PATCH v2 1/2] dmaengine: Use str_enable_disable-like helpers Krzysztof Kozlowski
2025-01-14 19:13 ` [PATCH v2 2/2] dmaengine: pxa: Enable compile test Krzysztof Kozlowski
2025-03-21 14:57   ` Dan Carpenter
2025-03-30 16:24     ` Krzysztof Kozlowski [this message]
2025-01-18  9:51 ` [PATCH v2 1/2] dmaengine: Use str_enable_disable-like helpers Jernej Škrabec
2025-01-24  7:41 ` Manivannan Sadhasivam
2025-02-10 14:35 ` Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2025-01-25 13:55 [PATCH v2 2/2] dmaengine: pxa: Enable compile test kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bfb4739a-abfc-424b-87a0-889316767810@kernel.org \
    --to=krzk@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.