All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c
@ 2015-03-22  0:49 Vatika Harlalka
  2015-03-22  0:49 ` [PATCH 02/10] Staging: rtl8712: Fix invalid assignment '|=' " Vatika Harlalka
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:49 UTC (permalink / raw)
  To: outreachy-kernel

Fix Sparse warning due to incorrect assignment type in ieee80211.c :

drivers/staging/rtl8712/ieee80211.c:182:20: warning: incorrect type in assignment
drivers/staging/rtl8712/ieee80211.c:182:20: expected unsigned short
drivers/staging/rtl8712/ieee80211.c:182:20: got restricted __le16

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/ieee80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
index 5786808..d75a7b0 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -179,7 +179,7 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
 	sz += 8;
 	ie += sz;
 	/*beacon interval : 2bytes*/
-	*(u16 *)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod);
+	*(u16 *)ie = (u16)pdev_network->Configuration.BeaconPeriod;
 	sz += 2;
 	ie += 2;
 	/*capability info*/
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 02/10] Staging: rtl8712: Fix invalid assignment '|=' in ieee80211.c
  2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
@ 2015-03-22  0:49 ` Vatika Harlalka
  2015-03-22  0:50 ` [PATCH 04/10] Staging: rtl8712: Fix incorrect assignment type in rtl871x_cmd.c Vatika Harlalka
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:49 UTC (permalink / raw)
  To: outreachy-kernel

This patch fixes the following Sparse warning in ieee80211.c- 
drivers/staging/rtl8712/ieee80211.c:187:20: warning: invalid assignment: |=
drivers/staging/rtl8712/ieee80211.c:187:20: left side has type unsigned short
drivers/staging/rtl8712/ieee80211.c:187:20: right side has type restricted __le16
drivers/staging/rtl8712/ieee80211.c:189:28: warning: invalid assignment: |=
drivers/staging/rtl8712/ieee80211.c:189:28: left side has type unsigned short
drivers/staging/rtl8712/ieee80211.c:189:28: right side has type restricted __le16
drivers/staging/rtl8712/ieee80211.c:191:28: warning: invalid assignment: |=
drivers/staging/rtl8712/ieee80211.c:191:28: left side has type unsigned short
drivers/staging/rtl8712/ieee80211.c:191:28: right side has type restricted __le16

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/ieee80211.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
index d75a7b0..3c38311 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -184,11 +184,11 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
 	ie += 2;
 	/*capability info*/
 	*(u16 *)ie = 0;
-	*(u16 *)ie |= cpu_to_le16(cap_IBSS);
+	*(u16 *)ie |= cap_IBSS;
 	if (pregistrypriv->preamble == PREAMBLE_SHORT)
-		*(u16 *)ie |= cpu_to_le16(cap_ShortPremble);
+		*(u16 *)ie |= cap_ShortPremble;
 	if (pdev_network->Privacy)
-		*(u16 *)ie |= cpu_to_le16(cap_Privacy);
+		*(u16 *)ie |= cap_Privacy;
 	sz += 2;
 	ie += 2;
 	/*SSID*/
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 04/10] Staging: rtl8712: Fix incorrect assignment type in rtl871x_cmd.c
  2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
  2015-03-22  0:49 ` [PATCH 02/10] Staging: rtl8712: Fix invalid assignment '|=' " Vatika Harlalka
@ 2015-03-22  0:50 ` Vatika Harlalka
  2015-03-22  0:51 ` [PATCH 05/10] Staging: rtl8712: Fix cast to restricted __le16 in hal_init.c Vatika Harlalka
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:50 UTC (permalink / raw)
  To: outreachy-kernel

This patch fixes the following sparse warning in rtl871x_cmd.c
drivers/staging/rtl8712/rtl871x_cmd.c:240:31: warning: incorrect type in assignment
drivers/staging/rtl8712/rtl871x_cmd.c:240:31: expected signed int 
drivers/staging/rtl8712/rtl871x_cmd.c:240:31: got restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:241:35: warning: incorrect type in assignment
drivers/staging/rtl8712/rtl871x_cmd.c:241:35: expected signed int
drivers/staging/rtl8712/rtl871x_cmd.c:241:35: got restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:246:41: warning: incorrect type in assignment
drivers/staging/rtl8712/rtl871x_cmd.c:246:41: expected signed int
drivers/staging/rtl8712/rtl871x_cmd.c:246:41: got restricted __le32
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/rtl871x_cmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index 1a1c38f..4cb595f 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -237,13 +237,13 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
 	}
 	init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara,
 				   GEN_CMD_CODE(_SiteSurvey));
-	psurveyPara->bsslimit = cpu_to_le32(48);
-	psurveyPara->passive_mode = cpu_to_le32(pmlmepriv->passive_mode);
+	psurveyPara->bsslimit = 48;
+	psurveyPara->passive_mode = pmlmepriv->passive_mode;
 	psurveyPara->ss_ssidlen = 0;
 	memset(psurveyPara->ss_ssid, 0, IW_ESSID_MAX_SIZE + 1);
 	if ((pssid != NULL) && (pssid->SsidLength)) {
 		memcpy(psurveyPara->ss_ssid, pssid->Ssid, pssid->SsidLength);
-		psurveyPara->ss_ssidlen = cpu_to_le32(pssid->SsidLength);
+		psurveyPara->ss_ssidlen = pssid->SsidLength;
 	}
 	set_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
 	r8712_enqueue_cmd(pcmdpriv, ph2c);
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 05/10] Staging: rtl8712: Fix cast to restricted __le16 in hal_init.c
  2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
  2015-03-22  0:49 ` [PATCH 02/10] Staging: rtl8712: Fix invalid assignment '|=' " Vatika Harlalka
  2015-03-22  0:50 ` [PATCH 04/10] Staging: rtl8712: Fix incorrect assignment type in rtl871x_cmd.c Vatika Harlalka
@ 2015-03-22  0:51 ` Vatika Harlalka
  2015-03-22  0:51 ` [PATCH 06/10] Staging: rtl8712: Fix invalid assignment '|=' " Vatika Harlalka
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:51 UTC (permalink / raw)
  To: outreachy-kernel

This patch fixes the following Sparse warnings:
drivers/staging/rtl8712/hal_init.c:124:29: warning: cast to restricted __le16
drivers/staging/rtl8712/hal_init.c:125:27: warning: cast to restricted __le16
drivers/staging/rtl8712/hal_init.c:127:29: warning: cast to restricted __le32
drivers/staging/rtl8712/hal_init.c:129:33: warning: cast to restricted __le32
drivers/staging/rtl8712/hal_init.c:131:33: warning: cast to restricted __le32
drivers/staging/rtl8712/hal_init.c:133:30: warning: cast to restricted __le32

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/hal_init.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index 0a1c631..7c5956a 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -121,16 +121,16 @@ static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
 
 static void update_fwhdr(struct fw_hdr	*pfwhdr, const u8 *pmappedfw)
 {
-	pfwhdr->signature = le16_to_cpu(*(u16 *)pmappedfw);
-	pfwhdr->version = le16_to_cpu(*(u16 *)(pmappedfw+2));
+	pfwhdr->signature = *(u16 *)pmappedfw;
+	pfwhdr->version = *(u16 *)(pmappedfw+2);
 	/* define the size of boot loader */
-	pfwhdr->dmem_size = le32_to_cpu(*(uint *)(pmappedfw+4));
+	pfwhdr->dmem_size = *(uint *)(pmappedfw+4);
 	/* define the size of FW in IMEM */
-	pfwhdr->img_IMEM_size = le32_to_cpu(*(uint *)(pmappedfw+8));
+	pfwhdr->img_IMEM_size = *(uint *)(pmappedfw+8);
 	/* define the size of FW in SRAM */
-	pfwhdr->img_SRAM_size = le32_to_cpu(*(uint *)(pmappedfw+12));
+	pfwhdr->img_SRAM_size = *(uint *)(pmappedfw+12);
 	/* define the size of DMEM variable */
-	pfwhdr->fw_priv_sz = le32_to_cpu(*(uint *)(pmappedfw+16));
+	pfwhdr->fw_priv_sz = *(uint *)(pmappedfw+16);
 }
 
 static u8 chk_fwhdr(struct fw_hdr *pfwhdr, u32 ulfilelength)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 06/10] Staging: rtl8712: Fix invalid assignment '|=' in hal_init.c
  2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
                   ` (2 preceding siblings ...)
  2015-03-22  0:51 ` [PATCH 05/10] Staging: rtl8712: Fix cast to restricted __le16 in hal_init.c Vatika Harlalka
@ 2015-03-22  0:51 ` Vatika Harlalka
  2015-03-22  0:52 ` [PATCH 07/10] Staging: rtl8712: Fix invalid assignment '|=' in rtl8712_xmit.c Vatika Harlalka
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:51 UTC (permalink / raw)
  To: outreachy-kernel

This patch fixes the following Sparse errors in hal_init.c:

drivers/staging/rtl8712/hal_init.c:198:49: warning: invalid assignment: |=
drivers/staging/rtl8712/hal_init.c:198:49: left side has type unsigned int
drivers/staging/rtl8712/hal_init.c:198:49: right side has type restricted __le32
drivers/staging/rtl8712/hal_init.c:200:41: warning: invalid assignment: |=
drivers/staging/rtl8712/hal_init.c:200:41: left side has type unsigned int
drivers/staging/rtl8712/hal_init.c:200:41: right side has type restricted __le32
drivers/staging/rtl8712/hal_init.c:227:49: warning: invalid assignment: |=
drivers/staging/rtl8712/hal_init.c:227:49: left side has type unsigned int
drivers/staging/rtl8712/hal_init.c:227:49: right side has type restricted __le32
drivers/staging/rtl8712/hal_init.c:229:41: warning: invalid assignment: |=
drivers/staging/rtl8712/hal_init.c:229:41: left side has type unsigned int
drivers/staging/rtl8712/hal_init.c:229:41: right side has type restricted __le32
drivers/staging/rtl8712/hal_init.c:281:33: warning: invalid assignment: |=
drivers/staging/rtl8712/hal_init.c:281:33: left side has type unsigned int
drivers/staging/rtl8712/hal_init.c:281:33: right side has type restricted __le32
drivers/staging/rtl8712/hal_init.c:282:33: warning: invalid assignment: |=
drivers/staging/rtl8712/hal_init.c:282:33: left side has type unsigned int
drivers/staging/rtl8712/hal_init.c:282:33: right side has type restricted __le32

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/hal_init.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index 7c5956a..954b6fe 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -195,9 +195,9 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
 				dump_imem_sz = MAX_DUMP_FWSZ;
 			else {
 				dump_imem_sz = imem_sz;
-				ptx_desc->txdw0 |= cpu_to_le32(BIT(28));
+				ptx_desc->txdw0 |= BIT(28);
 			}
