public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: gregkh@linuxfoundation.org
Cc: aliceryhl@google.com, linux-kernel@vger.kernel.org,
	 linux-next@vger.kernel.org, ojeda@kernel.org,
	sfr@canb.auug.org.au
Subject: [PATCH] miscdevice: rust: use build_error! macro instead of function
Date: Fri, 10 Jan 2025 10:14:59 +0000	[thread overview]
Message-ID: <20250110101459.536726-1-aliceryhl@google.com> (raw)
In-Reply-To: <CAH5fLgjgEeGbd5NUhG1tEKKoj5+cKkuiq25BdeApjtx7SvnkEQ@mail.gmail.com>

The function called build_error is an implementation detail of the macro
of the same name. Thus, update miscdevice to use the macro rather than
the function. See [1] for more information on this.

This use the macro with the kernel:: prefix as it has not yet been added
to the prelude.

Link: https://lore.kernel.org/all/20241123222849.350287-2-ojeda@kernel.org/ [1]
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
 rust/kernel/miscdevice.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs
index ebc82e7dfc80..dfb363630c70 100644
--- a/rust/kernel/miscdevice.rs
+++ b/rust/kernel/miscdevice.rs
@@ -134,7 +134,7 @@ fn ioctl(
         _cmd: u32,
         _arg: usize,
     ) -> Result<isize> {
-        kernel::build_error(VTABLE_DEFAULT_ERROR)
+        kernel::build_error!(VTABLE_DEFAULT_ERROR)
     }
 
     /// Handler for ioctls.
@@ -151,7 +151,7 @@ fn compat_ioctl(
         _cmd: u32,
         _arg: usize,
     ) -> Result<isize> {
-        kernel::build_error(VTABLE_DEFAULT_ERROR)
+        kernel::build_error!(VTABLE_DEFAULT_ERROR)
     }
 
     /// Show info for this fd.
@@ -160,7 +160,7 @@ fn show_fdinfo(
         _m: &SeqFile,
         _file: &File,
     ) {
-        kernel::build_error(VTABLE_DEFAULT_ERROR)
+        kernel::build_error!(VTABLE_DEFAULT_ERROR)
     }
 }
 

base-commit: 7687c66c18c66d4ccd9949c6f641c0e7b5773483
-- 
2.47.1.613.gc27f4b7a9f-goog


  reply	other threads:[~2025-01-10 10:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10  5:28 linux-next: build failure after merge of the rust tree Stephen Rothwell
2025-01-10  9:28 ` Alice Ryhl
2025-01-10  9:34   ` Greg Kroah-Hartman
2025-01-10  9:41     ` Alice Ryhl
2025-01-10 10:07       ` Alice Ryhl
2025-01-10 10:14         ` Alice Ryhl [this message]
2025-01-10 10:38           ` [PATCH] miscdevice: rust: use build_error! macro instead of function Miguel Ojeda
2025-01-10 12:23             ` Greg KH
2025-01-10 12:32               ` Alice Ryhl
2025-01-10 10:08       ` linux-next: build failure after merge of the rust tree Miguel Ojeda
2025-01-10 10:16     ` Miguel Ojeda
2025-01-10 10:38       ` Miguel Ojeda

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=20250110101459.536726-1-aliceryhl@google.com \
    --to=aliceryhl@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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