All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sanjay Chitroda <sanjayembeddedse@gmail.com>,
	jic23@kernel.org, m.tretter@pengutronix.de, mchehab@kernel.org,
	p.zabel@pengutronix.de, tiffany.lin@mediatek.com,
	andrew-ct.chen@mediatek.com, yunfei.dong@mediatek.com,
	matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
	pure.logic@nexus-software.ie
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	kernel@pengutronix.de, kees@kernel.org,
	nabijaczleweli@nabijaczleweli.xyz, marcelo.schmitt1@gmail.com,
	maudspierings@gocontroll.com, hverkuil+cisco@kernel.org,
	ribalda@chromium.org, straube.linux@gmail.com,
	dan.carpenter@linaro.org, lukagejak5@gmail.com,
	ethantidmore06@gmail.com, samasth.norway.ananda@oracle.com,
	karanja99erick@gmail.com, s9430939@naver.com
Subject: Re: [PATCH 3/7] iio: st_sensors: simplify cleanup using __free
Date: Fri, 13 Mar 2026 08:23:19 +0800	[thread overview]
Message-ID: <202603130856.TRVqFtUG-lkp@intel.com> (raw)
In-Reply-To: <20260310200513.2162018-4-sanjayembedded@gmail.com>

Hi Sanjay,

kernel test robot noticed the following build errors:

[auto build test ERROR on staging/staging-linus]
[also build test ERROR on jic23-iio/togreg linuxtv-media-pending/master linus/master v7.0-rc3 next-20260311]
[cannot apply to staging/staging-testing staging/staging-next]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sanjay-Chitroda/staging-greybus-simplify-cleanup-using-__free/20260311-041028
base:   staging/staging-linus
patch link:    https://lore.kernel.org/r/20260310200513.2162018-4-sanjayembedded%40gmail.com
patch subject: [PATCH 3/7] iio: st_sensors: simplify cleanup using __free
config: riscv-randconfig-001-20260313 (https://download.01.org/0day-ci/archive/20260313/202603130856.TRVqFtUG-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 7d47b695929cc7f85eeb0f87d0189adc04c1c629)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260313/202603130856.TRVqFtUG-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603130856.TRVqFtUG-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/iio/common/st_sensors/st_sensors_core.c:504:14: warning: attribute declaration must precede definition [-Wignored-attributes]
     504 |         u8 *outdata __free(kfree) = kmalloc(byte_for_channel, GFP_DMA | GFP_KERNEL);
         |                     ^
   include/linux/cleanup.h:213:23: note: expanded from macro '__free'
     213 | #define __free(_name)   __cleanup(__free_##_name)
         |                         ^
   include/linux/compiler-clang.h:15:25: note: expanded from macro '__cleanup'
      15 | #define __cleanup(func) __maybe_unused __attribute__((__cleanup__(func)))
         |                         ^
   include/linux/compiler_attributes.h:343:56: note: expanded from macro '__maybe_unused'
     343 | #define __maybe_unused                  __attribute__((__unused__))
         |                                                        ^
   drivers/iio/common/st_sensors/st_sensors_core.c:498:6: note: previous definition is here
     498 |         u8 *outdata;
         |             ^
>> drivers/iio/common/st_sensors/st_sensors_core.c:504:14: warning: attribute declaration must precede definition [-Wignored-attributes]
     504 |         u8 *outdata __free(kfree) = kmalloc(byte_for_channel, GFP_DMA | GFP_KERNEL);
         |                     ^
   include/linux/cleanup.h:213:23: note: expanded from macro '__free'
     213 | #define __free(_name)   __cleanup(__free_##_name)
         |                         ^
   include/linux/compiler-clang.h:15:55: note: expanded from macro '__cleanup'
      15 | #define __cleanup(func) __maybe_unused __attribute__((__cleanup__(func)))
         |                                                       ^
   drivers/iio/common/st_sensors/st_sensors_core.c:498:6: note: previous definition is here
     498 |         u8 *outdata;
         |             ^
>> drivers/iio/common/st_sensors/st_sensors_core.c:504:6: error: redefinition of 'outdata'
     504 |         u8 *outdata __free(kfree) = kmalloc(byte_for_channel, GFP_DMA | GFP_KERNEL);
         |             ^
   drivers/iio/common/st_sensors/st_sensors_core.c:498:6: note: previous definition is here
     498 |         u8 *outdata;
         |             ^
   2 warnings and 1 error generated.


vim +/outdata +504 drivers/iio/common/st_sensors/st_sensors_core.c

   493	
   494	static int st_sensors_read_axis_data(struct iio_dev *indio_dev,
   495					     struct iio_chan_spec const *ch, int *data)
   496	{
   497		int err;
 > 498		u8 *outdata;
   499		struct st_sensor_data *sdata = iio_priv(indio_dev);
   500		unsigned int byte_for_channel;
   501	
   502		byte_for_channel = DIV_ROUND_UP(ch->scan_type.realbits +
   503						ch->scan_type.shift, 8);
 > 504		u8 *outdata __free(kfree) = kmalloc(byte_for_channel, GFP_DMA | GFP_KERNEL);
   505		if (!outdata)
   506			return -ENOMEM;
   507	
   508		err = regmap_bulk_read(sdata->regmap, ch->address,
   509				       outdata, byte_for_channel);
   510		if (err < 0)
   511			return err;
   512	
   513		if (byte_for_channel == 1)
   514			*data = (s8)*outdata;
   515		else if (byte_for_channel == 2)
   516			*data = (s16)get_unaligned_le16(outdata);
   517		else if (byte_for_channel == 3)
   518			*data = (s32)sign_extend32(get_unaligned_le24(outdata), 23);
   519	
   520		return err;
   521	}
   522	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2026-03-13  0:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 20:05 [PATCH 0/7] drivers: Simplify cleanup paths using __free Sanjay Chitroda
2026-03-10 20:05 ` [PATCH 1/7] staging: greybus: simplify cleanup " Sanjay Chitroda
2026-03-10 21:07   ` Andy Shevchenko
2026-03-11  6:51     ` Dan Carpenter
2026-03-11  7:06       ` Greg KH
2026-03-10 20:05 ` [PATCH 2/7] iio: ssp_sensors: " Sanjay Chitroda
2026-03-10 21:11   ` Andy Shevchenko
2026-03-10 20:05 ` [PATCH 3/7] iio: st_sensors: " Sanjay Chitroda
2026-03-11  0:04   ` David Lechner
2026-03-12 20:52   ` kernel test robot
2026-03-13  0:23   ` kernel test robot [this message]
2026-03-10 20:05 ` [PATCH 4/7] media: mediatek: vcodec: " Sanjay Chitroda
2026-03-19 21:08   ` Nicolas Dufresne
2026-03-10 20:05 ` [PATCH 5/7] media: chips-media: coda: " Sanjay Chitroda
2026-03-10 20:05 ` [PATCH 6/7] media: allegro: " Sanjay Chitroda
2026-03-10 20:05 ` [PATCH 7/7] staging: rtl8723bs: " Sanjay Chitroda
2026-03-10 21:42   ` Andrew Lunn
2026-03-11  6:45   ` Greg KH
2026-03-10 21:04 ` [PATCH 0/7] drivers: Simplify cleanup paths " Andy Shevchenko
2026-03-10 21:52 ` David Lechner
2026-03-11  1:57   ` Sanjay Chitroda
2026-03-11  5:42 ` Luka Gejak

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=202603130856.TRVqFtUG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dlechner@baylibre.com \
    --cc=elder@kernel.org \
    --cc=ethantidmore06@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil+cisco@kernel.org \
    --cc=jic23@kernel.org \
    --cc=johan@kernel.org \
    --cc=karanja99erick@gmail.com \
    --cc=kees@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=llvm@lists.linux.dev \
    --cc=lukagejak5@gmail.com \
    --cc=m.tretter@pengutronix.de \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=maudspierings@gocontroll.com \
    --cc=mchehab@kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=p.zabel@pengutronix.de \
    --cc=pure.logic@nexus-software.ie \
    --cc=ribalda@chromium.org \
    --cc=s9430939@naver.com \
    --cc=samasth.norway.ananda@oracle.com \
    --cc=sanjayembeddedse@gmail.com \
    --cc=straube.linux@gmail.com \
    --cc=tiffany.lin@mediatek.com \
    --cc=yunfei.dong@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.