linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexandru Ardelean <aardelean@deviqon.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	denis.ciocca@st.com, jic23@kernel.org,
	Alexandru Ardelean <aardelean@deviqon.com>
Subject: Re: [PATCH v2 5/5] iio: st_sensors: remove reference to parent device object on st_sensor_data
Date: Wed, 18 Aug 2021 07:29:53 +0800	[thread overview]
Message-ID: <202108180707.05EmDSHt-lkp@intel.com> (raw)
In-Reply-To: <20210816082836.67511-6-aardelean@deviqon.com>

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

Hi Alexandru,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iio/togreg]
[also build test WARNING on next-20210817]
[cannot apply to linux/master linus/master v5.14-rc6]
[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/Alexandru-Ardelean/iio-st_sensors-convert-probe-functions-to-full-devm/20210816-163158
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: mips-randconfig-c004-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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 mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/0day-ci/linux/commit/6fc83d9d7fb9de59586602b0365acb5525a3f0b9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Alexandru-Ardelean/iio-st_sensors-convert-probe-functions-to-full-devm/20210816-163158
        git checkout 6fc83d9d7fb9de59586602b0365acb5525a3f0b9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
                       ^~~~~
   drivers/media/tuners/max2165.c:66:3: note: Taking false branch
                   dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
                   ^
   drivers/media/tuners/max2165.c:24:3: note: expanded from macro 'dprintk'
                   if (debug) \
                   ^
   drivers/media/tuners/max2165.c:66:3: note: Loop condition is false.  Exiting loop
                   dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
                   ^
   drivers/media/tuners/max2165.c:23:2: note: expanded from macro 'dprintk'
           do { \
           ^
   drivers/media/tuners/max2165.c:67:3: note: Returning without writing to '*p_data'
                   return -EIO;
                   ^
   drivers/media/tuners/max2165.c:101:3: note: Returning from 'max2165_read_reg'
                   max2165_read_reg(priv, REG_ROM_TABLE_DATA, &dat[i]);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/tuners/max2165.c:99:2: note: Loop condition is false. Execution continues on line 104
           for (i = 0; i < 3; i++) {
           ^
   drivers/media/tuners/max2165.c:108:36: note: The left operand of '&' is a garbage value
           priv->bb_filter_7mhz_cfg = dat[2] & 0x0F;
                                      ~~~~~~ ^
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   drivers/gpu/drm/drm_framebuffer.c:852:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
           strcpy(fb->comm, current->comm);
           ^~~~~~
   drivers/gpu/drm/drm_framebuffer.c:852:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
           strcpy(fb->comm, current->comm);
           ^~~~~~
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (7 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
>> drivers/iio/common/st_sensors/st_sensors_trigger.c:79:17: warning: Value stored to 'parent' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *parent = indio_dev->dev.parent;
                          ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/common/st_sensors/st_sensors_trigger.c:79:17: note: Value stored to 'parent' during its initialization is never read
           struct device *parent = indio_dev->dev.parent;
                          ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

vim +/parent +79 drivers/iio/common/st_sensors/st_sensors_trigger.c

    68	
    69	/**
    70	 * st_sensors_irq_thread() - bottom half of the IRQ-based triggers
    71	 * @irq: irq number
    72	 * @p: private handler data
    73	 */
    74	static irqreturn_t st_sensors_irq_thread(int irq, void *p)
    75	{
    76		struct iio_trigger *trig = p;
    77		struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);
    78		struct st_sensor_data *sdata = iio_priv(indio_dev);
  > 79		struct device *parent = indio_dev->dev.parent;
    80	
    81		/*
    82		 * If this trigger is backed by a hardware interrupt and we have a
    83		 * status register, check if this IRQ came from us. Notice that
    84		 * we will process also if st_sensors_new_samples_available()
    85		 * returns negative: if we can't check status, then poll
    86		 * unconditionally.
    87		 */
    88		if (sdata->hw_irq_trigger &&
    89		    st_sensors_new_samples_available(indio_dev, sdata)) {
    90			iio_trigger_poll_chained(p);
    91		} else {
    92			dev_dbg(parent, "spurious IRQ\n");
    93			return IRQ_NONE;
    94		}
    95	
    96		/*
    97		 * If we have proper level IRQs the handler will be re-entered if
    98		 * the line is still active, so return here and come back in through
    99		 * the top half if need be.
   100		 */
   101		if (!sdata->edge_irq)
   102			return IRQ_HANDLED;
   103	
   104		/*
   105		 * If we are using edge IRQs, new samples arrived while processing
   106		 * the IRQ and those may be missed unless we pick them here, so poll
   107		 * again. If the sensor delivery frequency is very high, this thread
   108		 * turns into a polled loop handler.
   109		 */
   110		while (sdata->hw_irq_trigger &&
   111		       st_sensors_new_samples_available(indio_dev, sdata)) {
   112			dev_dbg(parent, "more samples came in during polling\n");
   113			sdata->hw_timestamp = iio_get_time_ns(indio_dev);
   114			iio_trigger_poll_chained(p);
   115		}
   116	
   117		return IRQ_HANDLED;
   118	}
   119	

---
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: 35627 bytes --]

  reply	other threads:[~2021-08-17 23:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  8:28 [PATCH v2 0/5] iio: st_sensors: convert probe functions to full devm Alexandru Ardelean
2021-08-16  8:28 ` [PATCH v2 1/5] iio: st_sensors: disable regulators after device unregistration Alexandru Ardelean
2021-08-16 22:50   ` Linus Walleij
2021-08-17  6:18     ` Alexandru Ardelean
2021-08-16  8:28 ` [PATCH v2 2/5] iio: st_sensors: remove st_sensors_deallocate_trigger() function Alexandru Ardelean
2021-08-16  8:28 ` [PATCH v2 3/5] iio: st_sensors: remove st_sensors_power_disable() function Alexandru Ardelean
2021-08-16  8:28 ` [PATCH v2 4/5] iio: st_sensors: remove all driver remove functions Alexandru Ardelean
2021-08-16  8:28 ` [PATCH v2 5/5] iio: st_sensors: remove reference to parent device object on st_sensor_data Alexandru Ardelean
2021-08-17 23:29   ` kernel test robot [this message]
2021-08-16  9:09 ` [PATCH v2 0/5] iio: st_sensors: convert probe functions to full devm Andy Shevchenko

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=202108180707.05EmDSHt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aardelean@deviqon.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=denis.ciocca@st.com \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 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).