mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Perhaps a better fix- make the called function do the (possible never reached)
initialization. Do a token amount of style cleanup. Poked by: bde
This commit is contained in:
parent
dc9f26d3c3
commit
b8fdb7f911
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169823
@ -77,13 +77,16 @@ get_disk_location(PDevice pDev, int *controller, int *channel)
|
||||
IAL_ADAPTER_T *pAdapTemp;
|
||||
int i, j;
|
||||
|
||||
for (i=1, pAdapTemp = gIal_Adapter; pAdapTemp; pAdapTemp = pAdapTemp->next, i++) {
|
||||
for (j=0; j<MV_SATA_CHANNELS_NUM; j++)
|
||||
if (pDev==&pAdapTemp->VDevices[j].u.disk) {
|
||||
*controller = i;
|
||||
*channel = j;
|
||||
return;
|
||||
}
|
||||
*controller = *channel = 0;
|
||||
|
||||
for (i=1, pAdapTemp = gIal_Adapter; pAdapTemp; pAdapTemp = pAdapTemp->next, i++) {
|
||||
for (j=0; j<MV_SATA_CHANNELS_NUM; j++) {
|
||||
if (pDev == &pAdapTemp->VDevices[j].u.disk) {
|
||||
*controller = i;
|
||||
*channel = j;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,7 +154,7 @@ ioctl_ReportEvent(UCHAR event, PVOID param)
|
||||
}
|
||||
event_queue_add(&e);
|
||||
if (event==ET_DEVICE_REMOVED) {
|
||||
int controller = 0, channel = 0;
|
||||
int controller, channel;
|
||||
get_disk_location(&((PVDevice)param)->u.disk, &controller, &channel);
|
||||
hpt_printk(("Device removed: controller %d channel %d\n", controller, channel));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user