[to-be-updated] mm-vmstat-fix-wenum-enum-conversion-warning-in-vmstath.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: mm/vmstat: fix -Wenum-enum-conversion warning in vmstat.h
has been removed from the -mm tree.  Its filename was
     mm-vmstat-fix-wenum-enum-conversion-warning-in-vmstath.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Shivamurthy Shastri <shivamurthy.shastri@xxxxxxxxxxxxx>
Subject: mm/vmstat: fix -Wenum-enum-conversion warning in vmstat.h
Date: Fri, 21 Jun 2024 13:16:04 +0200

A W=1 build with -Wenum-enum-conversion enabled, results in the following
build warning due to an arithmetic operation between different enumeration
types 'enum node_stat_item' and 'enum lru_list':

  include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
    514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
        |                               ~~~~~~~~~~~ ^ ~~~

Address this by casting lru to the proper type.

Link: https://lkml.kernel.org/r/20240621111604.25330-1-shivamurthy.shastri@xxxxxxxxxxxxx
Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@xxxxxxxxxxxxx>
Reviewed-by: Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/vmstat.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/vmstat.h~mm-vmstat-fix-wenum-enum-conversion-warning-in-vmstath
+++ a/include/linux/vmstat.h
@@ -495,7 +495,7 @@ static inline const char *node_stat_name
 
 static inline const char *lru_list_name(enum lru_list lru)
 {
-	return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
+	return node_stat_name(NR_LRU_BASE + (enum node_stat_item)lru) + 3; // skip "nr_"
 }
 
 static inline const char *writeback_stat_name(enum writeback_stat_item item)
_

Patches currently in -mm which might be from shivamurthy.shastri@xxxxxxxxxxxxx are






[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux