From patchwork Thu Mar 31 03:51:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keng-Yu Lin X-Patchwork-Id: 89014 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 84C2BB6F76 for ; Thu, 31 Mar 2011 14:52:46 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Q58w6-0002ra-Ca; Thu, 31 Mar 2011 03:52:42 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Q58vk-0002dI-Je for kernel-team@lists.ubuntu.com; Thu, 31 Mar 2011 03:52:20 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q58vk-000644-Gz for ; Thu, 31 Mar 2011 03:52:20 +0000 Received: from 114-45-59-58.dynamic.hinet.net ([114.45.59.58] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Q58vi-00052I-Tn for kernel-team@lists.ubuntu.com; Thu, 31 Mar 2011 03:52:20 +0000 From: Keng-Yu Lin To: kernel-team@lists.ubuntu.com Subject: [PATCH 07/11] UBUNTU: SAUCE: (drop after 2.6.39) staging: rts_pstor: fix sparse warning Date: Thu, 31 Mar 2011 11:51:09 +0800 Message-Id: <1301543473-11146-8-git-send-email-keng-yu.lin@canonical.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1301543473-11146-1-git-send-email-keng-yu.lin@canonical.com> References: <1301543473-11146-1-git-send-email-keng-yu.lin@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: wwang Add static modifier before some functions and global variables. Signed-off-by: wwang Signed-off-by: Greg Kroah-Hartman BugLink: http://bugs.launchpad.net/bugs/698006 (cherry picked from commit 6680d2cab316a0c0e4cea0727e6d63426a77bb12) Signed-off-by: Keng-Yu Lin --- drivers/staging/rts_pstor/ms.c | 2 +- drivers/staging/rts_pstor/rtsx.c | 4 +- drivers/staging/rts_pstor/rtsx_card.c | 2 +- drivers/staging/rts_pstor/rtsx_chip.c | 8 ++-- drivers/staging/rts_pstor/rtsx_scsi.c | 8 ++-- drivers/staging/rts_pstor/rtsx_transport.c | 6 ++-- drivers/staging/rts_pstor/sd.c | 48 ++++++++++++++-------------- drivers/staging/rts_pstor/spi.c | 2 +- 8 files changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/staging/rts_pstor/ms.c b/drivers/staging/rts_pstor/ms.c index a624f40..c43f911 100644 --- a/drivers/staging/rts_pstor/ms.c +++ b/drivers/staging/rts_pstor/ms.c @@ -3594,7 +3594,7 @@ void ms_free_l2p_tbl(struct rtsx_chip *chip) #ifdef SUPPORT_MAGIC_GATE #ifdef READ_BYTES_WAIT_INT -int ms_poll_int(struct rtsx_chip *chip) +static int ms_poll_int(struct rtsx_chip *chip) { int retval; u8 val; diff --git a/drivers/staging/rts_pstor/rtsx.c b/drivers/staging/rts_pstor/rtsx.c index 2b18379..c3f33d1 100644 --- a/drivers/staging/rts_pstor/rtsx.c +++ b/drivers/staging/rts_pstor/rtsx.c @@ -257,7 +257,7 @@ static int bus_reset(struct scsi_cmnd *srb) * this defines our host template, with which we'll allocate hosts */ -struct scsi_host_template rtsx_host_template = { +static struct scsi_host_template rtsx_host_template = { /* basic userland interface stuff */ .name = CR_DRIVER_NAME, .proc_name = CR_DRIVER_NAME, @@ -436,7 +436,7 @@ static int rtsx_resume(struct pci_dev *pci) } #endif /* CONFIG_PM */ -void rtsx_shutdown(struct pci_dev *pci) +static void rtsx_shutdown(struct pci_dev *pci) { struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci); struct rtsx_chip *chip; diff --git a/drivers/staging/rts_pstor/rtsx_card.c b/drivers/staging/rts_pstor/rtsx_card.c index fe4cce0..4f971f2 100644 --- a/drivers/staging/rts_pstor/rtsx_card.c +++ b/drivers/staging/rts_pstor/rtsx_card.c @@ -300,7 +300,7 @@ void do_reset_ms_card(struct rtsx_chip *chip) } } -void release_sdio(struct rtsx_chip *chip) +static void release_sdio(struct rtsx_chip *chip) { if (chip->sd_io) { rtsx_write_register(chip, CARD_STOP, SD_STOP | SD_CLR_ERR, diff --git a/drivers/staging/rts_pstor/rtsx_chip.c b/drivers/staging/rts_pstor/rtsx_chip.c index a4d8eb2..f443d97 100644 --- a/drivers/staging/rts_pstor/rtsx_chip.c +++ b/drivers/staging/rts_pstor/rtsx_chip.c @@ -657,7 +657,7 @@ static inline int check_sd_current_prior(u32 sd_current_prior) return !fake_para; } -int rts5209_init(struct rtsx_chip *chip) +static int rts5209_init(struct rtsx_chip *chip) { int retval; u32 lval = 0; @@ -805,7 +805,7 @@ int rts5209_init(struct rtsx_chip *chip) return STATUS_SUCCESS; } -int rts5208_init(struct rtsx_chip *chip) +static int rts5208_init(struct rtsx_chip *chip) { int retval; u16 reg = 0; @@ -871,7 +871,7 @@ int rts5208_init(struct rtsx_chip *chip) return STATUS_SUCCESS; } -int rts5288_init(struct rtsx_chip *chip) +static int rts5288_init(struct rtsx_chip *chip) { int retval; u8 val = 0, max_func; @@ -1097,7 +1097,7 @@ static inline void rtsx_blink_led(struct rtsx_chip *chip) } #endif -void rtsx_monitor_aspm_config(struct rtsx_chip *chip) +static void rtsx_monitor_aspm_config(struct rtsx_chip *chip) { int maybe_support_aspm, reg_changed; u32 tmp = 0; diff --git a/drivers/staging/rts_pstor/rtsx_scsi.c b/drivers/staging/rts_pstor/rtsx_scsi.c index ce9fc16..20c2464 100644 --- a/drivers/staging/rts_pstor/rtsx_scsi.c +++ b/drivers/staging/rts_pstor/rtsx_scsi.c @@ -274,7 +274,7 @@ static int test_unit_ready(struct scsi_cmnd *srb, struct rtsx_chip *chip) return TRANSPORT_GOOD; } -unsigned char formatter_inquiry_str[20] = { +static unsigned char formatter_inquiry_str[20] = { 'M', 'E', 'M', 'O', 'R', 'Y', 'S', 'T', 'I', 'C', 'K', #ifdef SUPPORT_MAGIC_GATE '-', 'M', 'G', /* Byte[47:49] */ @@ -2690,7 +2690,7 @@ static int ms_format_cmnd(struct scsi_cmnd *srb, struct rtsx_chip *chip) } #ifdef SUPPORT_PCGL_1P18 -int get_ms_information(struct scsi_cmnd *srb, struct rtsx_chip *chip) +static int get_ms_information(struct scsi_cmnd *srb, struct rtsx_chip *chip) { struct ms_info *ms_card = &(chip->ms_card); unsigned int lun = SCSI_LUN(srb); @@ -2864,7 +2864,7 @@ static int sd_extention_cmnd(struct scsi_cmnd *srb, struct rtsx_chip *chip) #endif #ifdef SUPPORT_MAGIC_GATE -int mg_report_key(struct scsi_cmnd *srb, struct rtsx_chip *chip) +static int mg_report_key(struct scsi_cmnd *srb, struct rtsx_chip *chip) { struct ms_info *ms_card = &(chip->ms_card); unsigned int lun = SCSI_LUN(srb); @@ -2962,7 +2962,7 @@ int mg_report_key(struct scsi_cmnd *srb, struct rtsx_chip *chip) return TRANSPORT_GOOD; } -int mg_send_key(struct scsi_cmnd *srb, struct rtsx_chip *chip) +static int mg_send_key(struct scsi_cmnd *srb, struct rtsx_chip *chip) { struct ms_info *ms_card = &(chip->ms_card); unsigned int lun = SCSI_LUN(srb); diff --git a/drivers/staging/rts_pstor/rtsx_transport.c b/drivers/staging/rts_pstor/rtsx_transport.c index 3b160dc..4e3d2c1 100644 --- a/drivers/staging/rts_pstor/rtsx_transport.c +++ b/drivers/staging/rts_pstor/rtsx_transport.c @@ -324,7 +324,7 @@ static inline void rtsx_add_sg_tbl( } while (len); } -int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card, +static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card, struct scatterlist *sg, int num_sg, unsigned int *index, unsigned int *offset, int size, enum dma_data_direction dma_dir, int timeout) @@ -485,7 +485,7 @@ out: return err; } -int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card, +static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card, struct scatterlist *sg, int num_sg, enum dma_data_direction dma_dir, int timeout) { @@ -632,7 +632,7 @@ out: return err; } -int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, size_t len, +static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, size_t len, enum dma_data_direction dma_dir, int timeout) { struct rtsx_dev *rtsx = chip->rtsx; diff --git a/drivers/staging/rts_pstor/sd.c b/drivers/staging/rts_pstor/sd.c index 945c95f..80b61e6 100644 --- a/drivers/staging/rts_pstor/sd.c +++ b/drivers/staging/rts_pstor/sd.c @@ -32,30 +32,30 @@ #define SD_MAX_RETRY_COUNT 3 -u16 REG_SD_CFG1; -u16 REG_SD_CFG2; -u16 REG_SD_CFG3; -u16 REG_SD_STAT1; -u16 REG_SD_STAT2; -u16 REG_SD_BUS_STAT; -u16 REG_SD_PAD_CTL; -u16 REG_SD_SAMPLE_POINT_CTL; -u16 REG_SD_PUSH_POINT_CTL; -u16 REG_SD_CMD0; -u16 REG_SD_CMD1; -u16 REG_SD_CMD2; -u16 REG_SD_CMD3; -u16 REG_SD_CMD4; -u16 REG_SD_CMD5; -u16 REG_SD_BYTE_CNT_L; -u16 REG_SD_BYTE_CNT_H; -u16 REG_SD_BLOCK_CNT_L; -u16 REG_SD_BLOCK_CNT_H; -u16 REG_SD_TRANSFER; -u16 REG_SD_VPCLK0_CTL; -u16 REG_SD_VPCLK1_CTL; -u16 REG_SD_DCMPS0_CTL; -u16 REG_SD_DCMPS1_CTL; +static u16 REG_SD_CFG1; +static u16 REG_SD_CFG2; +static u16 REG_SD_CFG3; +static u16 REG_SD_STAT1; +static u16 REG_SD_STAT2; +static u16 REG_SD_BUS_STAT; +static u16 REG_SD_PAD_CTL; +static u16 REG_SD_SAMPLE_POINT_CTL; +static u16 REG_SD_PUSH_POINT_CTL; +static u16 REG_SD_CMD0; +static u16 REG_SD_CMD1; +static u16 REG_SD_CMD2; +static u16 REG_SD_CMD3; +static u16 REG_SD_CMD4; +static u16 REG_SD_CMD5; +static u16 REG_SD_BYTE_CNT_L; +static u16 REG_SD_BYTE_CNT_H; +static u16 REG_SD_BLOCK_CNT_L; +static u16 REG_SD_BLOCK_CNT_H; +static u16 REG_SD_TRANSFER; +static u16 REG_SD_VPCLK0_CTL; +static u16 REG_SD_VPCLK1_CTL; +static u16 REG_SD_DCMPS0_CTL; +static u16 REG_SD_DCMPS1_CTL; static inline void sd_set_err_code(struct rtsx_chip *chip, u8 err_code) { diff --git a/drivers/staging/rts_pstor/spi.c b/drivers/staging/rts_pstor/spi.c index e068200..8a8689b 100644 --- a/drivers/staging/rts_pstor/spi.c +++ b/drivers/staging/rts_pstor/spi.c @@ -221,7 +221,7 @@ static int spi_init_eeprom(struct rtsx_chip *chip) return STATUS_SUCCESS; } -int spi_eeprom_program_enable(struct rtsx_chip *chip) +static int spi_eeprom_program_enable(struct rtsx_chip *chip) { int retval;