From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-stable-rc:linux-4.19.y 974/4776] drivers/ata/libata-scsi.c:2423:30: error: 'SECTOR_SHIFT' undeclared; did you mean 'SOFTIRQ_SHIFT'?
Date: Sun, 20 Jun 2021 19:43:25 +0800 [thread overview]
Message-ID: <202106201915.cG1lG6G9-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 10426 bytes --]
Hi Tejun,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: 050ebdeaa48830852f690696606997b274af7148
commit: a8bb7740aa313994bfa4c21cba399f65985a8a35 [974/4776] libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks
config: powerpc-randconfig-r012-20210620 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=a8bb7740aa313994bfa4c21cba399f65985a8a35
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.19.y
git checkout a8bb7740aa313994bfa4c21cba399f65985a8a35
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
include/linux/log2.h:162:23: note: in definition of macro 'ilog2'
162 | __builtin_constant_p(n) ? \
| ^
In file included from include/scsi/scsi_cmnd.h:7,
from drivers/ata/libata-scsi.c:43:
include/linux/t10-pi.h:48:9: error: implicit declaration of function 'blk_rq_pos' [-Werror=implicit-function-declaration]
48 | return blk_rq_pos(rq) >> (shift - SECTOR_SHIFT) & 0xffffffff;
| ^~~~~~~~~~
include/linux/t10-pi.h:48:36: error: 'SECTOR_SHIFT' undeclared (first use in this function); did you mean 'SOFTIRQ_SHIFT'?
48 | return blk_rq_pos(rq) >> (shift - SECTOR_SHIFT) & 0xffffffff;
| ^~~~~~~~~~~~
| SOFTIRQ_SHIFT
In file included from include/scsi/scsi_cmnd.h:12,
from drivers/ata/libata-scsi.c:43:
include/scsi/scsi_device.h: At top level:
include/scsi/scsi_device.h:435:4: error: unknown type name 'req_flags_t'; did you mean 'vm_flags_t'?
435 | req_flags_t rq_flags, int *resid);
| ^~~~~~~~~~~
| vm_flags_t
include/scsi/scsi_device.h: In function 'scsi_execute_req':
include/scsi/scsi_device.h:442:2: error: implicit declaration of function '__scsi_execute'; did you mean 'scsi_execute'? [-Werror=implicit-function-declaration]
442 | __scsi_execute(sdev, cmd, data_direction, buffer, bufflen, \
| ^~~~~~~~~~~~~~
include/scsi/scsi_device.h:451:9: note: in expansion of macro 'scsi_execute'
451 | return scsi_execute(sdev, cmd, data_direction, buffer,
| ^~~~~~~~~~~~
In file included from drivers/ata/libata-scsi.c:43:
include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':
include/scsi/scsi_cmnd.h:214:9: error: implicit declaration of function 'blk_bidi_rq' [-Werror=implicit-function-declaration]
214 | return blk_bidi_rq(cmd->request) &&
| ^~~~~~~~~~~
In file included from include/linux/writeback.h:13,
from include/linux/memcontrol.h:31,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from drivers/ata/libata-scsi.c:51:
include/linux/blk_types.h: At top level:
include/linux/blk_types.h:29:22: error: conflicting types for 'blk_status_t'
29 | typedef u8 __bitwise blk_status_t;
| ^~~~~~~~~~~~
In file included from include/scsi/scsi_host.h:11,
from drivers/ata/libata-scsi.c:42:
include/linux/blk-mq.h:100:9: note: previous declaration of 'blk_status_t' was here
100 | typedef blk_status_t (queue_rq_fn)(struct blk_mq_hw_ctx *,
| ^~~~~~~~~~~~
drivers/ata/libata-scsi.c: In function 'ata_scsi_qc_new':
drivers/ata/libata-scsi.c:871:32: error: 'RQF_QUIET' undeclared (first use in this function); did you mean 'BIO_QUIET'?
871 | if (cmd->request->rq_flags & RQF_QUIET)
| ^~~~~~~~~
| BIO_QUIET
In file included from include/asm-generic/bug.h:5,
from arch/powerpc/include/asm/bug.h:128,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/ata/libata-scsi.c:36:
drivers/ata/libata-scsi.c: In function 'atapi_drain_needed':
drivers/ata/libata-scsi.c:1255:14: error: implicit declaration of function 'blk_rq_is_passthrough' [-Werror=implicit-function-declaration]
1255 | if (likely(!blk_rq_is_passthrough(rq)))
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:76:40: note: in definition of macro 'likely'
76 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
drivers/ata/libata-scsi.c:1258:7: error: implicit declaration of function 'blk_rq_bytes' [-Werror=implicit-function-declaration]
1258 | if (!blk_rq_bytes(rq) || op_is_write(req_op(rq)))
| ^~~~~~~~~~~~
drivers/ata/libata-scsi.c: In function 'ata_scsi_dev_config':
drivers/ata/libata-scsi.c:1273:2: error: implicit declaration of function 'blk_queue_max_hw_sectors' [-Werror=implicit-function-declaration]
1273 | blk_queue_max_hw_sectors(q, dev->max_sectors);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1281:3: error: implicit declaration of function 'blk_queue_update_dma_pad' [-Werror=implicit-function-declaration]
1281 | blk_queue_update_dma_pad(q, ATA_DMA_PAD_SZ - 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1284:35: error: dereferencing pointer to incomplete type 'struct request_queue'
1284 | buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);
| ^~
drivers/ata/libata-scsi.c:1290:3: error: implicit declaration of function 'blk_queue_dma_drain' [-Werror=implicit-function-declaration]
1290 | blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
| ^~~~~~~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1308:2: error: implicit declaration of function 'blk_queue_update_dma_alignment' [-Werror=implicit-function-declaration]
1308 | blk_queue_update_dma_alignment(q, sdev->sector_size - 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-scsi.c:1321:2: error: implicit declaration of function 'blk_queue_flush_queueable' [-Werror=implicit-function-declaration]
1321 | blk_queue_flush_queueable(q, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/fs.h:39,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:499,
from include/linux/scatterlist.h:8,
from include/scsi/scsi.h:10,
from drivers/ata/libata-scsi.c:41:
drivers/ata/libata-scsi.c: In function 'ata_scsi_rw_xlat':
drivers/ata/libata-scsi.c:1844:32: error: implicit declaration of function 'req_get_ioprio' [-Werror=implicit-function-declaration]
1844 | int class = IOPRIO_PRIO_CLASS(req_get_ioprio(rq));
| ^~~~~~~~~~~~~~
include/linux/ioprio.h:15:35: note: in definition of macro 'IOPRIO_PRIO_CLASS'
15 | #define IOPRIO_PRIO_CLASS(mask) ((mask) >> IOPRIO_CLASS_SHIFT)
| ^~~~
drivers/ata/libata-scsi.c: In function 'ata_scsiop_inq_b0':
>> drivers/ata/libata-scsi.c:2423:30: error: 'SECTOR_SHIFT' undeclared (first use in this function); did you mean 'SOFTIRQ_SHIFT'?
2423 | max_blocks = 128 << (20 - SECTOR_SHIFT);
| ^~~~~~~~~~~~
| SOFTIRQ_SHIFT
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ATA
Depends on HAS_IOMEM && BLOCK
Selected by
- AKEBONO && PPC_47x
WARNING: unmet direct dependencies detected for MMC_SDHCI
Depends on MMC && HAS_DMA
Selected by
- AKEBONO && PPC_47x
WARNING: unmet direct dependencies detected for MMC_SDHCI_PLTFM
Depends on MMC && MMC_SDHCI
Selected by
- AKEBONO && PPC_47x
vim +2423 drivers/ata/libata-scsi.c
2391
2392 static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf)
2393 {
2394 struct ata_device *dev = args->dev;
2395 u16 min_io_sectors;
2396
2397 rbuf[1] = 0xb0;
2398 rbuf[3] = 0x3c; /* required VPD size with unmap support */
2399
2400 /*
2401 * Optimal transfer length granularity.
2402 *
2403 * This is always one physical block, but for disks with a smaller
2404 * logical than physical sector size we need to figure out what the
2405 * latter is.
2406 */
2407 min_io_sectors = 1 << ata_id_log2_per_physical_sector(args->id);
2408 put_unaligned_be16(min_io_sectors, &rbuf[6]);
2409
2410 /*
2411 * Optimal unmap granularity.
2412 *
2413 * The ATA spec doesn't even know about a granularity or alignment
2414 * for the TRIM command. We can leave away most of the unmap related
2415 * VPD page entries, but we have specifify a granularity to signal
2416 * that we support some form of unmap - in thise case via WRITE SAME
2417 * with the unmap bit set.
2418 */
2419 if (ata_id_has_trim(args->id)) {
2420 u64 max_blocks = 65535 * ATA_MAX_TRIM_RNUM;
2421
2422 if (dev->horkage & ATA_HORKAGE_MAX_TRIM_128M)
> 2423 max_blocks = 128 << (20 - SECTOR_SHIFT);
2424
2425 put_unaligned_be64(max_blocks, &rbuf[36]);
2426 put_unaligned_be32(1, &rbuf[28]);
2427 }
2428
2429 return 0;
2430 }
2431
---
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: 24430 bytes --]
reply other threads:[~2021-06-20 11:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202106201915.cG1lG6G9-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 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.