Re: [PATCH 1/4 V2] powerpc/85xx: Add support for 85xx cpu type detection

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

 



On 07/10/2013 02:39:01 AM, Haijun Zhang wrote:
+/* Get current SOC Version */
+#define GET_SVR()	(mfspr(SPRN_SVR))

Unnecessary parens. Why do we need GET_SVR(), versus opencoding it? Note that U-Boot (which this is patterned after) doesn't have GET_SVR(), so code that wants to work on both can't use it anyway.

+#define IS_SVR_REV(svr, maj, min) \
+	((SVR_MAJ(svr) == (maj)) && (SVR_MIN(svr) == (min)))

I don't think IS_SVR_REV is needed. Callers can just do "if (SVR_REV(svr) == 0x30)" or whatever, especially since we're relying on them to do this for greater/less than comparisons.

-Scott
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux