in my study and examine linux kernel code I encountered with function make_request_fn. in this link it says that this function type definition is in include/linux/blkdev.h, line 211 :typedef void (make_request_fn) (struct request_queue *q, struct bio *bio);but did not mention where is its implementation as source code in a .c file.my question is where is this function source code?
where is make_request_fn source code in linux kernel
linux kernel
typedef void (make_request_fn) (struct request_queue *q, struct bio *bio);This is not a function declaration. It is definition of function type. Later in the same file include/linux/blkdev.h, line 299, the same name gets the field in request_queue structure.And in file drivers/md/bcache/request.c on line 1140, there is assigned function flash_dev_make_request to this field, which makes you think that you call function make_request_fn(), but you really call flash_dev_make_request().It is really basic way of providing Encapsulation and Polymorphism and really basic OOP model in C.