All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: xen-devel@lists.xenproject.org
Cc: consulting@bugseng.com,
	"Nicola Vetrini" <nicola.vetrini@bugseng.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>
Subject: [XEN PATCH 2/5] x86/ioapic: use NULL as a null pointer constant
Date: Thu, 14 Dec 2023 12:44:07 +0100	[thread overview]
Message-ID: <01968117d9fc3eee6d6eca0d340d9d2edd4d6dd4.1702553835.git.nicola.vetrini@bugseng.com> (raw)
In-Reply-To: <cover.1702553835.git.nicola.vetrini@bugseng.com>

Resolves violations of MISRA C Rule 11.9.
No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/arch/x86/io_apic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index d11c880544e6..dd25ba394301 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -207,7 +207,7 @@ struct IO_APIC_route_entry **alloc_ioapic_entries(void)
 
     ioapic_entries = xmalloc_array(struct IO_APIC_route_entry *, nr_ioapics);
     if (!ioapic_entries)
-        return 0;
+        return NULL;
 
     for (apic = 0; apic < nr_ioapics; apic++) {
         ioapic_entries[apic] =
@@ -224,7 +224,7 @@ nomem:
         xfree(ioapic_entries[apic]);
     xfree(ioapic_entries);
 
-    return 0;
+    return NULL;
 }
 
 union entry_union {
-- 
2.34.1



  parent reply	other threads:[~2023-12-14 11:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 11:44 [XEN PATCH 0/5] address remaining violations of MISRA C:2012 Rule 11.9 Nicola Vetrini
2023-12-14 11:44 ` [XEN PATCH 1/5] xen/hvm: use NULL as a null pointer constant Nicola Vetrini
2023-12-14 21:29   ` Stefano Stabellini
2023-12-18 17:03     ` Jan Beulich
2023-12-14 11:44 ` Nicola Vetrini [this message]
2023-12-14 21:30   ` [XEN PATCH 2/5] x86/ioapic: " Stefano Stabellini
2023-12-18 17:04     ` Jan Beulich
2023-12-14 11:44 ` [XEN PATCH 3/5] xen/acpi: Use " Nicola Vetrini
2023-12-14 21:31   ` Stefano Stabellini
2023-12-18 17:05   ` Jan Beulich
2023-12-18 17:29     ` Nicola Vetrini
2023-12-14 11:44 ` [XEN PATCH 4/5] x86/hvm: dom0: use helper to get sizeof struct field Nicola Vetrini
2023-12-14 21:32   ` Stefano Stabellini
2023-12-19 10:44     ` Jan Beulich
2023-12-14 11:44 ` [XEN PATCH 5/5] xen/wait: address violations of MISRA C Rule 11.9 Nicola Vetrini
2023-12-14 21:33   ` Stefano Stabellini
2023-12-19 10:48   ` Jan Beulich

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=01968117d9fc3eee6d6eca0d340d9d2edd4d6dd4.1702553835.git.nicola.vetrini@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=consulting@bugseng.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 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.