Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323132
b: refs/heads/master
c: 1ec3ddf
h: refs/heads/master
v: v3
  • Loading branch information
Silas Boyd-Wickizer authored and Jean Delvare committed Sep 23, 2012
1 parent 1bf5c5f commit 274c693
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 53 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0bf7a7056c7b39502008feb484b95a5877cdf59d
refs/heads/master: 1ec3ddfd27a77db55b8c0e80bcd27c656473fb96
57 changes: 18 additions & 39 deletions trunk/drivers/edac/edac_mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,36 +199,6 @@ void *edac_align_ptr(void **p, unsigned size, int n_elems)
return (void *)(((unsigned long)ptr) + align - r);
}

static void _edac_mc_free(struct mem_ctl_info *mci)
{
int i, chn, row;
struct csrow_info *csr;
const unsigned int tot_dimms = mci->tot_dimms;
const unsigned int tot_channels = mci->num_cschannel;
const unsigned int tot_csrows = mci->nr_csrows;

if (mci->dimms) {
for (i = 0; i < tot_dimms; i++)
kfree(mci->dimms[i]);
kfree(mci->dimms);
}
if (mci->csrows) {
for (row = 0; row < tot_csrows; row++) {
csr = mci->csrows[row];
if (csr) {
if (csr->channels) {
for (chn = 0; chn < tot_channels; chn++)
kfree(csr->channels[chn]);
kfree(csr->channels);
}
kfree(csr);
}
}
kfree(mci->csrows);
}
kfree(mci);
}

/**
* edac_mc_alloc: Allocate and partially fill a struct mem_ctl_info structure
* @mc_num: Memory controller number
Expand Down Expand Up @@ -443,7 +413,24 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
return mci;

error:
_edac_mc_free(mci);
if (mci->dimms) {
for (i = 0; i < tot_dimms; i++)
kfree(mci->dimms[i]);
kfree(mci->dimms);
}
if (mci->csrows) {
for (chn = 0; chn < tot_channels; chn++) {
csr = mci->csrows[chn];
if (csr) {
for (chn = 0; chn < tot_channels; chn++)
kfree(csr->channels[chn]);
kfree(csr);
}
kfree(mci->csrows[i]);
}
kfree(mci->csrows);
}
kfree(mci);

return NULL;
}
Expand All @@ -458,14 +445,6 @@ void edac_mc_free(struct mem_ctl_info *mci)
{
edac_dbg(1, "\n");

/* If we're not yet registered with sysfs free only what was allocated
* in edac_mc_alloc().
*/
if (!device_is_registered(&mci->dev)) {
_edac_mc_free(mci);
return;
}

/* the mci instance is freed here, when the sysfs object is dropped */
edac_unregister_sysfs(mci);
}
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/hwmon/via-cputemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ static int __init via_cputemp_init(void)
if (err)
goto exit;

get_online_cpus();
for_each_online_cpu(i) {
struct cpuinfo_x86 *c = &cpu_data(i);

Expand All @@ -347,12 +348,14 @@ static int __init via_cputemp_init(void)

#ifndef CONFIG_HOTPLUG_CPU
if (list_empty(&pdev_list)) {
put_online_cpus();
err = -ENODEV;
goto exit_driver_unreg;
}
#endif

register_hotcpu_notifier(&via_cputemp_cpu_notifier);
put_online_cpus();
return 0;

#ifndef CONFIG_HOTPLUG_CPU
Expand All @@ -367,6 +370,7 @@ static void __exit via_cputemp_exit(void)
{
struct pdev_entry *p, *n;

get_online_cpus();
unregister_hotcpu_notifier(&via_cputemp_cpu_notifier);
mutex_lock(&pdev_list_mutex);
list_for_each_entry_safe(p, n, &pdev_list, list) {
Expand All @@ -375,6 +379,7 @@ static void __exit via_cputemp_exit(void)
kfree(p);
}
mutex_unlock(&pdev_list_mutex);
put_online_cpus();
platform_driver_unregister(&via_cputemp_driver);
}

Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/scsi/bnx2i/bnx2i_hwi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,9 +1264,6 @@ int bnx2i_send_fw_iscsi_init_msg(struct bnx2i_hba *hba)
int rc = 0;
u64 mask64;

memset(&iscsi_init, 0x00, sizeof(struct iscsi_kwqe_init1));
memset(&iscsi_init2, 0x00, sizeof(struct iscsi_kwqe_init2));

bnx2i_adjust_qp_size(hba);

iscsi_init.flags =
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,9 +1315,8 @@ static void complete_scsi_command(struct CommandList *cp)
}
break;
case CMD_PROTOCOL_ERR:
cmd->result = DID_ERROR << 16;
dev_warn(&h->pdev->dev, "cp %p has "
"protocol error\n", cp);
"protocol error \n", cp);
break;
case CMD_HARDWARE_ERR:
cmd->result = DID_ERROR << 16;
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/scsi/mpt2sas/mpt2sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,13 +1209,6 @@ _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc)
u16 message_control;


/* Check whether controller SAS2008 B0 controller,
if it is SAS2008 B0 controller use IO-APIC instead of MSIX */
if (ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2008 &&
ioc->pdev->revision == 0x01) {
return -EINVAL;
}

base = pci_find_capability(ioc->pdev, PCI_CAP_ID_MSIX);
if (!base) {
dfailprintk(ioc, printk(MPT2SAS_INFO_FMT "msix not "
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/virtio_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static void virtscsi_map_sgl(struct scatterlist *sg, unsigned int *p_idx,
int i;

for_each_sg(table->sgl, sg_elem, table->nents, i)
sg[idx++] = *sg_elem;
sg_set_buf(&sg[idx++], sg_virt(sg_elem), sg_elem->length);

*p_idx = idx;
}
Expand Down

0 comments on commit 274c693

Please sign in to comment.