2021-03-26 18:16:59

by Muhammad Usama Anjum

[permalink] [raw]
Subject: [PATCH] xen/pciback: Fix incorrect type warnings

Correct enum pci_channel_io_normal should be used instead of putting
integer value 1.

Fix following smatch warnings:
drivers/xen/xen-pciback/pci_stub.c:805:40: warning: incorrect type in argument 2 (different base types)
drivers/xen/xen-pciback/pci_stub.c:805:40: expected restricted pci_channel_state_t [usertype] state
drivers/xen/xen-pciback/pci_stub.c:805:40: got int
drivers/xen/xen-pciback/pci_stub.c:862:40: warning: incorrect type in argument 2 (different base types)
drivers/xen/xen-pciback/pci_stub.c:862:40: expected restricted pci_channel_state_t [usertype] state
drivers/xen/xen-pciback/pci_stub.c:862:40: got int
drivers/xen/xen-pciback/pci_stub.c:973:31: warning: incorrect type in argument 2 (different base types)
drivers/xen/xen-pciback/pci_stub.c:973:31: expected restricted pci_channel_state_t [usertype] state
drivers/xen/xen-pciback/pci_stub.c:973:31: got int

Signed-off-by: Muhammad Usama Anjum <[email protected]>
---
drivers/xen/xen-pciback/pci_stub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index cb904ac83006..f8e4faa96ad6 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -802,7 +802,7 @@ static pci_ers_result_t xen_pcibk_slot_reset(struct pci_dev *dev)
"guest with no AER driver should have been killed\n");
goto end;
}
- result = common_process(psdev, 1, XEN_PCI_OP_aer_slotreset, result);
+ result = common_process(psdev, pci_channel_io_normal, XEN_PCI_OP_aer_slotreset, result);

if (result == PCI_ERS_RESULT_NONE ||
result == PCI_ERS_RESULT_DISCONNECT) {
@@ -859,7 +859,7 @@ static pci_ers_result_t xen_pcibk_mmio_enabled(struct pci_dev *dev)
"guest with no AER driver should have been killed\n");
goto end;
}
- result = common_process(psdev, 1, XEN_PCI_OP_aer_mmio, result);
+ result = common_process(psdev, pci_channel_io_normal, XEN_PCI_OP_aer_mmio, result);

if (result == PCI_ERS_RESULT_NONE ||
result == PCI_ERS_RESULT_DISCONNECT) {
@@ -970,7 +970,7 @@ static void xen_pcibk_error_resume(struct pci_dev *dev)
kill_domain_by_device(psdev);
goto end;
}
- common_process(psdev, 1, XEN_PCI_OP_aer_resume,
+ common_process(psdev, pci_channel_io_normal, XEN_PCI_OP_aer_resume,
PCI_ERS_RESULT_RECOVERED);
end:
if (psdev)
--
2.25.1


2021-03-29 07:28:43

by Jürgen Groß

[permalink] [raw]
Subject: Re: [PATCH] xen/pciback: Fix incorrect type warnings

On 26.03.21 19:14, Muhammad Usama Anjum wrote:
> Correct enum pci_channel_io_normal should be used instead of putting
> integer value 1.
>
> Fix following smatch warnings:
> drivers/xen/xen-pciback/pci_stub.c:805:40: warning: incorrect type in argument 2 (different base types)
> drivers/xen/xen-pciback/pci_stub.c:805:40: expected restricted pci_channel_state_t [usertype] state
> drivers/xen/xen-pciback/pci_stub.c:805:40: got int
> drivers/xen/xen-pciback/pci_stub.c:862:40: warning: incorrect type in argument 2 (different base types)
> drivers/xen/xen-pciback/pci_stub.c:862:40: expected restricted pci_channel_state_t [usertype] state
> drivers/xen/xen-pciback/pci_stub.c:862:40: got int
> drivers/xen/xen-pciback/pci_stub.c:973:31: warning: incorrect type in argument 2 (different base types)
> drivers/xen/xen-pciback/pci_stub.c:973:31: expected restricted pci_channel_state_t [usertype] state
> drivers/xen/xen-pciback/pci_stub.c:973:31: got int
>
> Signed-off-by: Muhammad Usama Anjum <[email protected]>

Reviewed-by: Juergen Gross <[email protected]>


Juergen


Attachments:
OpenPGP_0xB0DE9DD628BF132F.asc (3.06 kB)
OpenPGP_signature (505.00 B)
OpenPGP digital signature
Download all attachments

2021-04-13 22:01:12

by Muhammad Usama Anjum

[permalink] [raw]
Subject: Re: [PATCH] xen/pciback: Fix incorrect type warnings

Reminder!

On Mon, 2021-03-29 at 09:24 +0200, Juergen Gross wrote:
> On 26.03.21 19:14, Muhammad Usama Anjum wrote:
> > Correct enum pci_channel_io_normal should be used instead of putting
> > integer value 1.
> >
> > Fix following smatch warnings:
> > drivers/xen/xen-pciback/pci_stub.c:805:40: warning: incorrect type in argument 2 (different base types)
> > drivers/xen/xen-pciback/pci_stub.c:805:40: expected restricted pci_channel_state_t [usertype] state
> > drivers/xen/xen-pciback/pci_stub.c:805:40: got int
> > drivers/xen/xen-pciback/pci_stub.c:862:40: warning: incorrect type in argument 2 (different base types)
> > drivers/xen/xen-pciback/pci_stub.c:862:40: expected restricted pci_channel_state_t [usertype] state
> > drivers/xen/xen-pciback/pci_stub.c:862:40: got int
> > drivers/xen/xen-pciback/pci_stub.c:973:31: warning: incorrect type in argument 2 (different base types)
> > drivers/xen/xen-pciback/pci_stub.c:973:31: expected restricted pci_channel_state_t [usertype] state
> > drivers/xen/xen-pciback/pci_stub.c:973:31: got int
> >
> > Signed-off-by: Muhammad Usama Anjum <[email protected]>
>
> Reviewed-by: Juergen Gross <[email protected]>
>
>
> Juergen

2021-04-23 08:05:33

by Jürgen Groß

[permalink] [raw]
Subject: Re: [PATCH] xen/pciback: Fix incorrect type warnings

On 26.03.21 19:14, Muhammad Usama Anjum wrote:
> Correct enum pci_channel_io_normal should be used instead of putting
> integer value 1.
>
> Fix following smatch warnings:
> drivers/xen/xen-pciback/pci_stub.c:805:40: warning: incorrect type in argument 2 (different base types)
> drivers/xen/xen-pciback/pci_stub.c:805:40: expected restricted pci_channel_state_t [usertype] state
> drivers/xen/xen-pciback/pci_stub.c:805:40: got int
> drivers/xen/xen-pciback/pci_stub.c:862:40: warning: incorrect type in argument 2 (different base types)
> drivers/xen/xen-pciback/pci_stub.c:862:40: expected restricted pci_channel_state_t [usertype] state
> drivers/xen/xen-pciback/pci_stub.c:862:40: got int
> drivers/xen/xen-pciback/pci_stub.c:973:31: warning: incorrect type in argument 2 (different base types)
> drivers/xen/xen-pciback/pci_stub.c:973:31: expected restricted pci_channel_state_t [usertype] state
> drivers/xen/xen-pciback/pci_stub.c:973:31: got int
>
> Signed-off-by: Muhammad Usama Anjum <[email protected]>

Pushed to xen/tip.git for-linus-5.13


Juergen


Attachments:
OpenPGP_0xB0DE9DD628BF132F.asc (3.06 kB)
OpenPGP_signature (505.00 B)
OpenPGP digital signature
Download all attachments