lkml.org 
[lkml]   [2016]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 2/3] mm, compaction: cover all compaction mode in compact_zone
    Date
    > 
    > From: Michal Hocko <mhocko@suse.com>
    >
    > the compiler is complaining after "mm, compaction: change COMPACT_
    > constants into enum"
    >
    > mm/compaction.c: In function ‘compact_zone’:
    > mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_DEFERRED’ not handled in switch [-Wswitch]
    > switch (ret) {
    > ^
    > mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_COMPLETE’ not handled in switch [-Wswitch]
    > mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_NO_SUITABLE_PAGE’ not handled in switch [-Wswitch]
    > mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_NOT_SUITABLE_ZONE’ not handled in switch [-Wswitch]
    > mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_CONTENDED’ not handled in switch [-Wswitch]
    >
    > compaction_suitable is allowed to return only COMPACT_PARTIAL,
    > COMPACT_SKIPPED and COMPACT_CONTINUE so other cases are simply
    > impossible. Put a VM_BUG_ON to catch an impossible return value.
    >
    > Signed-off-by: Michal Hocko <mhocko@suse.com>
    > ---

    Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>


    \
     
     \ /
      Last update: 2016-03-09 05:41    [W:4.088 / U:0.640 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site