# Re: \[PATCH V2 8/8\] powerpc: Add the ability to save VSX without giving it up

- From: Michael Neuling \<hidden\>
- Date: 2016-01-18 04:29:06 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2016/01/9487692
- Thread: https://ratatoskr.run/linuxppc-dev/2016/01/9487666/t.md

```text

> > Also, put the #ifdef junk as part of the function so that the caller
> > doesn't have to deal with it.=20
> >=20
>=20
> Can do absolutely, however this means that in save_all I can't check if t=
he
> function needs to be called or not. For example, without CONFIG_VSX, MSR_=
VSX
> won't exist which means we might end up calling save_vsx THEN checking MS=
R_VSX
> and returning early.

MSR_VSX should exist even without CONFIG_VSX, so you should be able to
do it.

> I'm happy to defer to you and mpe on what's nicer, I would side with avoi=
ding
> the function call at the cost of ugly #ifdefs but I can always see the me=
rits
> of clean code.

I'd prefer the cleanup.  This code has been pretty bad in the past for
being a bit of an #ifdef mess, so it'd be nice to clean it up a bit if
possible.

Mikey
```
