From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Stuart Hayes <stuart.w.hayes@gmail.com>,
Bjorn Helgaas <helgaas@kernel.org>
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>,
kbuild-all@lists.01.org, linux-pci@vger.kernel.org,
Stuart Hayes <stuart.w.hayes@gmail.com>
Subject: Re: [PATCH v2] Expose PCIe SSD Status LED Management DSM in sysfs
Date: Fri, 13 Nov 2020 17:14:26 +0300 [thread overview]
Message-ID: <20201113141425.GO29398@kadam> (raw)
In-Reply-To: <20201110153735.58587-1-stuart.w.hayes@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2630 bytes --]
Hi Stuart,
url: https://github.com/0day-ci/linux/commits/Stuart-Hayes/Expose-PCIe-SSD-Status-LED-Management-DSM-in-sysfs/20201111-004557
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-randconfig-m021-20201111 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.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/pci/pci-ssdleds.c:47 ssdleds_dsm_set() warn: impossible condition '(val > (~0)) => (0-u32max > u32max)'
vim +47 drivers/pci/pci-ssdleds.c
e6eac5bf04a7aca Stuart Hayes 2020-11-10 34 static int ssdleds_dsm_set(struct device *dev, const char *buf, u64 dsm_func)
e6eac5bf04a7aca Stuart Hayes 2020-11-10 35 {
e6eac5bf04a7aca Stuart Hayes 2020-11-10 36 acpi_handle handle;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 37 union acpi_object *out_obj, arg3[2];
e6eac5bf04a7aca Stuart Hayes 2020-11-10 38 struct pci_ssdleds_dsm_output *dsm_output;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 39 u32 val;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 40 int err;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 41
e6eac5bf04a7aca Stuart Hayes 2020-11-10 42 handle = ACPI_HANDLE(dev);
e6eac5bf04a7aca Stuart Hayes 2020-11-10 43 if (!handle)
e6eac5bf04a7aca Stuart Hayes 2020-11-10 44 return -ENODEV;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 45
e6eac5bf04a7aca Stuart Hayes 2020-11-10 46 err = kstrtou32(buf, 0, &val);
e6eac5bf04a7aca Stuart Hayes 2020-11-10 @47 if (err || val > U32_MAX)
^^^^^^^^^^^^^
This is not required. Just "if (err) return err;"'
e6eac5bf04a7aca Stuart Hayes 2020-11-10 48 return -EINVAL;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 49
e6eac5bf04a7aca Stuart Hayes 2020-11-10 50 arg3[0].type = ACPI_TYPE_PACKAGE;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 51 arg3[0].package.count = 1;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 52 arg3[0].package.elements = &arg3[1];
e6eac5bf04a7aca Stuart Hayes 2020-11-10 53
e6eac5bf04a7aca Stuart Hayes 2020-11-10 54 arg3[1].type = ACPI_TYPE_BUFFER;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 55 arg3[1].buffer.length = 4;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 56 arg3[1].buffer.pointer = (u8 *)&val;
e6eac5bf04a7aca Stuart Hayes 2020-11-10 57
e6eac5bf04a7aca Stuart Hayes 2020-11-10 58 out_obj = acpi_evaluate_dsm_typed(handle, &pci_ssdleds_dsm_guid, 0x1,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35051 bytes --]
next prev parent reply other threads:[~2020-11-13 14:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 15:37 [PATCH v2] Expose PCIe SSD Status LED Management DSM in sysfs Stuart Hayes
2020-11-11 7:05 ` Christoph Hellwig
2020-11-12 4:48 ` Stuart Hayes
2020-11-13 14:14 ` Dan Carpenter [this message]
2020-11-13 21:38 ` Bjorn Helgaas
2020-11-13 23:19 ` Greg Kroah-Hartman
2020-11-16 22:25 ` Stuart Hayes
2020-11-17 7:07 ` Greg Kroah-Hartman
2020-11-15 6:38 ` Krzysztof Wilczyński
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=20201113141425.GO29398@kadam \
--to=dan.carpenter@oracle.com \
--cc=error27@gmail.com \
--cc=helgaas@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-pci@vger.kernel.org \
--cc=lkp@intel.com \
--cc=stuart.w.hayes@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;
as well as URLs for NNTP newsgroup(s).