lkml.org 
[lkml]   [2024]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v2] KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat'
    Date
    Hi Amit,

    Thanks for the patch. Minor comment on the patch below:

    Amit Machhiwal <amachhiw@linux.ibm.com> writes:

    <snip>

    >
    > +static inline unsigned long map_pcr_to_cap(unsigned long pcr)
    > +{
    > + unsigned long cap = 0;
    > +
    > + switch (pcr) {
    > + case PCR_ARCH_300:
    > + cap = H_GUEST_CAP_POWER9;
    > + break;
    > + case PCR_ARCH_31:
    > + cap = H_GUEST_CAP_POWER10;
    Though CONFIG_CC_IMPLICIT_FALLTHROUGH and '-Wimplicit-fallthrough'
    doesnt explicitly flag this usage, please consider using the
    'fallthrough;' keyword here.

    However you probably dont want this switch-case to fallthrough so please
    use a 'break' instead.

    > + default:
    > + break;
    > + }
    > +
    > + return cap;
    > +}
    > +
    >
    <snip>

    With the suggested change above

    Reviewed-by: Vaibhav Jain <vaibhav@linux.ibm.com>

    --
    Cheers
    ~ Vaibhav

    \
     
     \ /
      Last update: 2024-05-27 14:49    [W:2.867 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site