From bdd272a95161c2743a262015db0c640b657c5a24 Mon Sep 17 00:00:00 2001 From: Richard Spiegel Date: Tue, 16 Oct 2018 13:53:05 -0700 Subject: soc/amd/stoneyridge/southbridge.c: Change comparison order Comparison should place the constant on the right side. Southbridge.c has 6 instances where the opposite happens. Reverse the order of six comparisons to eliminate checkpatch warnings: WARNING: Comparisons should place the constant on the right side of the test BUG=b:117656929 TEST=Build grunt. Change-Id: I94f17b81f845fa94599f93c0be1144ffcb8e4165 Signed-off-by: Richard Spiegel Reviewed-on: https://review.coreboot.org/29153 Reviewed-by: Marshall Dawson Reviewed-by: Martin Roth Tested-by: build bot (Jenkins) --- src/soc/amd/stoneyridge/southbridge.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c index b7ddd578d6..33330a8812 100644 --- a/src/soc/amd/stoneyridge/southbridge.c +++ b/src/soc/amd/stoneyridge/southbridge.c @@ -53,22 +53,22 @@ const static struct stoneyridge_aoac aoac_devs[] = { static int is_sata_config(void) { - return !((CONFIG_STONEYRIDGE_SATA_MODE == SataNativeIde) - || (CONFIG_STONEYRIDGE_SATA_MODE == SataLegacyIde)); + return !((SataNativeIde == CONFIG_STONEYRIDGE_SATA_MODE) + || (SataLegacyIde == CONFIG_STONEYRIDGE_SATA_MODE)); } static inline int sb_sata_enable(void) { /* True if IDE or AHCI. */ - return (CONFIG_STONEYRIDGE_SATA_MODE == SataNativeIde) || - (CONFIG_STONEYRIDGE_SATA_MODE == SataAhci); + return (SataNativeIde == CONFIG_STONEYRIDGE_SATA_MODE) || + (SataAhci == CONFIG_STONEYRIDGE_SATA_MODE); } static inline int sb_ide_enable(void) { /* True if IDE or LEGACY IDE. */ - return (CONFIG_STONEYRIDGE_SATA_MODE == SataNativeIde) || - (CONFIG_STONEYRIDGE_SATA_MODE == SataLegacyIde); + return (SataNativeIde == CONFIG_STONEYRIDGE_SATA_MODE) || + (SataLegacyIde == CONFIG_STONEYRIDGE_SATA_MODE); } void SetFchResetParams(FCH_RESET_INTERFACE *params) -- cgit v1.2.3