* [PATCH] x86: pci: xen: Remove unnecessary ‘0’ values from ret
@ 2024-06-12 9:24 Li zeming
2024-06-14 14:54 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2024-06-12 9:24 UTC (permalink / raw)
To: jgross, bhelgaas, tglx, mingo, bp, dave.hansen
Cc: x86, xen-devel, linux-pci, linux-kernel, Li zeming
ret is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
arch/x86/pci/xen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 652cd53e77f6..67cb9dc9b2e7 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -267,7 +267,7 @@ static bool __read_mostly pci_seg_supported = true;
static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
- int ret = 0;
+ int ret;
struct msi_desc *msidesc;
msi_for_each_desc(msidesc, &dev->dev, MSI_DESC_NOTASSOCIATED) {
@@ -353,7 +353,7 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
bool xen_initdom_restore_msi(struct pci_dev *dev)
{
- int ret = 0;
+ int ret;
if (!xen_initial_domain())
return true;
--
2.18.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: pci: xen: Remove unnecessary ‘0’ values from ret
2024-06-12 9:24 [PATCH] x86: pci: xen: Remove unnecessary ‘0’ values from ret Li zeming
@ 2024-06-14 14:54 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2024-06-14 14:54 UTC (permalink / raw)
To: Li zeming
Cc: jgross, bhelgaas, tglx, mingo, bp, dave.hansen, x86, xen-devel,
linux-pci, linux-kernel
On Wed, 12 Jun 2024, Li zeming wrote:
> ret is assigned first, so it does not need to initialize the assignment.
While the patch seems fine, this description and the shortlog are
confusing.
--
i.
> Signed-off-by: Li zeming <zeming@nfschina.com>
> ---
> arch/x86/pci/xen.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
> index 652cd53e77f6..67cb9dc9b2e7 100644
> --- a/arch/x86/pci/xen.c
> +++ b/arch/x86/pci/xen.c
> @@ -267,7 +267,7 @@ static bool __read_mostly pci_seg_supported = true;
>
> static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
> {
> - int ret = 0;
> + int ret;
> struct msi_desc *msidesc;
>
> msi_for_each_desc(msidesc, &dev->dev, MSI_DESC_NOTASSOCIATED) {
> @@ -353,7 +353,7 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
>
> bool xen_initdom_restore_msi(struct pci_dev *dev)
> {
> - int ret = 0;
> + int ret;
>
> if (!xen_initial_domain())
> return true;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-14 14:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12 9:24 [PATCH] x86: pci: xen: Remove unnecessary ‘0’ values from ret Li zeming
2024-06-14 14:54 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox