Commit 0b2e3aef authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt3070: fix build warnings

In file included from drivers/staging/rt3070/common/../../rt2870/common/cmm_data.c:2,
                 from drivers/staging/rt3070/common/cmm_data.c:2:
drivers/staging/rt3070/common/../../rt2870/common/../../rt2860/common/cmm_data.c: In function ‘RTMP_FillTxBlkInfo’:
drivers/staging/rt3070/common/../../rt2870/common/../../rt2860/common/cmm_data.c:1018: warning: label ‘FillTxBlkErr’ defined but not used

In file included from drivers/staging/rt3070/common/../../rt2870/common/eeprom.c:2,
                 from drivers/staging/rt3070/common/eeprom.c:2:
drivers/staging/rt3070/common/../../rt2870/common/../../rt2860/common/eeprom.c: In function ‘set_eFuseLoadFromBin_Proc’:
drivers/staging/rt3070/common/../../rt2870/common/../../rt2860/common/eeprom.c:1041: warning: unused variable ‘orgfsgid’
drivers/staging/rt3070/common/../../rt2870/common/../../rt2860/common/eeprom.c:1041: warning: unused variable ‘orgfsuid’

In file included from drivers/staging/rt3070/../rt2870/rt_profile.c:2,
                 from drivers/staging/rt3070/rt_profile.c:2:
drivers/staging/rt3070/../rt2870/../rt2860/rt_profile.c: In function ‘RTMPReadParametersHook’:
drivers/staging/rt3070/../rt2870/../rt2860/rt_profile.c:863: warning: unused variable ‘orgfsgid’
drivers/staging/rt3070/../rt2870/../rt2860/rt_profile.c:863: warning: unused variable ‘orgfsuid’

In file included from drivers/staging/rt3070/common/rtusb_io.c:2:
drivers/staging/rt3070/common/../../rt2870/common/rtusb_io.c: In function ‘CMDHandler’:
drivers/staging/rt3070/common/../../rt2870/common/rtusb_io.c:1763: warning: ‘CipherAlg’ may be used uninitialized in this function
drivers/staging/rt3070/common/../../rt2870/common/rtusb_io.c:1758: note: ‘CipherAlg’ was declared here
drivers/staging/rt3070/common/../../rt2870/common/rtusb_io.c:1763: warning: ‘KeyIdx’ may be used uninitialized in this function
drivers/staging/rt3070/common/../../rt2870/common/rtusb_io.c:1757: note: ‘KeyIdx’ was declared here
drivers/staging/rt3070/common/../../rt2870/common/rtusb_io.c:1763: warning: ‘ApIdx’ may be used uninitialized in this function
drivers/staging/rt3070/common/../../rt2870/common/rtusb_io.c:1759: note: ‘ApIdx’ was declared here
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f0da335b
...@@ -1013,11 +1013,6 @@ BOOLEAN RTMP_FillTxBlkInfo( ...@@ -1013,11 +1013,6 @@ BOOLEAN RTMP_FillTxBlkInfo(
} }
return TRUE; return TRUE;
#ifdef RT30xx
FillTxBlkErr:
return FALSE;
#endif
} }
......
...@@ -1038,7 +1038,7 @@ INT set_eFuseLoadFromBin_Proc( ...@@ -1038,7 +1038,7 @@ INT set_eFuseLoadFromBin_Proc(
{ {
CHAR *src; CHAR *src;
struct file *srcf; struct file *srcf;
INT retval, orgfsuid, orgfsgid; INT retval;
mm_segment_t orgfs; mm_segment_t orgfs;
UCHAR *buffer; UCHAR *buffer;
UCHAR BinFileSize=0; UCHAR BinFileSize=0;
...@@ -1078,12 +1078,7 @@ INT set_eFuseLoadFromBin_Proc( ...@@ -1078,12 +1078,7 @@ INT set_eFuseLoadFromBin_Proc(
kfree(buffer); kfree(buffer);
return FALSE; return FALSE;
} }
/* Don't change to uid 0, let the file be opened as the "normal" user */
#if 0
orgfsuid = current->fsuid;
orgfsgid = current->fsgid;
current->fsuid=current->fsgid = 0;
#endif
orgfs = get_fs(); orgfs = get_fs();
set_fs(KERNEL_DS); set_fs(KERNEL_DS);
...@@ -1146,10 +1141,7 @@ INT set_eFuseLoadFromBin_Proc( ...@@ -1146,10 +1141,7 @@ INT set_eFuseLoadFromBin_Proc(
DBGPRINT(RT_DEBUG_TRACE, ("--> Error %d closing %s\n", -retval, src)); DBGPRINT(RT_DEBUG_TRACE, ("--> Error %d closing %s\n", -retval, src));
} }
set_fs(orgfs); set_fs(orgfs);
#if 0
current->fsuid = orgfsuid;
current->fsgid = orgfsgid;
#endif
for(j=0;j<i;j++) for(j=0;j<i;j++)
{ {
DBGPRINT(RT_DEBUG_TRACE, ("%02X ",buffer[j])); DBGPRINT(RT_DEBUG_TRACE, ("%02X ",buffer[j]));
......
...@@ -860,7 +860,7 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -860,7 +860,7 @@ NDIS_STATUS RTMPReadParametersHook(
{ {
PUCHAR src = NULL; PUCHAR src = NULL;
struct file *srcf; struct file *srcf;
INT retval, orgfsuid, orgfsgid; INT retval;
mm_segment_t orgfs; mm_segment_t orgfs;
CHAR *buffer; CHAR *buffer;
CHAR *tmpbuf; CHAR *tmpbuf;
...@@ -884,15 +884,6 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -884,15 +884,6 @@ NDIS_STATUS RTMPReadParametersHook(
src = STA_PROFILE_PATH; src = STA_PROFILE_PATH;
// Save uid and gid used for filesystem access.
// Set user and group to 0 (root)
#ifndef RT30xx
orgfsuid = current_fsuid();
orgfsgid = current_fsgid();
/* Hm, can't really do this nicely anymore, so rely on these files
* being set to the proper permission to read them... */
/* current->cred->fsuid = current->cred->fsgid = 0; */
#endif
orgfs = get_fs(); orgfs = get_fs();
set_fs(KERNEL_DS); set_fs(KERNEL_DS);
......
...@@ -1754,9 +1754,9 @@ VOID CMDHandler( ...@@ -1754,9 +1754,9 @@ VOID CMDHandler(
case RT_CMD_SET_RX_WCID_TABLE: //General call for RTMPAddWcidAttributeEntry() case RT_CMD_SET_RX_WCID_TABLE: //General call for RTMPAddWcidAttributeEntry()
{ {
PMAC_TABLE_ENTRY pEntry; PMAC_TABLE_ENTRY pEntry;
UCHAR KeyIdx; UCHAR KeyIdx = 0;
UCHAR CipherAlg; UCHAR CipherAlg = 0;
UCHAR ApIdx; UCHAR ApIdx = 0;
pEntry = (PMAC_TABLE_ENTRY)(pData); pEntry = (PMAC_TABLE_ENTRY)(pData);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment