* [PATCH] nvme: remove constant argument to tracepoint
@ 2023-03-30 12:44 Paolo Bonzini
2023-04-18 1:41 ` Minwoo Im
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2023-03-30 12:44 UTC (permalink / raw)
To: qemu-devel
The last argument to -pci_nvme_err_startfail_virt_state is always "OFFLINE"
due to the enclosing "if" condition requiring !sctrl->scs. Reported by
Coverity.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/nvme/ctrl.c | 4 +---
hw/nvme/trace-events | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 8b7be1420912..4e8f26dc60ad 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -7155,9 +7155,7 @@ static int nvme_start_ctrl(NvmeCtrl *n)
if (pci_is_vf(PCI_DEVICE(n)) && !sctrl->scs) {
trace_pci_nvme_err_startfail_virt_state(le16_to_cpu(sctrl->nvi),
- le16_to_cpu(sctrl->nvq),
- sctrl->scs ? "ONLINE" :
- "OFFLINE");
+ le16_to_cpu(sctrl->nvq));
return -1;
}
if (unlikely(n->cq[0])) {
diff --git a/hw/nvme/trace-events b/hw/nvme/trace-events
index 7f7837e1a281..9afddf3b951c 100644
--- a/hw/nvme/trace-events
+++ b/hw/nvme/trace-events
@@ -187,7 +187,7 @@ pci_nvme_err_startfail_asqent_sz_zero(void) "nvme_start_ctrl failed because the
pci_nvme_err_startfail_acqent_sz_zero(void) "nvme_start_ctrl failed because the admin completion queue size is zero"
pci_nvme_err_startfail_zasl_too_small(uint32_t zasl, uint32_t pagesz) "nvme_start_ctrl failed because zone append size limit %"PRIu32" is too small, needs to be >= %"PRIu32""
pci_nvme_err_startfail(void) "setting controller enable bit failed"
-pci_nvme_err_startfail_virt_state(uint16_t vq, uint16_t vi, const char *state) "nvme_start_ctrl failed due to ctrl state: vi=%u vq=%u %s"
+pci_nvme_err_startfail_virt_state(uint16_t vq, uint16_t vi) "nvme_start_ctrl failed due to ctrl state: vi=%u vq=%u"
pci_nvme_err_invalid_mgmt_action(uint8_t action) "action=0x%"PRIx8""
pci_nvme_err_ignored_mmio_vf_offline(uint64_t addr, unsigned size) "addr 0x%"PRIx64" size %d"
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvme: remove constant argument to tracepoint
2023-03-30 12:44 [PATCH] nvme: remove constant argument to tracepoint Paolo Bonzini
@ 2023-04-18 1:41 ` Minwoo Im
0 siblings, 0 replies; 2+ messages in thread
From: Minwoo Im @ 2023-04-18 1:41 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On 23-03-30 14:44:27, Paolo Bonzini wrote:
> The last argument to -pci_nvme_err_startfail_virt_state is always "OFFLINE"
> due to the enclosing "if" condition requiring !sctrl->scs. Reported by
> Coverity.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-18 1:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30 12:44 [PATCH] nvme: remove constant argument to tracepoint Paolo Bonzini
2023-04-18 1:41 ` Minwoo Im
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).