diff options
author | Stoyan Gaydarov <stoyboyker@gmail.com> | 2009-03-10 01:10:30 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2009-04-01 12:50:48 -0400 |
commit | 80a03e29164c76b70e6dbb1d10515820cc24487a (patch) | |
tree | ee9426ae7b76777169079e7120a8413384f128b6 /arch/ia64/sn/kernel/io_common.c | |
parent | ebf7649a4c6d37ce24c143001125cf29cc0bcf6a (diff) |
[IA64] BUG to BUG_ON changes
Replace:
if (test)
BUG();
with
BUG_ON(test);
Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn/kernel/io_common.c')
-rw-r--r-- | arch/ia64/sn/kernel/io_common.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index 0d4ffa4da1da..57f280dd9def 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c | |||
@@ -135,8 +135,7 @@ static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device, | |||
135 | } | 135 | } |
136 | 136 | ||
137 | war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL); | 137 | war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL); |
138 | if (!war_list) | 138 | BUG_ON(!war_list); |
139 | BUG(); | ||
140 | 139 | ||
141 | SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST, | 140 | SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST, |
142 | nasid, widget, __pa(war_list), 0, 0, 0 ,0); | 141 | nasid, widget, __pa(war_list), 0, 0, 0 ,0); |
@@ -180,23 +179,20 @@ sn_common_hubdev_init(struct hubdev_info *hubdev) | |||
180 | sizeof(struct sn_flush_device_kernel *); | 179 | sizeof(struct sn_flush_device_kernel *); |
181 | hubdev->hdi_flush_nasid_list.widget_p = | 180 | hubdev->hdi_flush_nasid_list.widget_p = |
182 | kzalloc(size, GFP_KERNEL); | 181 | kzalloc(size, GFP_KERNEL); |
183 | if (!hubdev->hdi_flush_nasid_list.widget_p) | 182 | BUG_ON(!hubdev->hdi_flush_nasid_list.widget_p); |
184 | BUG(); | ||
185 | 183 | ||
186 | for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) { | 184 | for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) { |
187 | size = DEV_PER_WIDGET * | 185 | size = DEV_PER_WIDGET * |
188 | sizeof(struct sn_flush_device_kernel); | 186 | sizeof(struct sn_flush_device_kernel); |
189 | sn_flush_device_kernel = kzalloc(size, GFP_KERNEL); | 187 | sn_flush_device_kernel = kzalloc(size, GFP_KERNEL); |
190 | if (!sn_flush_device_kernel) | 188 | BUG_ON(!sn_flush_device_kernel); |
191 | BUG(); | ||
192 | 189 | ||
193 | dev_entry = sn_flush_device_kernel; | 190 | dev_entry = sn_flush_device_kernel; |
194 | for (device = 0; device < DEV_PER_WIDGET; | 191 | for (device = 0; device < DEV_PER_WIDGET; |
195 | device++, dev_entry++) { | 192 | device++, dev_entry++) { |
196 | size = sizeof(struct sn_flush_device_common); | 193 | size = sizeof(struct sn_flush_device_common); |
197 | dev_entry->common = kzalloc(size, GFP_KERNEL); | 194 | dev_entry->common = kzalloc(size, GFP_KERNEL); |
198 | if (!dev_entry->common) | 195 | BUG_ON(!dev_entry->common); |
199 | BUG(); | ||
200 | if (sn_prom_feature_available(PRF_DEVICE_FLUSH_LIST)) | 196 | if (sn_prom_feature_available(PRF_DEVICE_FLUSH_LIST)) |
201 | status = sal_get_device_dmaflush_list( | 197 | status = sal_get_device_dmaflush_list( |
202 | hubdev->hdi_nasid, widget, device, | 198 | hubdev->hdi_nasid, widget, device, |
@@ -326,8 +322,7 @@ sn_common_bus_fixup(struct pci_bus *bus, | |||
326 | */ | 322 | */ |
327 | controller->platform_data = kzalloc(sizeof(struct sn_platform_data), | 323 | controller->platform_data = kzalloc(sizeof(struct sn_platform_data), |
328 | GFP_KERNEL); | 324 | GFP_KERNEL); |
329 | if (controller->platform_data == NULL) | 325 | BUG_ON(controller->platform_data == NULL); |
330 | BUG(); | ||
331 | sn_platform_data = | 326 | sn_platform_data = |
332 | (struct sn_platform_data *) controller->platform_data; | 327 | (struct sn_platform_data *) controller->platform_data; |
333 | sn_platform_data->provider_soft = provider_soft; | 328 | sn_platform_data->provider_soft = provider_soft; |