From: kernel test robot <lkp@intel.com>
To: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>,
jic23@kernel.org, lars@metafoo.de, linux-iio@vger.kernel.org,
git-dev@xilinx.com, michal.simek@xilinx.com, pmeerw@pmeerw.net,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>,
Manish Narani <manish.narani@xilinx.com>
Subject: Re: [PATCH v6 2/4] iio: adc: Add Xilinx AMS driver
Date: Thu, 1 Jul 2021 16:00:21 +0800 [thread overview]
Message-ID: <202107011529.gGSHns3w-lkp@intel.com> (raw)
In-Reply-To: <20210624182939.12881-3-anand.ashok.dumbre@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 5685 bytes --]
Hi Anand,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on iio/togreg]
[also build test WARNING on linus/master v5.13]
[cannot apply to xlnx/master]
[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]
url: https://github.com/0day-ci/linux/commits/Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20210625-023047
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: riscv-randconfig-r022-20210701 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e7e71e9454ed76c1b3d8140170b5333c28bef1be)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/fa0ea7aaf7a9bff3781f19596b07fe33c6ef531d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20210625-023047
git checkout fa0ea7aaf7a9bff3781f19596b07fe33c6ef531d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/iio/adc/xilinx-ams.c:631:10: warning: signed shift result (0x446A60000) requires 36 bits to represent, but 'long' only has 32 bits [-Wshift-overflow]
*val = AMS_TEMP_OFFSET;
^~~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:151:38: note: expanded from macro 'AMS_TEMP_OFFSET'
#define AMS_TEMP_OFFSET -((280230L << 16) / 509314)
~~~~~~~ ^ ~~
>> drivers/iio/adc/xilinx-ams.c:1126:35: warning: variable 'chan_node' is uninitialized when used here [-Wuninitialized]
num_channels = ams_get_ext_chan(chan_node, channels,
^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:1104:31: note: initialize the variable 'chan_node' to silence this warning
struct device_node *chan_node;
^
= NULL
2 warnings generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +/long +631 drivers/iio/adc/xilinx-ams.c
554
555 static int ams_read_raw(struct iio_dev *indio_dev,
556 struct iio_chan_spec const *chan,
557 int *val, int *val2, long mask)
558 {
559 struct ams *ams = iio_priv(indio_dev);
560 int ret;
561
562 switch (mask) {
563 case IIO_CHAN_INFO_RAW:
564 mutex_lock(&ams->lock);
565 if (chan->scan_index >= (AMS_PS_SEQ_MAX * 3)) {
566 ret = ams_read_vcc_reg(ams, chan->address, val);
567 if (ret) {
568 mutex_unlock(&ams->lock);
569 return -EINVAL;
570 }
571 ams_enable_channel_sequence(indio_dev);
572 } else if (chan->scan_index >= AMS_PS_SEQ_MAX)
573 *val = readl(ams->pl_base + chan->address);
574 else
575 *val = readl(ams->ps_base + chan->address);
576 mutex_unlock(&ams->lock);
577
578 return IIO_VAL_INT;
579 case IIO_CHAN_INFO_SCALE:
580 switch (chan->type) {
581 case IIO_VOLTAGE:
582 switch (chan->address) {
583 case AMS_SUPPLY1:
584 case AMS_SUPPLY2:
585 case AMS_SUPPLY3:
586 case AMS_SUPPLY4:
587 *val = AMS_SUPPLY_SCALE_3VOLT;
588 break;
589 case AMS_SUPPLY5:
590 case AMS_SUPPLY6:
591 if (chan->scan_index < AMS_PS_SEQ_MAX)
592 *val = AMS_SUPPLY_SCALE_6VOLT;
593 else
594 *val = AMS_SUPPLY_SCALE_3VOLT;
595 break;
596 case AMS_SUPPLY7:
597 case AMS_SUPPLY8:
598 *val = AMS_SUPPLY_SCALE_6VOLT;
599 break;
600 case AMS_SUPPLY9:
601 case AMS_SUPPLY10:
602 if (chan->scan_index < AMS_PS_SEQ_MAX)
603 *val = AMS_SUPPLY_SCALE_3VOLT;
604 else
605 *val = AMS_SUPPLY_SCALE_6VOLT;
606 break;
607 case AMS_VCC_PSPLL0:
608 case AMS_VCC_PSPLL3:
609 case AMS_VCCINT:
610 case AMS_VCCBRAM:
611 case AMS_VCCAUX:
612 case AMS_PSDDRPLL:
613 case AMS_PSINTFPDDR:
614 *val = AMS_SUPPLY_SCALE_3VOLT;
615 break;
616 default:
617 *val = AMS_SUPPLY_SCALE_1VOLT;
618 break;
619 }
620 *val2 = AMS_SUPPLY_SCALE_DIV_BIT;
621 return IIO_VAL_FRACTIONAL_LOG2;
622 case IIO_TEMP:
623 *val = AMS_TEMP_SCALE;
624 *val2 = AMS_TEMP_SCALE_DIV_BIT;
625 return IIO_VAL_FRACTIONAL_LOG2;
626 default:
627 return -EINVAL;
628 }
629 case IIO_CHAN_INFO_OFFSET:
630 /* Only the temperature channel has an offset */
> 631 *val = AMS_TEMP_OFFSET;
632 return IIO_VAL_INT;
633 }
634
635 return -EINVAL;
636 }
637
---
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: 35065 bytes --]
next prev parent reply other threads:[~2021-07-01 8:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 18:29 [PATCH v6 0/4] Add Xilinx AMS Driver Anand Ashok Dumbre
2021-06-24 18:29 ` [PATCH v6 1/4] arm64: zynqmp: DT: Add Xilinx AMS node Anand Ashok Dumbre
2021-06-24 18:29 ` [PATCH v6 2/4] iio: adc: Add Xilinx AMS driver Anand Ashok Dumbre
2021-06-25 10:49 ` kernel test robot
2021-06-29 8:32 ` Dan Carpenter
2021-07-01 8:00 ` kernel test robot [this message]
2021-07-04 18:31 ` Jonathan Cameron
2021-07-15 7:48 ` Anand Ashok Dumbre
2021-07-15 12:52 ` Jonathan Cameron
2021-07-19 7:49 ` Anand Ashok Dumbre
2021-06-24 18:29 ` [PATCH v6 3/4] dt-bindings: iio: adc: Add Xilinx AMS binding documentation Anand Ashok Dumbre
2021-07-04 18:08 ` Jonathan Cameron
2021-07-13 22:31 ` Rob Herring
2021-07-15 6:58 ` Anand Ashok Dumbre
2021-06-24 18:29 ` [PATCH v6 4/4] MAINTAINERS: Add maintainer for xilinx-ams Anand Ashok Dumbre
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=202107011529.gGSHns3w-lkp@intel.com \
--to=lkp@intel.com \
--cc=anand.ashok.dumbre@xilinx.com \
--cc=clang-built-linux@googlegroups.com \
--cc=devicetree@vger.kernel.org \
--cc=git-dev@xilinx.com \
--cc=jic23@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manish.narani@xilinx.com \
--cc=michal.simek@xilinx.com \
--cc=pmeerw@pmeerw.net \
/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).