* [sashal-linux-stable:queue-4.14 24/145] drivers/ata/sata_mv.c:2117:10: warning: 'return' with a value, in function returning void
@ 2020-09-27 2:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-27 2:44 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6679 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.14
head: 7dd971d22ed262952967151a08ef9295718d4e05
commit: 15f26ca39a983e900ccad1eaacee6a2927808401 [24/145] ata: sata_mv, avoid trigerrable BUG_ON
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 7.5.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/sashal/linux-stable.git/commit/?id=15f26ca39a983e900ccad1eaacee6a2927808401
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.14
git checkout 15f26ca39a983e900ccad1eaacee6a2927808401
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/ata/sata_mv.c:683:16: warning: initialized field overwritten [-Woverride-init]
.can_queue = MV_MAX_Q_DEPTH - 1,
^~~~~~~~~~~~~~
drivers/ata/sata_mv.c:683:16: note: (near initialization for 'mv6_sht.can_queue')
drivers/ata/sata_mv.c: In function 'mv_qc_prep':
>> drivers/ata/sata_mv.c:2117:10: warning: 'return' with a value, in function returning void
return AC_ERR_INVALID;
^~~~~~~~~~~~~~
drivers/ata/sata_mv.c:2047:13: note: declared here
static void mv_qc_prep(struct ata_queued_cmd *qc)
^~~~~~~~~~
drivers/ata/sata_mv.c: In function 'mv_qc_issue':
drivers/ata/sata_mv.c:2382:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (limit_warnings > 0 && (qc->nbytes / qc->sect_size) > 1) {
^
drivers/ata/sata_mv.c:2389:2: note: here
case ATA_PROT_NODATA:
^~~~
drivers/ata/sata_mv.c: In function 'mv_chip_id':
drivers/ata/sata_mv.c:3849:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (pdev->vendor == PCI_VENDOR_ID_TTI &&
^
drivers/ata/sata_mv.c:3879:2: note: here
case chip_6042:
^~~~
At top level:
drivers/ata/sata_mv.c:799:35: warning: 'mv_pci_tbl' defined but not used [-Wunused-const-variable=]
static const struct pci_device_id mv_pci_tbl[] = {
^~~~~~~~~~
vim +/return +2117 drivers/ata/sata_mv.c
2034
2035 /**
2036 * mv_qc_prep - Host specific command preparation.
2037 * @qc: queued command to prepare
2038 *
2039 * This routine simply redirects to the general purpose routine
2040 * if command is not DMA. Else, it handles prep of the CRQB
2041 * (command request block), does some sanity checking, and calls
2042 * the SG load routine.
2043 *
2044 * LOCKING:
2045 * Inherited from caller.
2046 */
2047 static void mv_qc_prep(struct ata_queued_cmd *qc)
2048 {
2049 struct ata_port *ap = qc->ap;
2050 struct mv_port_priv *pp = ap->private_data;
2051 __le16 *cw;
2052 struct ata_taskfile *tf = &qc->tf;
2053 u16 flags = 0;
2054 unsigned in_index;
2055
2056 switch (tf->protocol) {
2057 case ATA_PROT_DMA:
2058 if (tf->command == ATA_CMD_DSM)
2059 return;
2060 /* fall-thru */
2061 case ATA_PROT_NCQ:
2062 break; /* continue below */
2063 case ATA_PROT_PIO:
2064 mv_rw_multi_errata_sata24(qc);
2065 return;
2066 default:
2067 return;
2068 }
2069
2070 /* Fill in command request block
2071 */
2072 if (!(tf->flags & ATA_TFLAG_WRITE))
2073 flags |= CRQB_FLAG_READ;
2074 WARN_ON(MV_MAX_Q_DEPTH <= qc->tag);
2075 flags |= qc->tag << CRQB_TAG_SHIFT;
2076 flags |= (qc->dev->link->pmp & 0xf) << CRQB_PMP_SHIFT;
2077
2078 /* get current queue index from software */
2079 in_index = pp->req_idx;
2080
2081 pp->crqb[in_index].sg_addr =
2082 cpu_to_le32(pp->sg_tbl_dma[qc->tag] & 0xffffffff);
2083 pp->crqb[in_index].sg_addr_hi =
2084 cpu_to_le32((pp->sg_tbl_dma[qc->tag] >> 16) >> 16);
2085 pp->crqb[in_index].ctrl_flags = cpu_to_le16(flags);
2086
2087 cw = &pp->crqb[in_index].ata_cmd[0];
2088
2089 /* Sadly, the CRQB cannot accommodate all registers--there are
2090 * only 11 bytes...so we must pick and choose required
2091 * registers based on the command. So, we drop feature and
2092 * hob_feature for [RW] DMA commands, but they are needed for
2093 * NCQ. NCQ will drop hob_nsect, which is not needed there
2094 * (nsect is used only for the tag; feat/hob_feat hold true nsect).
2095 */
2096 switch (tf->command) {
2097 case ATA_CMD_READ:
2098 case ATA_CMD_READ_EXT:
2099 case ATA_CMD_WRITE:
2100 case ATA_CMD_WRITE_EXT:
2101 case ATA_CMD_WRITE_FUA_EXT:
2102 mv_crqb_pack_cmd(cw++, tf->hob_nsect, ATA_REG_NSECT, 0);
2103 break;
2104 case ATA_CMD_FPDMA_READ:
2105 case ATA_CMD_FPDMA_WRITE:
2106 mv_crqb_pack_cmd(cw++, tf->hob_feature, ATA_REG_FEATURE, 0);
2107 mv_crqb_pack_cmd(cw++, tf->feature, ATA_REG_FEATURE, 0);
2108 break;
2109 default:
2110 /* The only other commands EDMA supports in non-queued and
2111 * non-NCQ mode are: [RW] STREAM DMA and W DMA FUA EXT, none
2112 * of which are defined/used by Linux. If we get here, this
2113 * driver needs work.
2114 */
2115 ata_port_err(ap, "%s: unsupported command: %.2x\n", __func__,
2116 tf->command);
> 2117 return AC_ERR_INVALID;
2118 }
2119 mv_crqb_pack_cmd(cw++, tf->nsect, ATA_REG_NSECT, 0);
2120 mv_crqb_pack_cmd(cw++, tf->hob_lbal, ATA_REG_LBAL, 0);
2121 mv_crqb_pack_cmd(cw++, tf->lbal, ATA_REG_LBAL, 0);
2122 mv_crqb_pack_cmd(cw++, tf->hob_lbam, ATA_REG_LBAM, 0);
2123 mv_crqb_pack_cmd(cw++, tf->lbam, ATA_REG_LBAM, 0);
2124 mv_crqb_pack_cmd(cw++, tf->hob_lbah, ATA_REG_LBAH, 0);
2125 mv_crqb_pack_cmd(cw++, tf->lbah, ATA_REG_LBAH, 0);
2126 mv_crqb_pack_cmd(cw++, tf->device, ATA_REG_DEVICE, 0);
2127 mv_crqb_pack_cmd(cw++, tf->command, ATA_REG_CMD, 1); /* last */
2128
2129 if (!(qc->flags & ATA_QCFLAG_DMAMAP))
2130 return;
2131 mv_fill_sg(qc);
2132 }
2133
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 43007 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-27 2:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-27 2:44 [sashal-linux-stable:queue-4.14 24/145] drivers/ata/sata_mv.c:2117:10: warning: 'return' with a value, in function returning void 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.