-			ptx_desc->txdw0 |= cpu_to_le32(dump_imem_sz &
+			ptx_desc->txdw0 |= (dump_imem_sz &
 						       0x0000ffff);
 			memcpy(ppayload, ptr, dump_imem_sz);
 			r8712_write_mem(padapter, RTL8712_DMA_VOQ,
@@ -224,9 +224,9 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
 				dump_emem_sz = MAX_DUMP_FWSZ;
 			else {
 				dump_emem_sz = emem_sz;
-				ptx_desc->txdw0 |= cpu_to_le32(BIT(28));
+				ptx_desc->txdw0 |= BIT(28);
 			}
-			ptx_desc->txdw0 |= cpu_to_le32(dump_emem_sz &
+			ptx_desc->txdw0 |= (dump_emem_sz &
 						       0x0000ffff);
 			memcpy(ppayload, ptr, dump_emem_sz);
 			r8712_write_mem(padapter, RTL8712_DMA_VOQ,
@@ -278,8 +278,8 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
 		}
 		/* 5.Download DMEM code size and Load EMEM Code Section */
 		memset(ptx_desc, 0, TXDESC_SIZE);
-		ptx_desc->txdw0 |= cpu_to_le32(fwhdr.fw_priv_sz&0x0000ffff);
-		ptx_desc->txdw0 |= cpu_to_le32(BIT(28));
+		ptx_desc->txdw0 |= fwhdr.fw_priv_sz&0x0000ffff;
+		ptx_desc->txdw0 |= BIT(28);
 		memcpy(ppayload, &fwhdr.fwpriv, fwhdr.fw_priv_sz);
 		r8712_write_mem(padapter, RTL8712_DMA_VOQ,
 			  fwhdr.fw_priv_sz + TXDESC_SIZE, (u8 *)ptx_desc);
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 07/10] Staging: rtl8712: Fix invalid assignment '|=' in rtl8712_xmit.c
  2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
                   ` (3 preceding siblings ...)
  2015-03-22  0:51 ` [PATCH 06/10] Staging: rtl8712: Fix invalid assignment '|=' " Vatika Harlalka
@ 2015-03-22  0:52 ` Vatika Harlalka
  2015-03-22  0:52 ` [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:52 UTC (permalink / raw)
  To: outreachy-kernel

This patch is to fix Sparse warnings related to
invalid assignment '|=' in rtl8712_xmit.c

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_xmit.c | 46 +++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index a3093ac..732e774 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -436,7 +436,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 	memcpy(&txdesc_mp, ptxdesc, sizeof(struct tx_desc));
 	memset(ptxdesc, 0, sizeof(struct tx_desc));
 	/* offset 0 */
-	ptxdesc->txdw0 |= cpu_to_le32(sz&0x0000ffff);
+	ptxdesc->txdw0 |= sz&0x0000ffff;
 	if (pdvobj->ishighspeed) {
 		if (((sz + TXDESC_SIZE) % 512) == 0)
 			blnSetTxDescOffset = 1;
@@ -450,17 +450,17 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 	}
 	if (blnSetTxDescOffset) {
 		/* 32 bytes for TX Desc + 8 bytes pending */
-		ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE+OFFSET_SZ + 8) <<
-			      OFFSET_SHT) & 0x00ff0000);
+		ptxdesc->txdw0 |= ((TXDESC_SIZE+OFFSET_SZ + 8) <<
+			      OFFSET_SHT) & 0x00ff0000;
 	} else {
 		/* default = 32 bytes for TX Desc */
-		ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE+OFFSET_SZ) <<
-				  OFFSET_SHT) & 0x00ff0000);
+		ptxdesc->txdw0 |= ((TXDESC_SIZE+OFFSET_SZ) <<
+				  OFFSET_SHT) & 0x00ff0000;
 	}
