Skip to contentSkip to conversation

mtd: Drop superfluous const qualifier

PATCH In review Andy Shevchenko 3 participants 3 messages Oct 21, 2024 – Nov 25, 2024 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: Drop superfluous const qualifier

The compiler will ignore it anyway:

include/linux/mtd/mtd.h:342:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

---
 include/linux/mtd/mtd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mtd/mtd.h +1 -1
index 6751fb52c5a5..3ffcd40807d0 100644
@@ -339,7 +339,7 @@ static inline void mtd_set_ofnode(struct mtd_info *mtd, ofnode node)
 	dev_set_ofnode(mtd->dev, node);
 }
 
-static inline const ofnode mtd_get_ofnode(struct mtd_info *mtd)
+static inline ofnode mtd_get_ofnode(struct mtd_info *mtd)
 {
 	return dev_ofnode(mtd->dev);
 }
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Andy Shevchenko

The compiler will ignore it anyway:

include/linux/mtd/mtd.h:342:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

---
 include/linux/mtd/mtd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
include/linux/mtd/mtd.h +1 -2
index 6751fb52c5a5..3ffcd40807d0 100644
@@ -339,7 +339,7 @@ static inline void mtd_set_ofnode(struct mtd_info *mtd, ofnode node)
        dev_set_ofnode(mtd->dev, node);
 }
 
-static inline const ofnode mtd_get_ofnode(struct mtd_info *mtd)
+static inline ofnode mtd_get_ofnode(struct mtd_info *mtd)
 {
        return dev_ofnode(mtd->dev);
 }
--

2.43.0.rc1.1336.g36b5255a03ac

#2 lore raw
In reply to Andy Shevchenko
Quoted 5 lines · Andy Shevchenko

The compiler will ignore it anyway:

include/linux/mtd/mtd.h:342:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom