Skip to content

Commit cfb0c9d

Browse files
author
Stefan Richter
committed
firewire: remove unnecessary alloc/OOM messages
These are redundant to log messages from the mm core. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
1 parent d6c8cef commit cfb0c9d

5 files changed

Lines changed: 12 additions & 30 deletions

File tree

‎drivers/firewire/core-cdev.c‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,8 @@ static void queue_bus_reset_event(struct client *client)
389389
struct bus_reset_event *e;
390390

391391
e = kzalloc(sizeof(*e), GFP_KERNEL);
392-
if (e == NULL) {
393-
fw_notice(client->device->card, "out of memory when allocating event\n");
392+
if (e == NULL)
394393
return;
395-
}
396394

397395
fill_bus_reset_event(&e->reset, client);
398396

@@ -693,10 +691,9 @@ static void handle_request(struct fw_card *card, struct fw_request *request,
693691

694692
r = kmalloc(sizeof(*r), GFP_ATOMIC);
695693
e = kmalloc(sizeof(*e), GFP_ATOMIC);
696-
if (r == NULL || e == NULL) {
697-
fw_notice(card, "out of memory when allocating event\n");
694+
if (r == NULL || e == NULL)
698695
goto failed;
699-
}
696+
700697
r->card = card;
701698
r->request = request;
702699
r->data = payload;
@@ -930,10 +927,9 @@ static void iso_callback(struct fw_iso_context *context, u32 cycle,
930927
struct iso_interrupt_event *e;
931928

932929
e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC);
933-
if (e == NULL) {
934-
fw_notice(context->card, "out of memory when allocating event\n");
930+
if (e == NULL)
935931
return;
936-
}
932+
937933
e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT;
938934
e->interrupt.closure = client->iso_closure;
939935
e->interrupt.cycle = cycle;
@@ -950,10 +946,9 @@ static void iso_mc_callback(struct fw_iso_context *context,
950946
struct iso_interrupt_mc_event *e;
951947

952948
e = kmalloc(sizeof(*e), GFP_ATOMIC);
953-
if (e == NULL) {
954-
fw_notice(context->card, "out of memory when allocating event\n");
949+
if (e == NULL)
955950
return;
956-
}
951+
957952
e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL;
958953
e->interrupt.closure = client->iso_closure;
959954
e->interrupt.completed = fw_iso_buffer_lookup(&client->buffer,
@@ -1581,10 +1576,9 @@ void fw_cdev_handle_phy_packet(struct fw_card *card, struct fw_packet *p)
15811576

15821577
list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) {
15831578
e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC);
1584-
if (e == NULL) {
1585-
fw_notice(card, "out of memory when allocating event\n");
1579+
if (e == NULL)
15861580
break;
1587-
}
1581+
15881582
e->phy_packet.closure = client->phy_receiver_closure;
15891583
e->phy_packet.type = FW_CDEV_EVENT_PHY_PACKET_RECEIVED;
15901584
e->phy_packet.rcode = RCODE_COMPLETE;

‎drivers/firewire/core-device.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,8 @@ static void create_units(struct fw_device *device)
692692
* match the drivers id_tables against it.
693693
*/
694694
unit = kzalloc(sizeof(*unit), GFP_KERNEL);
695-
if (unit == NULL) {
696-
fw_err(device->card, "out of memory for unit\n");
695+
if (unit == NULL)
697696
continue;
698-
}
699697

700698
unit->directory = ci.p + value - 1;
701699
unit->device.bus = &fw_bus_type;

‎drivers/firewire/net.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,8 @@ static struct fwnet_fragment_info *fwnet_frag_new(
368368
}
369369

370370
new = kmalloc(sizeof(*new), GFP_ATOMIC);
371-
if (!new) {
372-
dev_err(&pd->skb->dev->dev, "out of memory\n");
371+
if (!new)
373372
return NULL;
374-
}
375373

376374
new->offset = offset;
377375
new->len = len;
@@ -414,8 +412,6 @@ static struct fwnet_partial_datagram *fwnet_pd_new(struct net_device *net,
414412
fail_w_new:
415413
kfree(new);
416414
fail:
417-
dev_err(&net->dev, "out of memory\n");
418-
419415
return NULL;
420416
}
421417

@@ -692,7 +688,6 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len,
692688

693689
skb = dev_alloc_skb(len + LL_RESERVED_SPACE(net));
694690
if (unlikely(!skb)) {
695-
dev_err(&net->dev, "out of memory\n");
696691
net->stats.rx_dropped++;
697692

698693
return -ENOMEM;

‎drivers/firewire/ohci.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3711,9 +3711,6 @@ static int pci_probe(struct pci_dev *dev,
37113711
kfree(ohci);
37123712
pmac_ohci_off(dev);
37133713
fail:
3714-
if (err == -ENOMEM)
3715-
dev_err(&dev->dev, "out of memory\n");
3716-
37173714
return err;
37183715
}
37193716

‎drivers/firewire/sbp2.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,10 +1475,8 @@ static int sbp2_scsi_queuecommand(struct Scsi_Host *shost,
14751475
}
14761476

14771477
orb = kzalloc(sizeof(*orb), GFP_ATOMIC);
1478-
if (orb == NULL) {
1479-
dev_notice(lu_dev(lu), "failed to alloc ORB\n");
1478+
if (orb == NULL)
14801479
return SCSI_MLQUEUE_HOST_BUSY;
1481-
}
14821480

14831481
/* Initialize rcode to something not RCODE_COMPLETE. */
14841482
orb->base.rcode = -1;

0 commit comments

Comments
 (0)