* [android-common:android16-6.12-kminext 1/1] drivers/scsi/smartpqi/smartpqi_init.c:5993 pqi_is_parity_write_stream() warn: inconsistent indenting
@ 2026-10-18 7:46 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-18 7:46 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
tree: https://android.googlesource.com/kernel/common android16-6.12-kminext
head: a42b417921ddca2df90dc3d8cb746eda8cdb6d63
commit: 6589bc3699bcb45b35b3095c44a5af7a4d75ef7e [1/1] scsi: smartpqi: Fix smp_processor_id() call trace for preemptible kernels
config: i386-randconfig-2200-20261016 (https://download.01.org/0day-ci/archive/20261017/202610170645.8YJdwPM7-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
smatch: v0.5.0-9187-g5189e3fb
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/202610170645.8YJdwPM7-lkp@intel.com/
New smatch warnings:
drivers/scsi/smartpqi/smartpqi_init.c:5993 pqi_is_parity_write_stream() warn: inconsistent indenting
Old smatch warnings:
drivers/scsi/smartpqi/smartpqi_init.c:1489 pqi_get_raid_map() warn: missing unwind goto?
vim +5993 drivers/scsi/smartpqi/smartpqi_init.c
5941
5942 static bool pqi_is_parity_write_stream(struct pqi_ctrl_info *ctrl_info,
5943 struct scsi_cmnd *scmd)
5944 {
5945 u32 oldest_jiffies;
5946 u8 lru_index;
5947 int i;
5948 int rc;
5949 struct pqi_scsi_dev *device;
5950 struct pqi_stream_data *pqi_stream_data;
5951 struct pqi_scsi_dev_raid_map_data rmd = { 0 };
5952
5953 if (!ctrl_info->enable_stream_detection)
5954 return false;
5955
5956 rc = pqi_get_aio_lba_and_block_count(scmd, &rmd);
5957 if (rc)
5958 return false;
5959
5960 /* Check writes only. */
5961 if (!rmd.is_write)
5962 return false;
5963
5964 device = scmd->device->hostdata;
5965
5966 /* Check for RAID 5/6 streams. */
5967 if (device->raid_level != SA_RAID_5 && device->raid_level != SA_RAID_6)
5968 return false;
5969
5970 /*
5971 * If controller does not support AIO RAID{5,6} writes, need to send
5972 * requests down non-AIO path.
5973 */
5974 if ((device->raid_level == SA_RAID_5 && !ctrl_info->enable_r5_writes) ||
5975 (device->raid_level == SA_RAID_6 && !ctrl_info->enable_r6_writes))
5976 return true;
5977
5978 lru_index = 0;
5979 oldest_jiffies = INT_MAX;
5980 for (i = 0; i < NUM_STREAMS_PER_LUN; i++) {
5981 pqi_stream_data = &device->stream_data[i];
5982 /*
5983 * Check for adjacent request or request is within
5984 * the previous request.
5985 */
5986 if ((pqi_stream_data->next_lba &&
5987 rmd.first_block >= pqi_stream_data->next_lba) &&
5988 rmd.first_block <= pqi_stream_data->next_lba +
5989 rmd.block_cnt) {
5990 pqi_stream_data->next_lba = rmd.first_block +
5991 rmd.block_cnt;
5992 pqi_stream_data->last_accessed = jiffies;
> 5993 per_cpu_ptr(device->raid_io_stats, raw_smp_processor_id())->write_stream_cnt++;
5994 return true;
5995 }
5996
5997 /* unused entry */
5998 if (pqi_stream_data->last_accessed == 0) {
5999 lru_index = i;
6000 break;
6001 }
6002
6003 /* Find entry with oldest last accessed time. */
6004 if (pqi_stream_data->last_accessed <= oldest_jiffies) {
6005 oldest_jiffies = pqi_stream_data->last_accessed;
6006 lru_index = i;
6007 }
6008 }
6009
6010 /* Set LRU entry. */
6011 pqi_stream_data = &device->stream_data[lru_index];
6012 pqi_stream_data->last_accessed = jiffies;
6013 pqi_stream_data->next_lba = rmd.first_block + rmd.block_cnt;
6014
6015 return false;
6016 }
6017
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-18 7:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18 7:46 [android-common:android16-6.12-kminext 1/1] drivers/scsi/smartpqi/smartpqi_init.c:5993 pqi_is_parity_write_stream() warn: inconsistent indenting kernel test robot
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.