提交 d463cf4e 编写于 作者: L Lee Jones 提交者: Ulf Hansson

mmc: rtsx_usb_sdmmc: Remove set but unused variable 'err'

Seeing as sd_wait_data_idle() returns void and only a very specific
read value is checked, there doesn't seem to be a good reason to
check the return value of rtsx_pci_read_register().  So remove
the assignment and definition of 'err'.

Squashes the following W=1 kernel build warning:

 drivers/mmc/host/rtsx_usb_sdmmc.c: In function ‘sd_wait_data_idle’:
 drivers/mmc/host/rtsx_usb_sdmmc.c:657:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
 657 | int err, i;
 | ^~~

Cc: Roger Tseng <rogerable@realtek.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200701124702.908713-11-lee.jones@linaro.orgSigned-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 679209b3
...@@ -654,12 +654,11 @@ static u8 sd_search_final_phase(struct rtsx_usb_sdmmc *host, u32 phase_map) ...@@ -654,12 +654,11 @@ static u8 sd_search_final_phase(struct rtsx_usb_sdmmc *host, u32 phase_map)
static void sd_wait_data_idle(struct rtsx_usb_sdmmc *host) static void sd_wait_data_idle(struct rtsx_usb_sdmmc *host)
{ {
int err, i; int i;
u8 val = 0; u8 val = 0;
for (i = 0; i < 100; i++) { for (i = 0; i < 100; i++) {
err = rtsx_usb_ep0_read_register(host->ucr, rtsx_usb_ep0_read_register(host->ucr, SD_DATA_STATE, &val);
SD_DATA_STATE, &val);
if (val & SD_DATA_IDLE) if (val & SD_DATA_IDLE)
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册