Rabinarayan Panigrahi
Rabinarayan Panigrahi

Reputation: 181

usage of PTR_ALIGN in Linux

i have PCI device driver where it has used PTR_ALIGN but don't understand its usage. So can some one explain me why PTR_ALIGN used or any reference to it which i can follow.

Thanks rabi

Upvotes: 2

Views: 877

Answers (1)

dear_tzvi
dear_tzvi

Reputation: 745

PTR_ALIGN is used to align the pointer, as unsigned long variable.

In this case, I think it is best to look on the implementation in Kernel - See http://lxr.free-electrons.com/source/include/linux/kernel.h#L51 for example, don't forget to use the correct Kernel version.

Upvotes: 3

Related Questions