# Re: \[PATCH\] powerpc/papr\_scm: Move duplicate definitions to common header files

- From: Shivaprasad G Bhat \<hidden\>
- Date: 2024-01-27 19:01:32 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2024/01/2474175
- Thread: https://ratatoskr.run/nvdimm/2022/04/1746949/t.md

```text
On 1/26/24 02:46, Christophe Leroy wrote:
>
> Le 18/04/2022 à 06:38, Shivaprasad G Bhat a écrit :
>> papr_scm and ndtest share common PDSM payload structs like
>> nd_papr_pdsm_health. Presently these structs are duplicated across
>> papr_pdsm.h and ndtest.h header files. Since 'ndtest' is essentially
>> arch independent and can run on platforms other than PPC64, a way
>> needs to be deviced to avoid redundancy and duplication of PDSM
>> structs in future.
>>
>> So the patch proposes moving the PDSM header from arch/powerpc/include-
>> -/uapi/ to the generic include/uapi/linux directory. Also, there are
>> some #defines common between papr_scm and ndtest which are not exported
>> to the user space. So, move them to a header file which can be shared
>> across ndtest and papr_scm via newly introduced include/linux/papr_scm.h.
>>
>> Signed-off-by: Shivaprasad G Bhat <redacted>
>> Signed-off-by: Vaibhav Jain <redacted>
>> Suggested-by: "Aneesh Kumar K.V" <redacted>
> This patch doesn't apply, if still relevant can you please rebase and
> re-submit ?

Thanks for taking a look.


I have rebased and reposted the patch here

https://lore.kernel.org/nvdimm/170638176942.112443.2937254675538057083.stgit@ltcd48-lp2.aus.stglab.ibm.com/T/#u


Thanks!

Shivaprasad

<snip>

```
