On 12/16/25 2:32 PM, Dave Hansen wrote:
On 12/15/25 15:33, Ross Philipson wrote:
+static u64 sl_txt_read(u32 reg)
+{
+       return readq((void *)(u64)(TXT_PRIV_CONFIG_REGS_BASE + reg));
+}
+
+static void sl_txt_write(u32 reg, u64 val)
+{
+       writeq(val, (void *)(u64)(TXT_PRIV_CONFIG_REGS_BASE + reg));
+}

Man, that's a lot of casting. If TXT_PRIV_CONFIG_REGS_BASE were just a
pointer to being with, it could be:

        writeq(val, TXT_PRIV_CONFIG_REGS_BASE + reg);

Right?

Indeed, we can simplify this per your suggestion.


This _looks_ like it was just written and then had casts added to it
until it compiled.

Thank you for you feedback so far.

Ross

Reply via email to