struct scatterlist { void *page; int offset; }; void mmc_blk_issue_rq() { int blocks; struct scatterlist sg; void *buf = &blocks; memset(&sg, 0, sizeof(sg)); sg.page = (unsigned long)buf - 0x80000000 >> 12; sg.offset = (unsigned long)buf & 1 << 12; if (blocks) foo(); }