All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: linux-mtd@lists.infradead.org
Subject: [PATCH 3/5] mtd-utils: reduce linux/types.h usage
Date: Sun, 26 Oct 2025 13:00:47 -0700	[thread overview]
Message-ID: <20251026200049.25152-3-rosenp@gmail.com> (raw)
In-Reply-To: <20251026200049.25152-1-rosenp@gmail.com>

In the cases where it's needed, replace with asm variant. It's more
portable.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 nor-utils/rfddump.c              | 1 -
 nor-utils/rfdformat.c            | 1 -
 ubifs-utils/common/compr.c       | 1 -
 ubifs-utils/common/linux_types.h | 2 +-
 ubifs-utils/common/sign.c        | 1 -
 ubifs-utils/common/sort.c        | 1 +
 6 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/nor-utils/rfddump.c b/nor-utils/rfddump.c
index d6d7f68..2e9e275 100644
--- a/nor-utils/rfddump.c
+++ b/nor-utils/rfddump.c
@@ -24,7 +24,6 @@
 #include <getopt.h>
 
 #include <mtd/mtd-user.h>
-#include <linux/types.h>
 #include <mtd_swab.h>
 
 #include "common.h"
diff --git a/nor-utils/rfdformat.c b/nor-utils/rfdformat.c
index 0a3d9fb..6a78122 100644
--- a/nor-utils/rfdformat.c
+++ b/nor-utils/rfdformat.c
@@ -26,7 +26,6 @@
 #include <getopt.h>
 
 #include <mtd/mtd-user.h>
-#include <linux/types.h>
 
 #include "common.h"
 
diff --git a/ubifs-utils/common/compr.c b/ubifs-utils/common/compr.c
index 6f90151..ef540ee 100644
--- a/ubifs-utils/common/compr.c
+++ b/ubifs-utils/common/compr.c
@@ -27,7 +27,6 @@
 #ifdef WITH_LZO
 #include <lzo/lzo1x.h>
 #endif
-#include <linux/types.h>
 #ifdef WITH_ZSTD
 #include <zstd.h>
 #endif
diff --git a/ubifs-utils/common/linux_types.h b/ubifs-utils/common/linux_types.h
index ebf9ecd..c172657 100644
--- a/ubifs-utils/common/linux_types.h
+++ b/ubifs-utils/common/linux_types.h
@@ -1,7 +1,7 @@
 #ifndef __LINUX_TYPES_H__
 #define __LINUX_TYPES_H__
 
-#include <linux/types.h>
+#include <asm/types.h>
 #include <sys/types.h>
 #include <byteswap.h>
 #include <stdint.h>
diff --git a/ubifs-utils/common/sign.c b/ubifs-utils/common/sign.c
index 032a6ac..379d2e4 100644
--- a/ubifs-utils/common/sign.c
+++ b/ubifs-utils/common/sign.c
@@ -28,7 +28,6 @@
 #include <openssl/conf.h>
 #include <err.h>
 
-#include "linux_types.h"
 #include "sign.h"
 #include "ubifs.h"
 #include "defs.h"
diff --git a/ubifs-utils/common/sort.c b/ubifs-utils/common/sort.c
index d585836..a9cfa67 100644
--- a/ubifs-utils/common/sort.c
+++ b/ubifs-utils/common/sort.c
@@ -12,6 +12,7 @@
 
 #include <stdio.h>
 #include <stdbool.h>
+
 #include <linux/types.h>
 
 #include "sort.h"
-- 
2.51.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2025-10-26 20:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-26 20:00 [PATCH 1/5] mtd-utils: don't include features.h Rosen Penev
2025-10-26 20:00 ` [PATCH 2/5] mtd-utils: rbtree: just include stddef.h Rosen Penev
2025-10-26 20:00 ` Rosen Penev [this message]
2025-10-26 20:00 ` [PATCH 4/5] mtd-utils: serve_image: fix _POSIX_C_SOURCE Rosen Penev
2025-10-26 20:00 ` [PATCH 5/5] mtd-utils: add GNU_SOURCE define to c files Rosen Penev
2025-11-28 20:43   ` David Oberhollenzer
2025-11-28 20:50     ` Rosen Penev

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=20251026200049.25152-3-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=linux-mtd@lists.infradead.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.