Skip to contentSkip to conversation

drivers:block: Remove no longer needed FIXME comment for the function, add_disk in genhd.c

PATCH Jens Axboe 1 participant 2 messages Dec 15, 2014 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jens Axboe

author
#1 lore raw
Quoted 2 lines · Nicholas Krause

Removes unneeded fix me comment related to the function, add_disk needing error handling. The function clearly has supported this for a while and the comment is not longer needed for the function,add_disk in the file genhd.c.

But it doesn't, really. Proper error handling would be to unroll and return the error, if it happens. Right now add_disk() can't return an error.

Signature · 1 line
Jens Axboe

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#3 lore raw
Quoted 3 lines · nick

Jens,
After rechecking the function definition we can't return an error as add_disk is declared void. Should I change the function to an int and then return an error. My thinking was that there is no good way to return an error code without a breakage in the functions that call add_disk.

Please don't top post...

It's a big job, it requires properly checking and updating all block drivers. But yes, that is what would be required in removing that TODO.

Signature · 1 line
Jens Axboe