Re: [PATCH 1/4] drm/amd/powerplay: support enabled ppfeatures retrieving and setting

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

 



On 2019-01-14 5:01 a.m., Evan Quan wrote:
> +	features_to_disable =
> +		(features_enabled ^ new_ppfeature_masks) & features_enabled;
> +	features_to_enable =
> +		(features_enabled ^ new_ppfeature_masks) ^ features_to_disable;

This is confusing and unnecessarily complicated. I think you can achieve
the same thing in a more obvious way like this:

    features_to_disable = features_enabled & ~new_pp_feature_masks;
    features_to_enable = ~features_enabled & new_pp_feature_masks;

Regards,
  Felix

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux