scsi: core: Avoid printing an error if target_alloc() returns -ENXIO
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Mon, 26 Jul 2021 11:54:02 +0000 (17:24 +0530)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:37:26 +0000 (08:37 -0400)
commit869d9b41d4c8c7bb412c56e02a0e873141fe6c48
tree7eae1044019854fea800114fe1ce4b1a6e5dc7d7
parent110fde2fb2d3940953b5332a9c7ca296f9b9cd75
scsi: core: Avoid printing an error if target_alloc() returns -ENXIO

[ Upstream commit 70edd2e6f652f67d854981fd67f9ad0f1deaea92 ]

Avoid printing a 'target allocation failed' error if the driver
target_alloc() callback function returns -ENXIO. This return value
indicates that the corresponding H:C:T:L entry is empty.

Removing this error reduces the scan time if the user issues SCAN_WILD_CARD
scan operation through sysfs parameter on a host with a lot of empty
H:C:T:L entries.

Avoiding the printk on -ENXIO matches the behavior of the other callback
functions during scanning.

Link: https://lore.kernel.org/r/20210726115402.1936-1-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/scsi_scan.c