Re: [PATCH] ata: libata: restore visibility of important messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Krzysztof,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.9 next-20240523]
[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/Krzysztof-Ol-dzki/ata-libata-restore-visibility-of-important-messages/20240526-144120
base:   linus/master
patch link:    https://lore.kernel.org/r/a116c331-530e-4d45-a32c-37c57542724a%40ans.pl
patch subject: [PATCH] ata: libata: restore visibility of important messages
config: alpha-defconfig (https://download.01.org/0day-ci/archive/20240526/202405261642.ya8nqExt-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240526/202405261642.ya8nqExt-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405261642.ya8nqExt-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/ata/libata-core.c: In function 'ata_dev_config_ncq.constprop':
>> drivers/ata/libata-core.c:2345:74: warning: 'NCQ (not used - known buggy ...' directive output truncated writing 48 bytes into a region of size 32 [-Wformat-truncation=]
    2345 |                 snprintf(desc, desc_sz, "NCQ (not used - known buggy device/host adapter)");
         |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
   drivers/ata/libata-core.c:2345:17: note: 'snprintf' output 49 bytes into a destination of size 32
    2345 |                 snprintf(desc, desc_sz, "NCQ (not used - known buggy device/host adapter)");
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ata/libata-core.c:2339:74: warning: 'NCQ (not used - known buggy ...' directive output truncated writing 35 bytes into a region of size 32 [-Wformat-truncation=]
    2339 |                 snprintf(desc, desc_sz, "NCQ (not used - known buggy device)");
         |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/ata/libata-core.c:2339:17: note: 'snprintf' output 36 bytes into a destination of size 32
    2339 |                 snprintf(desc, desc_sz, "NCQ (not used - known buggy device)");
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +2345 drivers/ata/libata-core.c

  2323	
  2324	static int ata_dev_config_ncq(struct ata_device *dev,
  2325				       char *desc, size_t desc_sz)
  2326	{
  2327		struct ata_port *ap = dev->link->ap;
  2328		int hdepth = 0, ddepth = ata_id_queue_depth(dev->id);
  2329		unsigned int err_mask;
  2330		char *aa_desc = "";
  2331	
  2332		if (!ata_id_has_ncq(dev->id)) {
  2333			desc[0] = '\0';
  2334			return 0;
  2335		}
  2336		if (!IS_ENABLED(CONFIG_SATA_HOST))
  2337			return 0;
  2338		if (dev->horkage & ATA_HORKAGE_NONCQ) {
  2339			snprintf(desc, desc_sz, "NCQ (not used - known buggy device)");
  2340			return 0;
  2341		}
  2342	
  2343		if (dev->horkage & ATA_HORKAGE_NO_NCQ_ON_ATI &&
  2344		    ata_dev_check_adapter(dev, PCI_VENDOR_ID_ATI)) {
> 2345			snprintf(desc, desc_sz, "NCQ (not used - known buggy device/host adapter)");
  2346			return 0;
  2347		}
  2348	
  2349		if (ap->flags & ATA_FLAG_NCQ) {
  2350			hdepth = min(ap->scsi_host->can_queue, ATA_MAX_QUEUE);
  2351			dev->flags |= ATA_DFLAG_NCQ;
  2352		}
  2353	
  2354		if (!(dev->horkage & ATA_HORKAGE_BROKEN_FPDMA_AA) &&
  2355			(ap->flags & ATA_FLAG_FPDMA_AA) &&
  2356			ata_id_has_fpdma_aa(dev->id)) {
  2357			err_mask = ata_dev_set_feature(dev, SETFEATURES_SATA_ENABLE,
  2358				SATA_FPDMA_AA);
  2359			if (err_mask) {
  2360				ata_dev_err(dev,
  2361					    "failed to enable AA (error_mask=0x%x)\n",
  2362					    err_mask);
  2363				if (err_mask != AC_ERR_DEV) {
  2364					dev->horkage |= ATA_HORKAGE_BROKEN_FPDMA_AA;
  2365					return -EIO;
  2366				}
  2367			} else
  2368				aa_desc = ", AA";
  2369		}
  2370	
  2371		if (hdepth >= ddepth)
  2372			snprintf(desc, desc_sz, "NCQ (depth %d)%s", ddepth, aa_desc);
  2373		else
  2374			snprintf(desc, desc_sz, "NCQ (depth %d/%d)%s", hdepth,
  2375				ddepth, aa_desc);
  2376	
  2377		if ((ap->flags & ATA_FLAG_FPDMA_AUX)) {
  2378			if (ata_id_has_ncq_send_and_recv(dev->id))
  2379				ata_dev_config_ncq_send_recv(dev);
  2380			if (ata_id_has_ncq_non_data(dev->id))
  2381				ata_dev_config_ncq_non_data(dev);
  2382			if (ata_id_has_ncq_prio(dev->id))
  2383				ata_dev_config_ncq_prio(dev);
  2384		}
  2385	
  2386		return 0;
  2387	}
  2388	

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




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux