mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition
@ 2025-03-26 17:00 Ahmad Fatoum
  2025-03-26 17:00 ` [PATCH 2/3] common: elf: drop unused arch notes stubs Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-03-26 17:00 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The definition is at the end of the file too late to be used and indeed
it's used nowhere, so drop it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 fs/squashfs/squashfs.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/fs/squashfs/squashfs.c b/fs/squashfs/squashfs.c
index 5441271e45f1..7ae8c1296b87 100644
--- a/fs/squashfs/squashfs.c
+++ b/fs/squashfs/squashfs.c
@@ -243,17 +243,6 @@ static int squashfs_read(struct device *_dev, struct file *f, void *buf,
 	return insize;
 }
 
-struct squashfs_dir {
-	struct file file;
-	struct dentry dentry;
-	struct dentry root_dentry;
-	struct inode inode;
-	struct qstr nm;
-	DIR dir;
-	char d_name[256];
-	char root_d_name[256];
-};
-
 static struct fs_driver squashfs_driver = {
 	.read		= squashfs_read,
 	.type		= filetype_squashfs,
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] common: elf: drop unused arch notes stubs
  2025-03-26 17:00 [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition Ahmad Fatoum
@ 2025-03-26 17:00 ` Ahmad Fatoum
  2025-03-26 17:00 ` [PATCH 3/3] driver: drop unused dev_open/close_default stubs Ahmad Fatoum
  2025-03-27  9:17 ` [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-03-26 17:00 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

These definitions are used nowhere, so drop them.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/powerpc/include/asm/elf.h | 7 -------
 include/elf.h                  | 8 --------
 2 files changed, 15 deletions(-)

diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index bb8762b385b8..2c938adacce5 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -400,13 +400,6 @@ do {									\
 /* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */
 #define NT_SPU		1
 
-extern int arch_notes_size(void);
-extern void arch_write_notes(struct file *file);
-
-#define ELF_CORE_EXTRA_NOTES_SIZE arch_notes_size()
-#define ELF_CORE_WRITE_EXTRA_NOTES arch_write_notes(file)
-
-#define ARCH_HAVE_EXTRA_ELF_NOTES
 #endif /* CONFIG_PPC_CELL */
 
 #endif /* _ASM_POWERPC_ELF_H */
diff --git a/include/elf.h b/include/elf.h
index 8805eb4a2fc9..994db642b078 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -391,14 +391,6 @@ extern Elf64_Dyn _DYNAMIC [];
 
 #endif
 
-#ifndef ARCH_HAVE_EXTRA_ELF_NOTES
-static inline int arch_notes_size(void) { return 0; }
-static inline void arch_write_notes(struct file *file) { }
-
-#define ELF_CORE_EXTRA_NOTES_SIZE arch_notes_size()
-#define ELF_CORE_WRITE_EXTRA_NOTES arch_write_notes(file)
-#endif /* ARCH_HAVE_EXTRA_ELF_NOTES */
-
 struct elf_image {
 	struct list_head list;
 	u8 class;
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] driver: drop unused dev_open/close_default stubs
  2025-03-26 17:00 [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition Ahmad Fatoum
  2025-03-26 17:00 ` [PATCH 2/3] common: elf: drop unused arch notes stubs Ahmad Fatoum
@ 2025-03-26 17:00 ` Ahmad Fatoum
  2025-03-27  9:17 ` [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-03-26 17:00 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

These function have been unused since 2009, so drop them already.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/driver.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/include/driver.h b/include/driver.h
index 59ce1d5cc9b7..76b167166954 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -21,7 +21,6 @@
 
 #include <param.h>
 
-struct file;
 struct bus_type;
 struct generic_pm_domain;
 
@@ -353,16 +352,6 @@ ssize_t mem_copy(struct device *dev, void *dst, const void *src,
 int generic_memmap_ro(struct cdev *dev, void **map, int flags);
 int generic_memmap_rw(struct cdev *dev, void **map, int flags);
 
-static inline int dev_open_default(struct device *dev, struct file *f)
-{
-	return 0;
-}
-
-static inline int dev_close_default(struct device *dev, struct file *f)
-{
-	return 0;
-}
-
 struct bus_type {
 	char *name;
 	int (*match)(struct device *dev, struct driver *drv);
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition
  2025-03-26 17:00 [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition Ahmad Fatoum
  2025-03-26 17:00 ` [PATCH 2/3] common: elf: drop unused arch notes stubs Ahmad Fatoum
  2025-03-26 17:00 ` [PATCH 3/3] driver: drop unused dev_open/close_default stubs Ahmad Fatoum
@ 2025-03-27  9:17 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-03-27  9:17 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Wed, 26 Mar 2025 18:00:08 +0100, Ahmad Fatoum wrote:
> The definition is at the end of the file too late to be used and indeed
> it's used nowhere, so drop it.
> 
> 

Applied, thanks!

[1/3] fs: squashfs: drop unused struct squashfs_dir definition
      https://git.pengutronix.de/cgit/barebox/commit/?id=7261a61d1c33 (link may not be stable)
[2/3] common: elf: drop unused arch notes stubs
      https://git.pengutronix.de/cgit/barebox/commit/?id=765b9fe03e3c (link may not be stable)
[3/3] driver: drop unused dev_open/close_default stubs
      https://git.pengutronix.de/cgit/barebox/commit/?id=b33f6518b4ee (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-27  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-26 17:00 [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition Ahmad Fatoum
2025-03-26 17:00 ` [PATCH 2/3] common: elf: drop unused arch notes stubs Ahmad Fatoum
2025-03-26 17:00 ` [PATCH 3/3] driver: drop unused dev_open/close_default stubs Ahmad Fatoum
2025-03-27  9:17 ` [PATCH 1/3] fs: squashfs: drop unused struct squashfs_dir definition Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox