On Saturday 07 November 2015 19:47:49 Amitoj Kaur Chawla wrote:
On Sat, Nov 7, 2015 at 4:26 AM, Arnd Bergmann arnd@arndb.de wrote:
For all I can tell, the ioprofile variable is not unused, and its layout is fixed, so we cannot remove the io_profile_start_time or change it to another format. Can you look again and see how it gets used by the driver?
I checked again and apart from the above code I mentioned, the ioprofile variable is used in two structures:
bfa_itnim_s which is defined in bfa_fcpim.h file bfa_bsg_itnim_ioprofile_s defined in bfad_bsg.h file
However, the io_profile_start_time variable is not used anywhere else.
I'm sorry but I didn't understand why the layout is fixed?
The way to find it is as follows: it's normally a reasonable assumption that you can 'git grep' for a struct member by name and find all users. However, if you find that it's write-only or read-only, it's more likely that grep is missing something important compared with a bug in the driver.
When the struct member is not used anywhere but only written, look for any code location that copies the entire struct, or another struct that contains a reference to this struct. (Same thing if it's never written but only read).
The ioprofile data gets passed around through a small number of functions, try to understand what kind of data it contains and where it gets stored in the end. I admit this is a bit tricky here, in this case you can stop tracing the callers at the point where you get to FC_BSG_HST_VENDOR and find out what that is about.
Arnd