From 0b2e3aefc34d3d5824e687529c6992521765614d Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Sun, 16 Aug 2009 21:29:47 +0200 Subject: [PATCH] Staging: rt3070: fix build warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/common/cmm_data.c | 5 ----- drivers/staging/rt2860/common/eeprom.c | 14 +++----------- drivers/staging/rt2860/rt_profile.c | 11 +---------- drivers/staging/rt2870/common/rtusb_io.c | 6 +++--- 4 files changed, 7 insertions(+), 29 deletions(-) diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c index 66eca202eae4..2936ca38e44d 100644 --- a/drivers/staging/rt2860/common/cmm_data.c +++ b/drivers/staging/rt2860/common/cmm_data.c @@ -1013,11 +1013,6 @@ BOOLEAN RTMP_FillTxBlkInfo( } return TRUE; - -#ifdef RT30xx -FillTxBlkErr: - return FALSE; -#endif } diff --git a/drivers/staging/rt2860/common/eeprom.c b/drivers/staging/rt2860/common/eeprom.c index 9729323baca5..d179a9f2565f 100644 --- a/drivers/staging/rt2860/common/eeprom.c +++ b/drivers/staging/rt2860/common/eeprom.c @@ -1038,7 +1038,7 @@ INT set_eFuseLoadFromBin_Proc( { CHAR *src; struct file *srcf; - INT retval, orgfsuid, orgfsgid; + INT retval; mm_segment_t orgfs; UCHAR *buffer; UCHAR BinFileSize=0; @@ -1078,12 +1078,7 @@ INT set_eFuseLoadFromBin_Proc( kfree(buffer); 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(); set_fs(KERNEL_DS); @@ -1146,10 +1141,7 @@ INT set_eFuseLoadFromBin_Proc( DBGPRINT(RT_DEBUG_TRACE, ("--> Error %d closing %s\n", -retval, src)); } set_fs(orgfs); -#if 0 - current->fsuid = orgfsuid; - current->fsgid = orgfsgid; -#endif + for(j=0;jcred->fsuid = current->cred->fsgid = 0; */ -#endif orgfs = get_fs(); set_fs(KERNEL_DS); diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c index 704b5c2d5091..5fa7f2966a62 100644 --- a/drivers/staging/rt2870/common/rtusb_io.c +++ b/drivers/staging/rt2870/common/rtusb_io.c @@ -1754,9 +1754,9 @@ VOID CMDHandler( case RT_CMD_SET_RX_WCID_TABLE: //General call for RTMPAddWcidAttributeEntry() { PMAC_TABLE_ENTRY pEntry; - UCHAR KeyIdx; - UCHAR CipherAlg; - UCHAR ApIdx; + UCHAR KeyIdx = 0; + UCHAR CipherAlg = 0; + UCHAR ApIdx = 0; pEntry = (PMAC_TABLE_ENTRY)(pData); -- 2.20.1