-	ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);
+	ptxdesc->txdw0 |= OWN | FSG | LSG;
 	if (pxmitframe->frame_tag == DATA_FRAMETAG) {
 		/* offset 4 */
-		ptxdesc->txdw1 |= cpu_to_le32((pattrib->mac_id)&0x1f);
+		ptxdesc->txdw1 |= (pattrib->mac_id)&0x1f;
 
 #ifdef CONFIG_R8712_TX_AGGR
 		/* dirty workaround, need to check if it is aggr cmd. */
@@ -493,28 +493,28 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 		pattrib->qsel = 0x13;
 #else
 		qsel = (uint)(pattrib->qsel & 0x0000001f);
-		ptxdesc->txdw1 |= cpu_to_le32((qsel << QSEL_SHT) & 0x00001f00);
+		ptxdesc->txdw1 |= (qsel << QSEL_SHT) & 0x00001f00;
 #endif
 		if (!pqospriv->qos_option)
-			ptxdesc->txdw1 |= cpu_to_le32(BIT(16));/*Non-QoS*/
+			ptxdesc->txdw1 |= BIT(16);/*Non-QoS*/
 		if ((pattrib->encrypt > 0) && !pattrib->bswenc) {
 			switch (pattrib->encrypt) {	/*SEC_TYPE*/
 			case _WEP40_:
 			case _WEP104_:
-				ptxdesc->txdw1 |= cpu_to_le32((0x01 << 22) &
+				ptxdesc->txdw1 |= ((0x01 << 22) &
 						  0x00c00000);
 				/*KEY_ID when WEP is used;*/
-				ptxdesc->txdw1 |= cpu_to_le32((psecuritypriv->
+				ptxdesc->txdw1 |= ((psecuritypriv->
 						  PrivacyKeyIndex << 17) &
 						  0x00060000);
 				break;
 			case _TKIP_:
 			case _TKIP_WTMIC_:
-				ptxdesc->txdw1 |= cpu_to_le32((0x02 << 22) &
+				ptxdesc->txdw1 |= ((0x02 << 22) &
 						  0x00c00000);
 				break;
 			case _AES_:
-				ptxdesc->txdw1 |= cpu_to_le32((0x03 << 22) &
+				ptxdesc->txdw1 |= ((0x03 << 22) &
 						  0x00c00000);
 				break;
 			case _NO_PRIVACY_:
@@ -524,7 +524,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 		}
 		/*offset 8*/
 		if (bmcst)
-			ptxdesc->txdw2 |= cpu_to_le32(BMC);
+			ptxdesc->txdw2 |= BMC;
 
 		/*offset 12*/
 		/* f/w will increase the seqnum by itself, driver pass the
@@ -534,7 +534,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 		 * the correct mapping between AC&Endpoint,
 		 * the purpose is that correct mapping lets the MAC release
 		 * the AC Queue list correctly. */
-		ptxdesc->txdw3 = cpu_to_le32((pattrib->priority << SEQ_SHT) &
+		ptxdesc->txdw3 = ((pattrib->priority << SEQ_SHT) &
 				 0x0fff0000);
 		if ((pattrib->ether_type != 0x888e) &&
 		    (pattrib->ether_type != 0x0806) &&
@@ -542,7 +542,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 			/*Not EAP & ARP type data packet*/
 			if (phtpriv->ht_option == 1) { /*B/G/N Mode*/
 				if (phtpriv->ampdu_enable != true)
-					ptxdesc->txdw2 |= cpu_to_le32(BK);
+					ptxdesc->txdw2 |= BK;
 			}
 		} else {
 			/* EAP data packet and ARP packet.
@@ -560,8 +560,8 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 			/* offset 8 */
 			ptxdesc->txdw2 = cpu_to_le32(ptxdesc_mp->txdw2);
 			if (bmcst)
-				ptxdesc->txdw2 |= cpu_to_le32(BMC);
-			ptxdesc->txdw2 |= cpu_to_le32(BK);
+				ptxdesc->txdw2 |= BMC;
+			ptxdesc->txdw2 |= BK;
 			/* offset 16 */
 			ptxdesc->txdw4 = cpu_to_le32(ptxdesc_mp->txdw4);
 			/* offset 20 */
@@ -572,11 +572,11 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 		/* offset 4 */
 		ptxdesc->txdw1 |= (0x05) & 0x1f;/*CAM_ID(MAC_ID), default=5;*/
 		qsel = (uint)(pattrib->qsel & 0x0000001f);
-		ptxdesc->txdw1 |= cpu_to_le32((qsel << QSEL_SHT) & 0x00001f00);
-		ptxdesc->txdw1 |= cpu_to_le32(BIT(16));/* Non-QoS */
+		ptxdesc->txdw1 |= (qsel << QSEL_SHT) & 0x00001f00;
+		ptxdesc->txdw1 |= BIT(16);/* Non-QoS */
 		/* offset 8 */
 		if (bmcst)
-			ptxdesc->txdw2 |= cpu_to_le32(BMC);
+			ptxdesc->txdw2 |= BMC;
 		/* offset 12 */
 		/* f/w will increase the seqnum by itself, driver pass the
 		 * correct priority to fw
@@ -594,11 +594,11 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 	} else if (pxmitframe->frame_tag == TXAGG_FRAMETAG) {
 		/* offset 4 */
 		qsel = 0x13;
-		ptxdesc->txdw1 |= cpu_to_le32((qsel << QSEL_SHT) & 0x00001f00);
+		ptxdesc->txdw1 |= (qsel << QSEL_SHT) & 0x00001f00;
 	} else {
 		/* offset 4 */
 		qsel = (uint)(pattrib->priority&0x0000001f);
-		ptxdesc->txdw1 |= cpu_to_le32((qsel << QSEL_SHT) & 0x00001f00);
+		ptxdesc->txdw1 |= (qsel << QSEL_SHT) & 0x00001f00;
 		/*offset 8*/
 		/*offset 12*/
 		ptxdesc->txdw3 = cpu_to_le32((pattrib->seqnum << SEQ_SHT) &
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type in rtl8712_xmit.c
  2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
                   ` (4 preceding siblings ...)
  2015-03-22  0:52 ` [PATCH 07/10] Staging: rtl8712: Fix invalid assignment '|=' in rtl8712_xmit.c Vatika Harlalka
@ 2015-03-22  0:52 ` Vatika Harlalka
  2015-03-23  6:49   ` [Outreachy kernel] " Julia Lawall
  2015-03-23 21:37   ` Greg KH
  2015-03-22  0:52 ` [PATCH 09/10] Staging: rtl8712: Fix cast to restricted __le32 in rtl871x_mlme.c Vatika Harlalka
  2015-03-22  0:52 ` [PATCH 10/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
  7 siblings, 2 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:52 UTC (permalink / raw)
  To: outreachy-kernel

This patch is to fix Sparse warnings due to incorrect assignment
type in rtl8712_xmit.c

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_xmit.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index 732e774..c0c86ef 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -550,22 +550,22 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 			 * This will maybe make the handshake smooth.
 			 */
 			/*driver uses data rate*/
-			ptxdesc->txdw4 = cpu_to_le32(0x80000000);
-			ptxdesc->txdw5 = cpu_to_le32(0x001f8000);/*1M*/
+			ptxdesc->txdw4 = 0x80000000;
+			ptxdesc->txdw5 = 0x001f8000;/*1M*/
 		}
 		if (pattrib->pctrl == 1) { /* mp tx packets */
 			struct tx_desc *ptxdesc_mp;
 
 			ptxdesc_mp = &txdesc_mp;
 			/* offset 8 */
-			ptxdesc->txdw2 = cpu_to_le32(ptxdesc_mp->txdw2);
+			ptxdesc->txdw2 = ptxdesc_mp->txdw2;
 			if (bmcst)
 				ptxdesc->txdw2 |= BMC;
 			ptxdesc->txdw2 |= BK;
 			/* offset 16 */
-			ptxdesc->txdw4 = cpu_to_le32(ptxdesc_mp->txdw4);
+			ptxdesc->txdw4 = ptxdesc_mp->txdw4;
 			/* offset 20 */
-			ptxdesc->txdw5 = cpu_to_le32(ptxdesc_mp->txdw5);
+			ptxdesc->txdw5 = ptxdesc_mp->txdw5;
 			pattrib->pctrl = 0;/* reset to zero; */
 		}
 	} else if (pxmitframe->frame_tag == MGNT_FRAMETAG) {
@@ -585,12 +585,12 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 		 * correct mapping between AC&Endpoint,
 		 * the purpose is that correct mapping let the MAC releases
 		 * the AC Queue list correctly. */
-		ptxdesc->txdw3 = cpu_to_le32((pattrib->priority << SEQ_SHT) &
-					      0x0fff0000);
+		ptxdesc->txdw3 = (pattrib->priority << SEQ_SHT) &
+					      0x0fff0000;
 		/* offset 16 */
-		ptxdesc->txdw4 = cpu_to_le32(0x80002040);/*gtest*/
+		ptxdesc->txdw4 = 0x80002040;/*gtest*/
 		/* offset 20 */
-		ptxdesc->txdw5 = cpu_to_le32(0x001f8000);/* gtest 1M */
+		ptxdesc->txdw5 = 0x001f8000;/* gtest 1M */
 	} else if (pxmitframe->frame_tag == TXAGG_FRAMETAG) {
 		/* offset 4 */
 		qsel = 0x13;
@@ -601,12 +601,12 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 		ptxdesc->txdw1 |= (qsel << QSEL_SHT) & 0x00001f00;
 		/*offset 8*/
 		/*offset 12*/
-		ptxdesc->txdw3 = cpu_to_le32((pattrib->seqnum << SEQ_SHT) &
-					      0x0fff0000);
+		ptxdesc->txdw3 = (pattrib->seqnum << SEQ_SHT) &
+					      0x0fff0000;
 		/*offset 16*/
-		ptxdesc->txdw4 = cpu_to_le32(0x80002040);/*gtest*/
+		ptxdesc->txdw4 = 0x80002040;/*gtest*/
 		/*offset 20*/
-		ptxdesc->txdw5 = cpu_to_le32(0x001f9600);/*gtest*/
+		ptxdesc->txdw5 = 0x001f9600;/*gtest*/
 	}
 }
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 09/10] Staging: rtl8712: Fix cast to restricted __le32 in rtl871x_mlme.c
  2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
                   ` (5 preceding siblings ...)
  2015-03-22  0:52 ` [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
@ 2015-03-22  0:52 ` Vatika Harlalka
  2015-03-22  0:52 ` [PATCH 10/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
  7 siblings, 0 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:52 UTC (permalink / raw)
  To: outreachy-kernel

This patch is to fix the following warning in rtl871x_mlme:

drivers/staging/rtl8712/rtl871x_mlme.c:952:24: warning: cast to restricted __le32

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/rtl871x_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index fb2b195..2241e94 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -949,7 +949,7 @@ void r8712_stassoc_event_callback(struct _adapter *adapter, u8 *pbuf)
 		return;
 	/* to do : init sta_info variable */
 	psta->qos_option = 0;
-	psta->mac_id = le32_to_cpu((uint)pstassoc->cam_id);
+	psta->mac_id = (uint)pstassoc->cam_id;
 	/* psta->aid = (uint)pstassoc->cam_id; */
 
 	if (adapter->securitypriv.AuthAlgrthm == 2)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 10/10] Staging: rtl8712: Fix incorrect assignment type in rtl871x_mlme.c
  2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
                   ` (6 preceding siblings ...)
  2015-03-22  0:52 ` [PATCH 09/10] Staging: rtl8712: Fix cast to restricted __le32 in rtl871x_mlme.c Vatika Harlalka
@ 2015-03-22  0:52 ` Vatika Harlalka
  2015-03-22  7:06   ` [Outreachy kernel] " Julia Lawall
  7 siblings, 1 reply; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-22  0:52 UTC (permalink / raw)
  To: outreachy-kernel

This patch is to fix Sparse warning due to incorrect
assignment in rtl871x_mlme.c

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8712/rtl871x_mlme.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index 2241e94..5d9c295 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -1639,30 +1639,30 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter)
 	struct security_priv	*psecuritypriv = &adapter->securitypriv;
 	struct wlan_network	*cur_network = &adapter->mlmepriv.cur_network;
 
-	pdev_network->Privacy = cpu_to_le32(psecuritypriv->PrivacyAlgrthm
-					    > 0 ? 1 : 0); /* adhoc no 802.1x */
+	pdev_network->Privacy = psecuritypriv->PrivacyAlgrthm
+					    > 0 ? 1 : 0; /* adhoc no 802.1x */
 	pdev_network->Rssi = 0;
 	switch (pregistrypriv->wireless_mode) {
 	case WIRELESS_11B:
-		pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11DS);
+		pdev_network->NetworkTypeInUse = Ndis802_11DS;
 		break;
 	case WIRELESS_11G:
 	case WIRELESS_11BG:
-		pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11OFDM24);
+		pdev_network->NetworkTypeInUse = Ndis802_11OFDM24;
 		break;
 	case WIRELESS_11A:
-		pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11OFDM5);
+		pdev_network->NetworkTypeInUse = Ndis802_11OFDM5;
 		break;
 	default:
 		/* TODO */
 		break;
 	}
-	pdev_network->Configuration.DSConfig = cpu_to_le32(
-					       pregistrypriv->channel);
+	pdev_network->Configuration.DSConfig = pregistrypriv->channel;
+
 	if (cur_network->network.InfrastructureMode == Ndis802_11IBSS)
-		pdev_network->Configuration.ATIMWindow = cpu_to_le32(3);
-	pdev_network->InfrastructureMode = cpu_to_le32(
-				cur_network->network.InfrastructureMode);
+		pdev_network->Configuration.ATIMWindow = 3;
+	pdev_network->InfrastructureMode = 
+				cur_network->network.InfrastructureMode;
 	/* 1. Supported rates
 	 * 2. IE
 	 */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 10/10] Staging: rtl8712: Fix incorrect assignment type in rtl871x_mlme.c
  2015-03-22  0:52 ` [PATCH 10/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
@ 2015-03-22  7:06   ` Julia Lawall
  0 siblings, 0 replies; 15+ messages in thread
From: Julia Lawall @ 2015-03-22  7:06 UTC (permalink / raw)
  To: Vatika Harlalka; +Cc: outreachy-kernel

On Sun, 22 Mar 2015, Vatika Harlalka wrote:

> This patch is to fix Sparse warning due to incorrect
> assignment in rtl871x_mlme.c

You should explain why your fix is correct.  What was incorrect about the 
original code.  What is more correct about your new code.  Just making the 
warning not appear any more does not make the code correct.

julia


> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
>  drivers/staging/rtl8712/rtl871x_mlme.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
> index 2241e94..5d9c295 100644
> --- a/drivers/staging/rtl8712/rtl871x_mlme.c
> +++ b/drivers/staging/rtl8712/rtl871x_mlme.c
> @@ -1639,30 +1639,30 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter)
>  	struct security_priv	*psecuritypriv = &adapter->securitypriv;
>  	struct wlan_network	*cur_network = &adapter->mlmepriv.cur_network;
>  
> -	pdev_network->Privacy = cpu_to_le32(psecuritypriv->PrivacyAlgrthm
> -					    > 0 ? 1 : 0); /* adhoc no 802.1x */
> +	pdev_network->Privacy = psecuritypriv->PrivacyAlgrthm
> +					    > 0 ? 1 : 0; /* adhoc no 802.1x */
>  	pdev_network->Rssi = 0;
>  	switch (pregistrypriv->wireless_mode) {
>  	case WIRELESS_11B:
> -		pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11DS);
> +		pdev_network->NetworkTypeInUse = Ndis802_11DS;
>  		break;
>  	case WIRELESS_11G:
>  	case WIRELESS_11BG:
> -		pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11OFDM24);
> +		pdev_network->NetworkTypeInUse = Ndis802_11OFDM24;
>  		break;
>  	case WIRELESS_11A:
> -		pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11OFDM5);
> +		pdev_network->NetworkTypeInUse = Ndis802_11OFDM5;
>  		break;
>  	default:
>  		/* TODO */
>  		break;
>  	}
> -	pdev_network->Configuration.DSConfig = cpu_to_le32(
> -					       pregistrypriv->channel);
> +	pdev_network->Configuration.DSConfig = pregistrypriv->channel;
> +
>  	if (cur_network->network.InfrastructureMode == Ndis802_11IBSS)
> -		pdev_network->Configuration.ATIMWindow = cpu_to_le32(3);
> -	pdev_network->InfrastructureMode = cpu_to_le32(
> -				cur_network->network.InfrastructureMode);
> +		pdev_network->Configuration.ATIMWindow = 3;
> +	pdev_network->InfrastructureMode = 
> +				cur_network->network.InfrastructureMode;
>  	/* 1. Supported rates
>  	 * 2. IE
>  	 */
> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/261a202e9bb9aea62a09d14a42b1050f47b13e27.1426983594.git.vatikaharlalka%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type in rtl8712_xmit.c
  2015-03-22  0:52 ` [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
@ 2015-03-23  6:49   ` Julia Lawall
  2015-03-23 11:19     ` Vatika Harlalka
  2015-03-23 21:37   ` Greg KH
  1 sibling, 1 reply; 15+ messages in thread
From: Julia Lawall @ 2015-03-23  6:49 UTC (permalink / raw)
  To: Vatika Harlalka; +Cc: outreachy-kernel



On Sun, 22 Mar 2015, Vatika Harlalka wrote:

> This patch is to fix Sparse warnings due to incorrect assignment
> type in rtl8712_xmit.c

You should explain why the change is correct, not just make the message go 
away.

julia

> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
>  drivers/staging/rtl8712/rtl8712_xmit.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
> index 732e774..c0c86ef 100644
> --- a/drivers/staging/rtl8712/rtl8712_xmit.c
> +++ b/drivers/staging/rtl8712/rtl8712_xmit.c
> @@ -550,22 +550,22 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
>  			 * This will maybe make the handshake smooth.
>  			 */
>  			/*driver uses data rate*/
> -			ptxdesc->txdw4 = cpu_to_le32(0x80000000);
> -			ptxdesc->txdw5 = cpu_to_le32(0x001f8000);/*1M*/
> +			ptxdesc->txdw4 = 0x80000000;
> +			ptxdesc->txdw5 = 0x001f8000;/*1M*/
>  		}
>  		if (pattrib->pctrl == 1) { /* mp tx packets */
>  			struct tx_desc *ptxdesc_mp;
>  
>  			ptxdesc_mp = &txdesc_mp;
>  			/* offset 8 */
> -			ptxdesc->txdw2 = cpu_to_le32(ptxdesc_mp->txdw2);
> +			ptxdesc->txdw2 = ptxdesc_mp->txdw2;
>  			if (bmcst)
>  				ptxdesc->txdw2 |= BMC;
>  			ptxdesc->txdw2 |= BK;
>  			/* offset 16 */
> -			ptxdesc->txdw4 = cpu_to_le32(ptxdesc_mp->txdw4);
> +			ptxdesc->txdw4 = ptxdesc_mp->txdw4;
>  			/* offset 20 */
> -			ptxdesc->txdw5 = cpu_to_le32(ptxdesc_mp->txdw5);
> +			ptxdesc->txdw5 = ptxdesc_mp->txdw5;
>  			pattrib->pctrl = 0;/* reset to zero; */
>  		}
>  	} else if (pxmitframe->frame_tag == MGNT_FRAMETAG) {
> @@ -585,12 +585,12 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
>  		 * correct mapping between AC&Endpoint,
>  		 * the purpose is that correct mapping let the MAC releases
>  		 * the AC Queue list correctly. */
> -		ptxdesc->txdw3 = cpu_to_le32((pattrib->priority << SEQ_SHT) &
> -					      0x0fff0000);
> +		ptxdesc->txdw3 = (pattrib->priority << SEQ_SHT) &
> +					      0x0fff0000;
>  		/* offset 16 */
> -		ptxdesc->txdw4 = cpu_to_le32(0x80002040);/*gtest*/
> +		ptxdesc->txdw4 = 0x80002040;/*gtest*/
>  		/* offset 20 */
> -		ptxdesc->txdw5 = cpu_to_le32(0x001f8000);/* gtest 1M */
> +		ptxdesc->txdw5 = 0x001f8000;/* gtest 1M */
>  	} else if (pxmitframe->frame_tag == TXAGG_FRAMETAG) {
>  		/* offset 4 */
>  		qsel = 0x13;
> @@ -601,12 +601,12 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
>  		ptxdesc->txdw1 |= (qsel << QSEL_SHT) & 0x00001f00;
>  		/*offset 8*/
>  		/*offset 12*/
> -		ptxdesc->txdw3 = cpu_to_le32((pattrib->seqnum << SEQ_SHT) &
> -					      0x0fff0000);
> +		ptxdesc->txdw3 = (pattrib->seqnum << SEQ_SHT) &
> +					      0x0fff0000;
>  		/*offset 16*/
> -		ptxdesc->txdw4 = cpu_to_le32(0x80002040);/*gtest*/
> +		ptxdesc->txdw4 = 0x80002040;/*gtest*/
>  		/*offset 20*/
> -		ptxdesc->txdw5 = cpu_to_le32(0x001f9600);/*gtest*/
> +		ptxdesc->txdw5 = 0x001f9600;/*gtest*/
>  	}
>  }
>  
> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/68911b4fb09acb91c39291e2596ce73cc3e8e2f2.1426983594.git.vatikaharlalka%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type in rtl8712_xmit.c
  2015-03-23  6:49   ` [Outreachy kernel] " Julia Lawall
@ 2015-03-23 11:19     ` Vatika Harlalka
  2015-03-23 13:49       ` Julia Lawall
  0 siblings, 1 reply; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-23 11:19 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

Sparse complained because ptxdesc->txdw0, ptxdesc->txdw1, ptxdesc->txdw2,
ptxdesc->txdw3, ptxdesc->txdw4 and ptxdesc->txdw5 are declared as unsigned
int
and so the error was about the conversion to __le32.

I realize that maybe it would make more sense to change and declare them as
__le32
instead of otherwise?

[-- Attachment #2: Type: text/html, Size: 410 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type in rtl8712_xmit.c
  2015-03-23 11:19     ` Vatika Harlalka
@ 2015-03-23 13:49       ` Julia Lawall
  2015-03-23 22:20         ` Vatika Harlalka
  0 siblings, 1 reply; 15+ messages in thread
From: Julia Lawall @ 2015-03-23 13:49 UTC (permalink / raw)
  To: Vatika Harlalka; +Cc: outreachy-kernel



On Mon, 23 Mar 2015, Vatika Harlalka wrote:

> Sparse complained because ptxdesc->txdw0, ptxdesc->txdw1, ptxdesc->txdw2,
> ptxdesc->txdw3, ptxdesc->txdw4 and ptxdesc->txdw5 are declared as unsigned
> int
> and so the error was about the conversion to __le32.
>
> I realize that maybe it would make more sense to change and declare them as
> __le32
> instead of otherwise?

I don't know.  That seems to be what would need to be decided.

julia


>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CAHjTdYeeFQ5ftSzbzso0DTk
> W9DPoNkmn9FHwa11_Ag3FDgA8mQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type in rtl8712_xmit.c
  2015-03-22  0:52 ` [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
  2015-03-23  6:49   ` [Outreachy kernel] " Julia Lawall
@ 2015-03-23 21:37   ` Greg KH
  1 sibling, 0 replies; 15+ messages in thread
From: Greg KH @ 2015-03-23 21:37 UTC (permalink / raw)
  To: Vatika Harlalka; +Cc: outreachy-kernel

On Sun, Mar 22, 2015 at 06:22:27AM +0530, Vatika Harlalka wrote:
> This patch is to fix Sparse warnings due to incorrect assignment
> type in rtl8712_xmit.c
> 
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
>  drivers/staging/rtl8712/rtl8712_xmit.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
> index 732e774..c0c86ef 100644
> --- a/drivers/staging/rtl8712/rtl8712_xmit.c
> +++ b/drivers/staging/rtl8712/rtl8712_xmit.c
> @@ -550,22 +550,22 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
>  			 * This will maybe make the handshake smooth.
>  			 */
>  			/*driver uses data rate*/
> -			ptxdesc->txdw4 = cpu_to_le32(0x80000000);
> -			ptxdesc->txdw5 = cpu_to_le32(0x001f8000);/*1M*/
> +			ptxdesc->txdw4 = 0x80000000;
> +			ptxdesc->txdw5 = 0x001f8000;/*1M*/

Eeek, this just broke the driver!


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type in rtl8712_xmit.c
  2015-03-23 13:49       ` Julia Lawall
@ 2015-03-23 22:20         ` Vatika Harlalka
  0 siblings, 0 replies; 15+ messages in thread
From: Vatika Harlalka @ 2015-03-23 22:20 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

Alright, I would request you to keep this patchset on hold
and I'll try to re-examine the code properly.
I know I should've done this before-hand but I'll be more
careful on v2 of this !

[-- Attachment #2: Type: text/html, Size: 267 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-03-23 23:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-22  0:49 [PATCH 01/10] Staging: rtl8712: Fix incorrect assignment type in ieee80211.c Vatika Harlalka
2015-03-22  0:49 ` [PATCH 02/10] Staging: rtl8712: Fix invalid assignment '|=' " Vatika Harlalka
2015-03-22  0:50 ` [PATCH 04/10] Staging: rtl8712: Fix incorrect assignment type in rtl871x_cmd.c Vatika Harlalka
2015-03-22  0:51 ` [PATCH 05/10] Staging: rtl8712: Fix cast to restricted __le16 in hal_init.c Vatika Harlalka
2015-03-22  0:51 ` [PATCH 06/10] Staging: rtl8712: Fix invalid assignment '|=' " Vatika Harlalka
2015-03-22  0:52 ` [PATCH 07/10] Staging: rtl8712: Fix invalid assignment '|=' in rtl8712_xmit.c Vatika Harlalka
2015-03-22  0:52 ` [PATCH 08/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
2015-03-23  6:49   ` [Outreachy kernel] " Julia Lawall
2015-03-23 11:19     ` Vatika Harlalka
2015-03-23 13:49       ` Julia Lawall
2015-03-23 22:20         ` Vatika Harlalka
2015-03-23 21:37   ` Greg KH
2015-03-22  0:52 ` [PATCH 09/10] Staging: rtl8712: Fix cast to restricted __le32 in rtl871x_mlme.c Vatika Harlalka
2015-03-22  0:52 ` [PATCH 10/10] Staging: rtl8712: Fix incorrect assignment type " Vatika Harlalka
2015-03-22  7:06   ` [Outreachy kernel] " Julia Lawall

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.