From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev,
Troy Mitchell <troymitchell988@gmail.com>,
andi.shyti@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
troymitchell988@gmail.com, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] i2c: spacemit: add support for SpacemiT K1 SoC
Date: Mon, 21 Oct 2024 10:22:49 +0300 [thread overview]
Message-ID: <1e65dbe7-0269-4c96-99be-c4eb224a5a9f@stanley.mountain> (raw)
In-Reply-To: <20241015075134.1449458-3-TroyMitchell988@gmail.com>
Hi Troy,
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/Troy-Mitchell/dt-bindings-i2c-spacemit-add-support-for-K1-SoC/20241015-155402
base: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link: https://lore.kernel.org/r/20241015075134.1449458-3-TroyMitchell988%40gmail.com
patch subject: [PATCH v1 2/2] i2c: spacemit: add support for SpacemiT K1 SoC
config: alpha-randconfig-r071-20241019 (https://download.01.org/0day-ci/archive/20241019/202410191416.NyqQCvE3-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.3.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/202410191416.NyqQCvE3-lkp@intel.com/
smatch warnings:
drivers/i2c/busses/i2c-k1.c:621 spacemit_i2c_probe() warn: passing zero to 'PTR_ERR'
drivers/i2c/busses/i2c-k1.c:622 spacemit_i2c_probe() warn: passing zero to 'dev_err_probe'
vim +/PTR_ERR +621 drivers/i2c/busses/i2c-k1.c
aede17b17b7dfb Troy Mitchell 2024-10-15 604 static int spacemit_i2c_probe(struct platform_device *pdev)
aede17b17b7dfb Troy Mitchell 2024-10-15 605 {
aede17b17b7dfb Troy Mitchell 2024-10-15 606 struct spacemit_i2c_dev *i2c;
aede17b17b7dfb Troy Mitchell 2024-10-15 607 struct device_node *of_node = pdev->dev.of_node;
aede17b17b7dfb Troy Mitchell 2024-10-15 608 struct clk *clk;
aede17b17b7dfb Troy Mitchell 2024-10-15 609 int ret = 0;
aede17b17b7dfb Troy Mitchell 2024-10-15 610
aede17b17b7dfb Troy Mitchell 2024-10-15 611 i2c = devm_kzalloc(&pdev->dev,
aede17b17b7dfb Troy Mitchell 2024-10-15 612 sizeof(struct spacemit_i2c_dev),
aede17b17b7dfb Troy Mitchell 2024-10-15 613 GFP_KERNEL);
aede17b17b7dfb Troy Mitchell 2024-10-15 614 if (!i2c)
aede17b17b7dfb Troy Mitchell 2024-10-15 615 return -ENOMEM;
aede17b17b7dfb Troy Mitchell 2024-10-15 616
aede17b17b7dfb Troy Mitchell 2024-10-15 617 i2c->dev = &pdev->dev;
aede17b17b7dfb Troy Mitchell 2024-10-15 618
aede17b17b7dfb Troy Mitchell 2024-10-15 619 i2c->base = devm_platform_ioremap_resource(pdev, 0);
aede17b17b7dfb Troy Mitchell 2024-10-15 620 if (!i2c->base) {
This should be if (IS_ERR(i2c->base)) {
aede17b17b7dfb Troy Mitchell 2024-10-15 @621 ret = PTR_ERR(i2c->base);
aede17b17b7dfb Troy Mitchell 2024-10-15 @622 return dev_err_probe(&pdev->dev, ret, "failed to do ioremap");
aede17b17b7dfb Troy Mitchell 2024-10-15 623 }
aede17b17b7dfb Troy Mitchell 2024-10-15 624
aede17b17b7dfb Troy Mitchell 2024-10-15 625 i2c->irq = platform_get_irq(pdev, 0);
aede17b17b7dfb Troy Mitchell 2024-10-15 626 if (i2c->irq < 0) {
aede17b17b7dfb Troy Mitchell 2024-10-15 627 ret = i2c->irq;
aede17b17b7dfb Troy Mitchell 2024-10-15 628 return dev_err_probe(&pdev->dev, ret, "failed to get irq resource");
aede17b17b7dfb Troy Mitchell 2024-10-15 629 }
aede17b17b7dfb Troy Mitchell 2024-10-15 630
aede17b17b7dfb Troy Mitchell 2024-10-15 631 ret = devm_request_irq(i2c->dev, i2c->irq,
aede17b17b7dfb Troy Mitchell 2024-10-15 632 spacemit_i2c_irq_handler,
aede17b17b7dfb Troy Mitchell 2024-10-15 633 IRQF_NO_SUSPEND | IRQF_ONESHOT,
aede17b17b7dfb Troy Mitchell 2024-10-15 634 dev_name(i2c->dev), i2c);
aede17b17b7dfb Troy Mitchell 2024-10-15 635
aede17b17b7dfb Troy Mitchell 2024-10-15 636 if (ret)
aede17b17b7dfb Troy Mitchell 2024-10-15 637 return dev_err_probe(&pdev->dev, ret, "failed to request irq");
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-10-21 7:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 7:51 [PATCH v1 0/2] riscv: spacemit: add i2c support to K1 SoC Troy Mitchell
2024-10-15 7:51 ` [PATCH v1 1/2] dt-bindings: i2c: spacemit: add support for " Troy Mitchell
2024-10-15 8:02 ` Krzysztof Kozlowski
2024-10-15 16:47 ` Conor Dooley
2024-10-16 2:45 ` Troy Mitchell
2024-10-16 7:44 ` Krzysztof Kozlowski
2024-10-15 9:22 ` Rob Herring (Arm)
2024-10-15 7:51 ` [PATCH v1 2/2] i2c: spacemit: add support for SpacemiT " Troy Mitchell
2024-10-15 8:08 ` Krzysztof Kozlowski
2024-10-15 9:21 ` Wolfram Sang
2024-10-18 5:17 ` Troy Mitchell
2024-10-18 6:05 ` Krzysztof Kozlowski
2024-10-18 8:33 ` Troy Mitchell
2024-10-18 8:39 ` Krzysztof Kozlowski
2024-10-15 9:17 ` Wolfram Sang
2024-10-16 2:26 ` Troy Mitchell
2024-10-16 7:06 ` Wolfram Sang
2024-10-16 9:39 ` Uwe Kleine-König
2024-10-21 7:22 ` Dan Carpenter [this message]
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=1e65dbe7-0269-4c96-99be-c4eb224a5a9f@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=robh@kernel.org \
--cc=troymitchell988@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox