linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org,
	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: lkp@intel.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: Tue, 29 Jun 2021 11:32:58 +0300	[thread overview]
Message-ID: <202106290536.M75RUmJ1-lkp@intel.com> (raw)
In-Reply-To: <20210624182939.12881-3-anand.ashok.dumbre@xilinx.com>

Hi Anand,

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: microblaze-randconfig-m031-20210628 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 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/iio/adc/xilinx-ams.c:406 ams_enable_channel_sequence() warn: should '(((1))) << (indio_dev->channels[i]->scan_index)' be a 64 bit type?
drivers/iio/adc/xilinx-ams.c:1126 ams_init_module() error: uninitialized symbol 'chan_node'.

vim +406 drivers/iio/adc/xilinx-ams.c

fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  392  static void ams_enable_channel_sequence(struct iio_dev *indio_dev)
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  393  {
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  394  	int i;
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  395  	unsigned long long scan_mask;
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  396  	struct ams *ams = iio_priv(indio_dev);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  397  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  398  	/*
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  399  	 * Enable channel sequence. First 22 bits of scan_mask represent
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  400  	 * PS channels, and next remaining bits represent PL channels.
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  401  	 */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  402  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  403  	/* Run calibration of PS & PL as part of the sequence */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  404  	scan_mask = 0x1 | BIT(AMS_PS_SEQ_MAX);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  405  	for (i = 0; i < indio_dev->num_channels; i++)
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24 @406  		scan_mask |= BIT(indio_dev->channels[i].scan_index);

Since scan_mask is ull should we use BIT_ULL() instead of BIT()?

(I haven't look at the context outside of this email so I don't know
the value of indio_dev->num_channels).

fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  407  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  408  	if (ams->ps_base) {
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  409  		/* put sysmon in a soft reset to change the sequence */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  410  		ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  411  				  AMS_CONF1_SEQ_DEFAULT);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  412  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  413  		/* configure basic channels */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  414  		writel(scan_mask & AMS_REG_SEQ0_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  415  		       ams->ps_base + AMS_REG_SEQ_CH0);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  416  		writel(AMS_REG_SEQ2_MASK &
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  417  		       (scan_mask >> AMS_REG_SEQ2_MASK_SHIFT),
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  418  		       ams->ps_base + AMS_REG_SEQ_CH2);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  419  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  420  		/* set continuous sequence mode */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  421  		ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  422  				  AMS_CONF1_SEQ_CONTINUOUS);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  423  	}
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  424  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  425  	if (ams->pl_base) {
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  426  		/* put sysmon in a soft reset to change the sequence */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  427  		ams_pl_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  428  				  AMS_CONF1_SEQ_DEFAULT);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  429  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  430  		/* configure basic channels */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  431  		scan_mask = scan_mask >> AMS_PS_SEQ_MAX;
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  432  		writel(scan_mask & AMS_REG_SEQ0_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  433  		       ams->pl_base + AMS_REG_SEQ_CH0);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  434  		writel(AMS_REG_SEQ2_MASK &
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  435  		       (scan_mask >> AMS_REG_SEQ2_MASK_SHIFT),
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  436  		       ams->pl_base + AMS_REG_SEQ_CH2);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  437  		writel(AMS_REG_SEQ1_MASK &
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  438  		       (scan_mask >> AMS_REG_SEQ1_MASK_SHIFT),
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  439  		       ams->pl_base + AMS_REG_SEQ_CH1);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  440  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  441  		/* set continuous sequence mode */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  442  		ams_pl_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  443  				  AMS_CONF1_SEQ_CONTINUOUS);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  444  	}
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  445  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


  parent reply	other threads:[~2021-06-29  8:33 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 [this message]
2021-07-01  8:00   ` kernel test robot
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=202106290536.M75RUmJ1-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=anand.ashok.dumbre@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=git-dev@xilinx.com \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --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).