diff for duplicates of <4BEA5856.9040704@bfs.de> diff --git a/a/1.txt b/N1/1.txt index 322e60f..64f5397 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -67,7 +67,7 @@ Julia Lawall schrieb: > - usp = (struct unioxx5_subd_priv *)kzalloc(sizeof(*usp), GFP_KERNEL); > + usp = kzalloc(sizeof(*usp), GFP_KERNEL); > -> if (usp = NULL) { +> if (usp == NULL) { > printk(KERN_ERR "comedi%d: erorr! --> out of memory!\n", minor); > diff --git a/drivers/staging/crystalhd/crystalhd_misc.c b/drivers/staging/crystalhd/crystalhd_misc.c > index d134667..548dc09 100644 @@ -79,7 +79,7 @@ Julia Lawall schrieb: > for (i = 0; i < BC_LINK_SG_POOL_SZ; i++) { > - temp = (uint8_t *)kzalloc(asz, GFP_KERNEL); > + temp = kzalloc(asz, GFP_KERNEL); -> if ((temp) = NULL) { +> if ((temp) == NULL) { > BCMLOG_ERR("Failed to alloc %d mem\n", asz); > return -ENOMEM; > diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.c b/drivers/staging/cx25821/cx25821-audio-upstream.c @@ -90,7 +90,8 @@ Julia Lawall schrieb: > > if (dev->input_audiofilename) { > str_length = strlen(dev->input_audiofilename); -> - dev->_audiofilename > - (char *)kmalloc(str_length + 1, GFP_KERNEL); +> - dev->_audiofilename = +> - (char *)kmalloc(str_length + 1, GFP_KERNEL); > + dev->_audiofilename = kmalloc(str_length + 1, GFP_KERNEL); > > if (!dev->_audiofilename) @@ -99,7 +100,8 @@ Julia Lawall schrieb: > } > } else { > str_length = strlen(_defaultAudioName); -> - dev->_audiofilename > - (char *)kmalloc(str_length + 1, GFP_KERNEL); +> - dev->_audiofilename = +> - (char *)kmalloc(str_length + 1, GFP_KERNEL); > + dev->_audiofilename = kmalloc(str_length + 1, GFP_KERNEL); > > if (!dev->_audiofilename) @@ -112,7 +114,8 @@ Julia Lawall schrieb: > > if (dev->input_filename_ch2) { > str_length = strlen(dev->input_filename_ch2); -> - dev->_filename_ch2 > - (char *)kmalloc(str_length + 1, GFP_KERNEL); +> - dev->_filename_ch2 = +> - (char *)kmalloc(str_length + 1, GFP_KERNEL); > + dev->_filename_ch2 = kmalloc(str_length + 1, GFP_KERNEL); > > if (!dev->_filename_ch2) @@ -121,7 +124,8 @@ Julia Lawall schrieb: > str_length + 1); > } else { > str_length = strlen(dev->_defaultname_ch2); -> - dev->_filename_ch2 > - (char *)kmalloc(str_length + 1, GFP_KERNEL); +> - dev->_filename_ch2 = +> - (char *)kmalloc(str_length + 1, GFP_KERNEL); > + dev->_filename_ch2 = kmalloc(str_length + 1, GFP_KERNEL); > > if (!dev->_filename_ch2) @@ -179,7 +183,8 @@ this look like the begin of kstrdup() > > /* Allocate memory for the TCB's (Transmit Control Block) */ > - adapter->tx_ring.tcb_ring = (struct tcb *) -> + adapter->tx_ring.tcb_ring > kcalloc(NUM_TCB, sizeof(struct tcb), GFP_ATOMIC | GFP_DMA); +> + adapter->tx_ring.tcb_ring = +> kcalloc(NUM_TCB, sizeof(struct tcb), GFP_ATOMIC | GFP_DMA); > if (!adapter->tx_ring.tcb_ring) { > dev_err(&adapter->pdev->dev, "Cannot alloc memory for TCBs\n"); > diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c @@ -187,9 +192,10 @@ this look like the begin of kstrdup() > --- a/drivers/staging/rt2860/common/cmm_data.c > +++ b/drivers/staging/rt2860/common/cmm_data.c > @@ -1424,7 +1424,7 @@ u32 deaggregate_AMSDU_announce(struct rt_rtmp_adapter *pAd, -> if ((Header802_3[12] = 0x88) && (Header802_3[13] = 0x8E)) { +> if ((Header802_3[12] == 0x88) && (Header802_3[13] == 0x8E)) { > /* avoid local heap overflow, use dyanamic allocation */ -> struct rt_mlme_queue_elem *Elem > - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), +> struct rt_mlme_queue_elem *Elem = +> - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), > + kmalloc(sizeof(struct rt_mlme_queue_elem), > MEM_ALLOC_FLAG); > if (Elem != NULL) { @@ -201,7 +207,8 @@ this look like the begin of kstrdup() > @@ -1558,7 +1558,7 @@ void RT28xxPciMlmeRadioOFF(struct rt_rtmp_adapter *pAd) > if (INFRA_ON(pAd) || ADHOC_ON(pAd)) { > struct rt_mlme_disassoc_req DisReq; -> struct rt_mlme_queue_elem *pMsgElem > - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), +> struct rt_mlme_queue_elem *pMsgElem = +> - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), > + kmalloc(sizeof(struct rt_mlme_queue_elem), > MEM_ALLOC_FLAG); > @@ -213,7 +220,8 @@ this look like the begin of kstrdup() > @@ -1087,7 +1087,7 @@ void RT28xxUsbMlmeRadioOFF(struct rt_rtmp_adapter *pAd) > if (INFRA_ON(pAd) || ADHOC_ON(pAd)) { > struct rt_mlme_disassoc_req DisReq; -> struct rt_mlme_queue_elem *pMsgElem > - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), +> struct rt_mlme_queue_elem *pMsgElem = +> - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), > + kmalloc(sizeof(struct rt_mlme_queue_elem), > MEM_ALLOC_FLAG); > @@ -237,7 +245,7 @@ this look like the begin of kstrdup() > +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c > @@ -1435,7 +1435,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen) > -> if(*(t++) = MFIE_TYPE_CHALLENGE){ +> if(*(t++) == MFIE_TYPE_CHALLENGE){ > *chlen = *(t++); > - *challenge = (u8*)kmalloc(*chlen, GFP_ATOMIC); > + *challenge = kmalloc(*chlen, GFP_ATOMIC); @@ -256,7 +264,7 @@ kmalloc() will succeed ? > - new_crypt = (struct ieee80211_crypt_data *) > - kmalloc(sizeof(*new_crypt), GFP_KERNEL); > + new_crypt = kmalloc(sizeof(*new_crypt), GFP_KERNEL); -> if (new_crypt = NULL) { +> if (new_crypt == NULL) { > ret = -ENOMEM; > goto done; > @@ -2953,7 +2952,7 @@ int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_poin @@ -265,7 +273,7 @@ kmalloc() will succeed ? > > - param = (struct ieee_param *)kmalloc(p->length, GFP_KERNEL); > + param = kmalloc(p->length, GFP_KERNEL); -> if (param = NULL){ +> if (param == NULL){ > ret = -ENOMEM; > goto out; > diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c @@ -291,7 +299,7 @@ kmalloc() will succeed ? > //ethertype = (payload[6] << 8) | payload[7]; > - rxb = (struct ieee80211_rxb*)kmalloc(sizeof(struct ieee80211_rxb),GFP_ATOMIC); > + rxb = kmalloc(sizeof(struct ieee80211_rxb), GFP_ATOMIC); -> if(rxb = NULL) +> if(rxb == NULL) > { > IEEE80211_DEBUG(IEEE80211_DL_ERR,"%s(): kmalloc rxb error\n",__FUNCTION__); > diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c @@ -300,7 +308,7 @@ kmalloc() will succeed ? > +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c > @@ -1800,7 +1800,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen) > -> if(*(t++) = MFIE_TYPE_CHALLENGE){ +> if(*(t++) == MFIE_TYPE_CHALLENGE){ > *chlen = *(t++); > - *challenge = (u8*)kmalloc(*chlen, GFP_ATOMIC); > + *challenge = kmalloc(*chlen, GFP_ATOMIC); @@ -318,7 +326,7 @@ kmalloc() will succeed ? > - new_crypt = (struct ieee80211_crypt_data *) > - kmalloc(sizeof(*new_crypt), GFP_KERNEL); > + new_crypt = kmalloc(sizeof(*new_crypt), GFP_KERNEL); -> if (new_crypt = NULL) { +> if (new_crypt == NULL) { > ret = -ENOMEM; > goto done; > @@ -3592,7 +3591,7 @@ int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_poin @@ -327,7 +335,7 @@ kmalloc() will succeed ? > > - param = (struct ieee_param *)kmalloc(p->length, GFP_KERNEL); > + param = kmalloc(p->length, GFP_KERNEL); -> if (param = NULL){ +> if (param == NULL){ > ret = -ENOMEM; > goto out; > diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c @@ -340,7 +348,7 @@ kmalloc() will succeed ? > > - ipw = (struct ieee_param *)kmalloc(p->length, GFP_KERNEL); > + ipw = kmalloc(p->length, GFP_KERNEL); -> if (ipw = NULL){ +> if (ipw == NULL){ > ret = -ENOMEM; > goto out; > diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c @@ -353,7 +361,7 @@ kmalloc() will succeed ? > > - ieee->pHTInfo = (RT_HIGH_THROUGHPUT*)kzalloc(sizeof(RT_HIGH_THROUGHPUT), GFP_KERNEL); > + ieee->pHTInfo = kzalloc(sizeof(RT_HIGH_THROUGHPUT), GFP_KERNEL); -> if (ieee->pHTInfo = NULL) +> if (ieee->pHTInfo == NULL) > { > IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for HTInfo\n"); > diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c @@ -366,7 +374,7 @@ kmalloc() will succeed ? > //ethertype = (payload[6] << 8) | payload[7]; > - rxb = (struct ieee80211_rxb*)kmalloc(sizeof(struct ieee80211_rxb),GFP_ATOMIC); > + rxb = kmalloc(sizeof(struct ieee80211_rxb), GFP_ATOMIC); -> if(rxb = NULL) +> if(rxb == NULL) > { > IEEE80211_DEBUG(IEEE80211_DL_ERR,"%s(): kmalloc rxb error\n",__FUNCTION__); > diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c @@ -375,7 +383,7 @@ kmalloc() will succeed ? > +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c > @@ -1557,7 +1557,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen) > -> if(*(t++) = MFIE_TYPE_CHALLENGE){ +> if(*(t++) == MFIE_TYPE_CHALLENGE){ > *chlen = *(t++); > - *challenge = (u8*)kmalloc(*chlen, GFP_ATOMIC); > + *challenge = kmalloc(*chlen, GFP_ATOMIC); diff --git a/a/content_digest b/N1/content_digest index bcc0573..12ed685 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\0Pine.LNX.4.64.1005112026300.4330@ask.diku.dk\0" "From\0walter harms <wharms@bfs.de>\0" "Subject\0Re: [PATCH 3/5] drivers/staging: Drop memory allocation cast\0" - "Date\0Wed, 12 May 2010 07:27:18 +0000\0" + "Date\0Wed, 12 May 2010 09:27:18 +0200\0" "To\0Julia Lawall <julia@diku.dk>\0" "Cc\0Greg Kroah-Hartman <gregkh@suse.de>" devel@driverdev.osuosl.org @@ -78,7 +78,7 @@ "> -\tusp = (struct unioxx5_subd_priv *)kzalloc(sizeof(*usp), GFP_KERNEL);\n" "> +\tusp = kzalloc(sizeof(*usp), GFP_KERNEL);\n" "> \n" - "> \tif (usp = NULL) {\n" + "> \tif (usp == NULL) {\n" "> \t\tprintk(KERN_ERR \"comedi%d: erorr! --> out of memory!\\n\", minor);\n" "> diff --git a/drivers/staging/crystalhd/crystalhd_misc.c b/drivers/staging/crystalhd/crystalhd_misc.c\n" "> index d134667..548dc09 100644\n" @@ -90,7 +90,7 @@ "> \tfor (i = 0; i < BC_LINK_SG_POOL_SZ; i++) {\n" "> -\t\ttemp = (uint8_t *)kzalloc(asz, GFP_KERNEL);\n" "> +\t\ttemp = kzalloc(asz, GFP_KERNEL);\n" - "> \t\tif ((temp) = NULL) {\n" + "> \t\tif ((temp) == NULL) {\n" "> \t\t\tBCMLOG_ERR(\"Failed to alloc %d mem\\n\", asz);\n" "> \t\t\treturn -ENOMEM;\n" "> diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.c b/drivers/staging/cx25821/cx25821-audio-upstream.c\n" @@ -101,7 +101,8 @@ "> \n" "> \tif (dev->input_audiofilename) {\n" "> \t\tstr_length = strlen(dev->input_audiofilename);\n" - "> -\t\tdev->_audiofilename > -\t\t (char *)kmalloc(str_length + 1, GFP_KERNEL);\n" + "> -\t\tdev->_audiofilename =\n" + "> -\t\t (char *)kmalloc(str_length + 1, GFP_KERNEL);\n" "> +\t\tdev->_audiofilename = kmalloc(str_length + 1, GFP_KERNEL);\n" "> \n" "> \t\tif (!dev->_audiofilename)\n" @@ -110,7 +111,8 @@ "> \t\t}\n" "> \t} else {\n" "> \t\tstr_length = strlen(_defaultAudioName);\n" - "> -\t\tdev->_audiofilename > -\t\t (char *)kmalloc(str_length + 1, GFP_KERNEL);\n" + "> -\t\tdev->_audiofilename =\n" + "> -\t\t (char *)kmalloc(str_length + 1, GFP_KERNEL);\n" "> +\t\tdev->_audiofilename = kmalloc(str_length + 1, GFP_KERNEL);\n" "> \n" "> \t\tif (!dev->_audiofilename)\n" @@ -123,7 +125,8 @@ "> \n" "> \tif (dev->input_filename_ch2) {\n" "> \t\tstr_length = strlen(dev->input_filename_ch2);\n" - "> -\t\tdev->_filename_ch2 > -\t\t (char *)kmalloc(str_length + 1, GFP_KERNEL);\n" + "> -\t\tdev->_filename_ch2 =\n" + "> -\t\t (char *)kmalloc(str_length + 1, GFP_KERNEL);\n" "> +\t\tdev->_filename_ch2 = kmalloc(str_length + 1, GFP_KERNEL);\n" "> \n" "> \t\tif (!dev->_filename_ch2)\n" @@ -132,7 +135,8 @@ "> \t\t str_length + 1);\n" "> \t} else {\n" "> \t\tstr_length = strlen(dev->_defaultname_ch2);\n" - "> -\t\tdev->_filename_ch2 > -\t\t (char *)kmalloc(str_length + 1, GFP_KERNEL);\n" + "> -\t\tdev->_filename_ch2 =\n" + "> -\t\t (char *)kmalloc(str_length + 1, GFP_KERNEL);\n" "> +\t\tdev->_filename_ch2 = kmalloc(str_length + 1, GFP_KERNEL);\n" "> \n" "> \t\tif (!dev->_filename_ch2)\n" @@ -190,7 +194,8 @@ "> \n" "> \t/* Allocate memory for the TCB's (Transmit Control Block) */\n" "> -\tadapter->tx_ring.tcb_ring = (struct tcb *)\n" - "> +\tadapter->tx_ring.tcb_ring > \t\tkcalloc(NUM_TCB, sizeof(struct tcb), GFP_ATOMIC | GFP_DMA);\n" + "> +\tadapter->tx_ring.tcb_ring =\n" + "> \t\tkcalloc(NUM_TCB, sizeof(struct tcb), GFP_ATOMIC | GFP_DMA);\n" "> \tif (!adapter->tx_ring.tcb_ring) {\n" "> \t\tdev_err(&adapter->pdev->dev, \"Cannot alloc memory for TCBs\\n\");\n" "> diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c\n" @@ -198,9 +203,10 @@ "> --- a/drivers/staging/rt2860/common/cmm_data.c\n" "> +++ b/drivers/staging/rt2860/common/cmm_data.c\n" "> @@ -1424,7 +1424,7 @@ u32 deaggregate_AMSDU_announce(struct rt_rtmp_adapter *pAd,\n" - "> \t\tif ((Header802_3[12] = 0x88) && (Header802_3[13] = 0x8E)) {\n" + "> \t\tif ((Header802_3[12] == 0x88) && (Header802_3[13] == 0x8E)) {\n" "> \t\t\t/* avoid local heap overflow, use dyanamic allocation */\n" - "> \t\t\tstruct rt_mlme_queue_elem *Elem > -\t\t\t (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem),\n" + "> \t\t\tstruct rt_mlme_queue_elem *Elem =\n" + "> -\t\t\t (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem),\n" "> +\t\t\t kmalloc(sizeof(struct rt_mlme_queue_elem),\n" "> \t\t\t\t\t\t\tMEM_ALLOC_FLAG);\n" "> \t\t\tif (Elem != NULL) {\n" @@ -212,7 +218,8 @@ "> @@ -1558,7 +1558,7 @@ void RT28xxPciMlmeRadioOFF(struct rt_rtmp_adapter *pAd)\n" "> \t\tif (INFRA_ON(pAd) || ADHOC_ON(pAd)) {\n" "> \t\t\tstruct rt_mlme_disassoc_req DisReq;\n" - "> \t\t\tstruct rt_mlme_queue_elem *pMsgElem > -\t\t\t (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem),\n" + "> \t\t\tstruct rt_mlme_queue_elem *pMsgElem =\n" + "> -\t\t\t (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem),\n" "> +\t\t\t kmalloc(sizeof(struct rt_mlme_queue_elem),\n" "> \t\t\t\t\t\t\tMEM_ALLOC_FLAG);\n" "> \n" @@ -224,7 +231,8 @@ "> @@ -1087,7 +1087,7 @@ void RT28xxUsbMlmeRadioOFF(struct rt_rtmp_adapter *pAd)\n" "> \t\tif (INFRA_ON(pAd) || ADHOC_ON(pAd)) {\n" "> \t\t\tstruct rt_mlme_disassoc_req DisReq;\n" - "> \t\t\tstruct rt_mlme_queue_elem *pMsgElem > -\t\t\t (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem),\n" + "> \t\t\tstruct rt_mlme_queue_elem *pMsgElem =\n" + "> -\t\t\t (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem),\n" "> +\t\t\t kmalloc(sizeof(struct rt_mlme_queue_elem),\n" "> \t\t\t\t\t\t\tMEM_ALLOC_FLAG);\n" "> \n" @@ -248,7 +256,7 @@ "> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c\n" "> @@ -1435,7 +1435,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)\n" "> \n" - "> \t\tif(*(t++) = MFIE_TYPE_CHALLENGE){\n" + "> \t\tif(*(t++) == MFIE_TYPE_CHALLENGE){\n" "> \t\t\t*chlen = *(t++);\n" "> -\t\t\t*challenge = (u8*)kmalloc(*chlen, GFP_ATOMIC);\n" "> +\t\t\t*challenge = kmalloc(*chlen, GFP_ATOMIC);\n" @@ -267,7 +275,7 @@ "> -\t\tnew_crypt = (struct ieee80211_crypt_data *)\n" "> -\t\t\tkmalloc(sizeof(*new_crypt), GFP_KERNEL);\n" "> +\t\tnew_crypt = kmalloc(sizeof(*new_crypt), GFP_KERNEL);\n" - "> \t\tif (new_crypt = NULL) {\n" + "> \t\tif (new_crypt == NULL) {\n" "> \t\t\tret = -ENOMEM;\n" "> \t\t\tgoto done;\n" "> @@ -2953,7 +2952,7 @@ int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_poin\n" @@ -276,7 +284,7 @@ "> \n" "> -\tparam = (struct ieee_param *)kmalloc(p->length, GFP_KERNEL);\n" "> +\tparam = kmalloc(p->length, GFP_KERNEL);\n" - "> \tif (param = NULL){\n" + "> \tif (param == NULL){\n" "> \t\tret = -ENOMEM;\n" "> \t\tgoto out;\n" "> diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c\n" @@ -302,7 +310,7 @@ "> \t//ethertype = (payload[6] << 8) | payload[7];\n" "> -\trxb = (struct ieee80211_rxb*)kmalloc(sizeof(struct ieee80211_rxb),GFP_ATOMIC);\n" "> +\trxb = kmalloc(sizeof(struct ieee80211_rxb), GFP_ATOMIC);\n" - "> \tif(rxb = NULL)\n" + "> \tif(rxb == NULL)\n" "> \t{\n" "> \t\tIEEE80211_DEBUG(IEEE80211_DL_ERR,\"%s(): kmalloc rxb error\\n\",__FUNCTION__);\n" "> diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c\n" @@ -311,7 +319,7 @@ "> +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c\n" "> @@ -1800,7 +1800,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)\n" "> \n" - "> \t\tif(*(t++) = MFIE_TYPE_CHALLENGE){\n" + "> \t\tif(*(t++) == MFIE_TYPE_CHALLENGE){\n" "> \t\t\t*chlen = *(t++);\n" "> -\t\t\t*challenge = (u8*)kmalloc(*chlen, GFP_ATOMIC);\n" "> +\t\t\t*challenge = kmalloc(*chlen, GFP_ATOMIC);\n" @@ -329,7 +337,7 @@ "> -\t\tnew_crypt = (struct ieee80211_crypt_data *)\n" "> -\t\t\tkmalloc(sizeof(*new_crypt), GFP_KERNEL);\n" "> +\t\tnew_crypt = kmalloc(sizeof(*new_crypt), GFP_KERNEL);\n" - "> \t\tif (new_crypt = NULL) {\n" + "> \t\tif (new_crypt == NULL) {\n" "> \t\t\tret = -ENOMEM;\n" "> \t\t\tgoto done;\n" "> @@ -3592,7 +3591,7 @@ int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_poin\n" @@ -338,7 +346,7 @@ "> \n" "> -\tparam = (struct ieee_param *)kmalloc(p->length, GFP_KERNEL);\n" "> +\tparam = kmalloc(p->length, GFP_KERNEL);\n" - "> \tif (param = NULL){\n" + "> \tif (param == NULL){\n" "> \t\tret = -ENOMEM;\n" "> \t\tgoto out;\n" "> diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c\n" @@ -351,7 +359,7 @@ "> \n" "> - ipw = (struct ieee_param *)kmalloc(p->length, GFP_KERNEL);\n" "> + ipw = kmalloc(p->length, GFP_KERNEL);\n" - "> if (ipw = NULL){\n" + "> if (ipw == NULL){\n" "> ret = -ENOMEM;\n" "> goto out;\n" "> diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c\n" @@ -364,7 +372,7 @@ "> \n" "> -\tieee->pHTInfo = (RT_HIGH_THROUGHPUT*)kzalloc(sizeof(RT_HIGH_THROUGHPUT), GFP_KERNEL);\n" "> +\tieee->pHTInfo = kzalloc(sizeof(RT_HIGH_THROUGHPUT), GFP_KERNEL);\n" - "> \tif (ieee->pHTInfo = NULL)\n" + "> \tif (ieee->pHTInfo == NULL)\n" "> \t{\n" "> \t\tIEEE80211_DEBUG(IEEE80211_DL_ERR, \"can't alloc memory for HTInfo\\n\");\n" "> diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c\n" @@ -377,7 +385,7 @@ "> \t//ethertype = (payload[6] << 8) | payload[7];\n" "> -\trxb = (struct ieee80211_rxb*)kmalloc(sizeof(struct ieee80211_rxb),GFP_ATOMIC);\n" "> +\trxb = kmalloc(sizeof(struct ieee80211_rxb), GFP_ATOMIC);\n" - "> \tif(rxb = NULL)\n" + "> \tif(rxb == NULL)\n" "> \t{\n" "> \t\tIEEE80211_DEBUG(IEEE80211_DL_ERR,\"%s(): kmalloc rxb error\\n\",__FUNCTION__);\n" "> diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c\n" @@ -386,7 +394,7 @@ "> +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c\n" "> @@ -1557,7 +1557,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)\n" "> \n" - "> \t\tif(*(t++) = MFIE_TYPE_CHALLENGE){\n" + "> \t\tif(*(t++) == MFIE_TYPE_CHALLENGE){\n" "> \t\t\t*chlen = *(t++);\n" "> -\t\t\t*challenge = (u8*)kmalloc(*chlen, GFP_ATOMIC);\n" "> +\t\t\t*challenge = kmalloc(*chlen, GFP_ATOMIC);\n" @@ -403,4 +411,4 @@ "re,\n" wh -3c4d272754e8dbd31f3747b76baacc71f5b226498aae8f265750d7d7ffd9c08f +4c78d803d371cb3c30cecb8080cc8b348acf2183784fdedf90a6339694e3b6f2
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.