i'm new to C language. I have some questions to ask regarding structs.
For example:
static inline void *mmc_priv(struct mmc_host *host)
{
return (void *)host->private;
}
struct mmc_host
{
unsigned long private[0] ____cacheline_aligned;
};
struct mmc_davinci_host *host = NULL;
struct mmc_host *mmc = NULL;
host = mmc_priv(mmc);
host->mmc = mmc;
*for the struct mmc_davinci_host
please refer to this site http://lxr.free-electrons.com/source/drivers/mmc/host/davinci_mmc.c#L167*
The function mmc_priv()
returns a void pointer. So, where does host
store the returned address since host
is a struct type?
Thank you.