All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [ambarus:spi-nor/next 1/15] drivers/spi/atmel-quadspi.c:1202 atmel_qspi_dma_init() warn: passing zero to 'PTR_ERR'
Date: Fri, 11 Feb 2022 16:37:00 +0300	[thread overview]
Message-ID: <20220211133700.GB1978@kadam> (raw)
In-Reply-To: <5f2ddbf7-381a-870e-e533-5261bbc9337b@microchip.com>

[-- Attachment #1: Type: text/plain, Size: 2976 bytes --]

On Fri, Feb 11, 2022 at 08:30:48AM +0000, Tudor.Ambarus(a)microchip.com wrote:
> On 2/11/22 10:04, Dan Carpenter wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > tree:   https://github.com/ambarus/linux-0day  spi-nor/next
> > head:   038b3fa2d89f1a00fdb8767704cdb799a0fe746b
> > commit: ff51c966a3c5144ae964797349747e680ee47c3a [1/15] spi: atmel-quadspi: Add support for sama7g5 QSPI
> > config: openrisc-randconfig-m031-20220210 (https://download.01.org/0day-ci/archive/20220211/202202110830.1OGwXRWt-lkp(a)intel.com/config )
> > compiler: or1k-linux-gcc (GCC) 11.2.0
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > smatch warnings:
> > drivers/spi/atmel-quadspi.c:1202 atmel_qspi_dma_init() warn: passing zero to 'PTR_ERR'
> > 
> > vim +/PTR_ERR +1202 drivers/spi/atmel-quadspi.c
> > 
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1194  static int atmel_qspi_dma_init(struct spi_controller *ctrl)
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1195  {
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1196     struct atmel_qspi *aq = spi_controller_get_devdata(ctrl);
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1197     int ret;
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1198
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1199     aq->rx_chan = dma_request_chan(&aq->pdev->dev, "rx");
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1200     if (IS_ERR(aq->rx_chan)) {
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1201             aq->rx_chan = NULL;
> > 
> > Need to preserve the error code before setting this to NULL
> > 
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19 @1202             return dev_err_probe(&aq->pdev->dev, PTR_ERR(aq->rx_chan),
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1203                                  "RX DMA channel is not available\n");
> > 
> > This will return success.
> > 
> 
> Indeed, thanks! This is a personal development branch, I'll fix it inline since
> the patch that adds support for this has not been integrated in mainline yet.
> I'm not sure if I have to add the Reported-by tags or how to give credit to
> a bug spotted on a patch that has not yet landed in mainline. Maybe by adding
> a comment in the comments section of the patch "---"?

This is an automated email from the kbuild-bot.  Feel free to ignore it
when you want to.  I just look it over and hit the forward button.

regards,
dan carpenter

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [ambarus:spi-nor/next 1/15] drivers/spi/atmel-quadspi.c:1202 atmel_qspi_dma_init() warn: passing zero to 'PTR_ERR'
Date: Fri, 11 Feb 2022 16:37:00 +0300	[thread overview]
Message-ID: <20220211133700.GB1978@kadam> (raw)
In-Reply-To: <5f2ddbf7-381a-870e-e533-5261bbc9337b@microchip.com>

[-- Attachment #1: Type: text/plain, Size: 2976 bytes --]

On Fri, Feb 11, 2022 at 08:30:48AM +0000, Tudor.Ambarus(a)microchip.com wrote:
> On 2/11/22 10:04, Dan Carpenter wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > tree:   https://github.com/ambarus/linux-0day  spi-nor/next
> > head:   038b3fa2d89f1a00fdb8767704cdb799a0fe746b
> > commit: ff51c966a3c5144ae964797349747e680ee47c3a [1/15] spi: atmel-quadspi: Add support for sama7g5 QSPI
> > config: openrisc-randconfig-m031-20220210 (https://download.01.org/0day-ci/archive/20220211/202202110830.1OGwXRWt-lkp(a)intel.com/config )
> > compiler: or1k-linux-gcc (GCC) 11.2.0
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > smatch warnings:
> > drivers/spi/atmel-quadspi.c:1202 atmel_qspi_dma_init() warn: passing zero to 'PTR_ERR'
> > 
> > vim +/PTR_ERR +1202 drivers/spi/atmel-quadspi.c
> > 
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1194  static int atmel_qspi_dma_init(struct spi_controller *ctrl)
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1195  {
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1196     struct atmel_qspi *aq = spi_controller_get_devdata(ctrl);
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1197     int ret;
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1198
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1199     aq->rx_chan = dma_request_chan(&aq->pdev->dev, "rx");
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1200     if (IS_ERR(aq->rx_chan)) {
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1201             aq->rx_chan = NULL;
> > 
> > Need to preserve the error code before setting this to NULL
> > 
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19 @1202             return dev_err_probe(&aq->pdev->dev, PTR_ERR(aq->rx_chan),
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1203                                  "RX DMA channel is not available\n");
> > 
> > This will return success.
> > 
> 
> Indeed, thanks! This is a personal development branch, I'll fix it inline since
> the patch that adds support for this has not been integrated in mainline yet.
> I'm not sure if I have to add the Reported-by tags or how to give credit to
> a bug spotted on a patch that has not yet landed in mainline. Maybe by adding
> a comment in the comments section of the patch "---"?

This is an automated email from the kbuild-bot.  Feel free to ignore it
when you want to.  I just look it over and hit the forward button.

regards,
dan carpenter

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Tudor.Ambarus@microchip.com
Cc: kbuild@lists.01.org, lkp@intel.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: Re: [ambarus:spi-nor/next 1/15] drivers/spi/atmel-quadspi.c:1202 atmel_qspi_dma_init() warn: passing zero to 'PTR_ERR'
Date: Fri, 11 Feb 2022 16:37:00 +0300	[thread overview]
Message-ID: <20220211133700.GB1978@kadam> (raw)
In-Reply-To: <5f2ddbf7-381a-870e-e533-5261bbc9337b@microchip.com>

On Fri, Feb 11, 2022 at 08:30:48AM +0000, Tudor.Ambarus@microchip.com wrote:
> On 2/11/22 10:04, Dan Carpenter wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > tree:   https://github.com/ambarus/linux-0day  spi-nor/next
> > head:   038b3fa2d89f1a00fdb8767704cdb799a0fe746b
> > commit: ff51c966a3c5144ae964797349747e680ee47c3a [1/15] spi: atmel-quadspi: Add support for sama7g5 QSPI
> > config: openrisc-randconfig-m031-20220210 (https://download.01.org/0day-ci/archive/20220211/202202110830.1OGwXRWt-lkp@intel.com/config )
> > compiler: or1k-linux-gcc (GCC) 11.2.0
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > smatch warnings:
> > drivers/spi/atmel-quadspi.c:1202 atmel_qspi_dma_init() warn: passing zero to 'PTR_ERR'
> > 
> > vim +/PTR_ERR +1202 drivers/spi/atmel-quadspi.c
> > 
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1194  static int atmel_qspi_dma_init(struct spi_controller *ctrl)
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1195  {
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1196     struct atmel_qspi *aq = spi_controller_get_devdata(ctrl);
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1197     int ret;
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1198
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1199     aq->rx_chan = dma_request_chan(&aq->pdev->dev, "rx");
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1200     if (IS_ERR(aq->rx_chan)) {
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1201             aq->rx_chan = NULL;
> > 
> > Need to preserve the error code before setting this to NULL
> > 
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19 @1202             return dev_err_probe(&aq->pdev->dev, PTR_ERR(aq->rx_chan),
> > ff51c966a3c514 drivers/spi/atmel-quadspi.c         Tudor Ambarus   2020-10-19  1203                                  "RX DMA channel is not available\n");
> > 
> > This will return success.
> > 
> 
> Indeed, thanks! This is a personal development branch, I'll fix it inline since
> the patch that adds support for this has not been integrated in mainline yet.
> I'm not sure if I have to add the Reported-by tags or how to give credit to
> a bug spotted on a patch that has not yet landed in mainline. Maybe by adding
> a comment in the comments section of the patch "---"?

This is an automated email from the kbuild-bot.  Feel free to ignore it
when you want to.  I just look it over and hit the forward button.

regards,
dan carpenter


  reply	other threads:[~2022-02-11 13:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11  0:11 [ambarus:spi-nor/next 1/15] drivers/spi/atmel-quadspi.c:1202 atmel_qspi_dma_init() warn: passing zero to 'PTR_ERR' kernel test robot
2022-02-11  8:04 ` Dan Carpenter
2022-02-11  8:04 ` Dan Carpenter
2022-02-11  8:30 ` Tudor.Ambarus
2022-02-11  8:30   ` Tudor.Ambarus
2022-02-11 13:37   ` Dan Carpenter [this message]
2022-02-11 13:37     ` Dan Carpenter
2022-02-11 13:37     ` Dan Carpenter

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=20220211133700.GB1978@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    /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.