public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Sergey Shtylyov <s.shtylyov@omp.ru>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	linux-ide@vger.kernel.org
Cc: lkp@intel.com, kbuild-all@lists.01.org
Subject: Re: [PATCH v2 2/2] ata: libata-sff: refactor ata_sff_altstatus()
Date: Thu, 17 Feb 2022 15:12:00 +0300	[thread overview]
Message-ID: <202202141714.X7UdMJUj-lkp@intel.com> (raw)
In-Reply-To: <20220213151032.4694-3-s.shtylyov@omp.ru>

Hi Sergey,

url:    https://github.com/0day-ci/linux/commits/Sergey-Shtylyov/Refactor-the-accessors-for-the-ATA-device-control-and-alternate-status-registers/20220213-231119
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b81b1829e7e39f6cebdf6e4d5484eacbceda8554
config: riscv-randconfig-m031-20220213 (https://download.01.org/0day-ci/archive/20220214/202202141714.X7UdMJUj-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/ata/libata-sff.c:1652 ata_sff_lost_interrupt() error: uninitialized symbol 'status'.

vim +/status +1652 drivers/ata/libata-sff.c

c96f1732e25362 Alan Cox        2009-03-24  1635  void ata_sff_lost_interrupt(struct ata_port *ap)
c96f1732e25362 Alan Cox        2009-03-24  1636  {
c96f1732e25362 Alan Cox        2009-03-24  1637  	u8 status;
c96f1732e25362 Alan Cox        2009-03-24  1638  	struct ata_queued_cmd *qc;
c96f1732e25362 Alan Cox        2009-03-24  1639  
c96f1732e25362 Alan Cox        2009-03-24  1640  	/* Only one outstanding command per SFF channel */
c96f1732e25362 Alan Cox        2009-03-24  1641  	qc = ata_qc_from_tag(ap, ap->link.active_tag);
3e4ec3443f70fb Tejun Heo       2010-05-10  1642  	/* We cannot lose an interrupt on a non-existent or polled command */
3e4ec3443f70fb Tejun Heo       2010-05-10  1643  	if (!qc || qc->tf.flags & ATA_TFLAG_POLLING)
c96f1732e25362 Alan Cox        2009-03-24  1644  		return;
c96f1732e25362 Alan Cox        2009-03-24  1645  	/* See if the controller thinks it is still busy - if so the command
c96f1732e25362 Alan Cox        2009-03-24  1646  	   isn't a lost IRQ but is still in progress */
57232468aca7de Sergey Shtylyov 2022-02-13  1647  	if (ata_sff_altstatus(ap, &status) && (status & ATA_BUSY))

"status" is not intialized if ata_sff_altstatus() return false.

c96f1732e25362 Alan Cox        2009-03-24  1648  		return;
c96f1732e25362 Alan Cox        2009-03-24  1649  
c96f1732e25362 Alan Cox        2009-03-24  1650  	/* There was a command running, we are no longer busy and we have
c96f1732e25362 Alan Cox        2009-03-24  1651  	   no interrupt. */
a9a79dfec23956 Joe Perches     2011-04-15 @1652  	ata_port_warn(ap, "lost interrupt (Status 0x%x)\n",
c96f1732e25362 Alan Cox        2009-03-24  1653  								status);
                                                                                                                ^^^^^^
Uninitalized.  Also the indenting is unfortunate.

c96f1732e25362 Alan Cox        2009-03-24  1654  	/* Run the host interrupt logic as if the interrupt had not been
c96f1732e25362 Alan Cox        2009-03-24  1655  	   lost */
c3b2889424c26f Tejun Heo       2010-05-19  1656  	ata_sff_port_intr(ap, qc);
c96f1732e25362 Alan Cox        2009-03-24  1657  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


  reply	other threads:[~2022-02-17 12:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-13 15:10 [PATCH 0/2] Refactor the accessors for the ATA device control and alternate status registers Sergey Shtylyov
2022-02-13 15:10 ` [PATCH v2 1/2] ata: libata-sff: refactor ata_sff_set_devctl() Sergey Shtylyov
2022-02-13 23:25   ` Damien Le Moal
2022-02-14  8:37     ` Sergey Shtylyov
2022-02-13 15:10 ` [PATCH v2 2/2] ata: libata-sff: refactor ata_sff_altstatus() Sergey Shtylyov
2022-02-17 12:12   ` Dan Carpenter [this message]
2022-02-17 16:02     ` Sergey Shtylyov
2022-02-18 22:58       ` Damien Le Moal
2022-02-18 22:59         ` Damien Le Moal
2022-02-16  7:20 ` [PATCH 0/2] Refactor the accessors for the ATA device control and alternate status registers Damien Le Moal

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=202202141714.X7UdMJUj-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=s.shtylyov@omp.ru \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox