Skip to content

Commit

Permalink
[BONDING]: fix sparse gfp nocast warnings
Browse files Browse the repository at this point in the history
Fix implicit nocast warnings in bonding code:
drivers/net/bonding/bond_main.c:1302:49: warning: implicit cast to nocast type

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Randy Dunlap authored and David S. Miller committed Oct 5, 2005
1 parent 7b5b3f3 commit de54f39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1289,12 +1289,13 @@ static void bond_mc_list_destroy(struct bonding *bond)
/*
* Copy all the Multicast addresses from src to the bonding device dst
*/
static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond, int gpf_flag)
static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond,
unsigned int __nocast gfp_flag)
{
struct dev_mc_list *dmi, *new_dmi;

for (dmi = mc_list; dmi; dmi = dmi->next) {
new_dmi = kmalloc(sizeof(struct dev_mc_list), gpf_flag);
new_dmi = kmalloc(sizeof(struct dev_mc_list), gfp_flag);

if (!new_dmi) {
/* FIXME: Potential memory leak !!! */
Expand Down

0 comments on commit de54f39

Please sign in to comment.