From mboxrd@z Thu Jan 1 00:00:00 1970 From: rgroner@rtd.com (Rob Groner) Date: Wed, 20 Apr 2016 16:37:07 -0400 Subject: single, comprehensive kernel data types document? In-Reply-To: <20160415201538.GA19579@kroah.com> References: <20160415122724.GA7389@kroah.com> <20160415155909.GA13082@osadl.at> <20160415161832.GA25094@kroah.com> <16162.1460740039@turing-police.cc.vt.edu> <20160415201538.GA19579@kroah.com> Message-ID: <1461184627.2053.6.camel@rtd-VirtualBox> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Sorry if this isn't related, it seemed like it was... I recently discovered one of our drivers isn't written correctly for 64-bit. It uses a uint32_t to hold an address. Whoops. In previous drivers when I've needed to hold an address, I've used an "unsigned long", as (so far as I could tell) that would give me the correct number of bytes whether on 32 or 64-bit systems. Now that I have to fix this driver, I'd rather do whatever the "standard" method is for storing an address value. Looking at code in the kernel and linux/types.h, I see "phys_addr_t and dma_addr_t. Is that what I want to use? What if it's a virtual address? void *? Thanks. Rob