* [PATCH] staging: rts5208: Remove wrapper function
@ 2015-10-29 8:50 Amitoj Kaur Chawla
2015-11-04 20:10 ` [Outreachy kernel] " Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-29 8:50 UTC (permalink / raw)
To: outreachy-kernel
Drop wrapper function that can be replaced by a single line of code.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/staging/rts5208/rtsx_chip.c | 9 ++-------
drivers/staging/rts5208/rtsx_chip.h | 1 -
drivers/staging/rts5208/rtsx_scsi.c | 2 +-
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rts5208/rtsx_chip.c b/drivers/staging/rts5208/rtsx_chip.c
index c0ce659..ca9f021 100644
--- a/drivers/staging/rts5208/rtsx_chip.c
+++ b/drivers/staging/rts5208/rtsx_chip.c
@@ -109,11 +109,6 @@ void rtsx_enable_bus_int(struct rtsx_chip *chip)
dev_dbg(rtsx_dev(chip), "RTSX_BIER: 0x%08x\n", reg);
}
-void rtsx_disable_bus_int(struct rtsx_chip *chip)
-{
- rtsx_writel(chip, RTSX_BIER, 0);
-}
-
static int rtsx_pre_handle_sdio_old(struct rtsx_chip *chip)
{
int retval;
@@ -359,7 +354,7 @@ static int rtsx_enable_pcie_intr(struct rtsx_chip *chip)
rtsx_trace(chip);
return ret;
}
- rtsx_disable_bus_int(chip);
+ rtsx_writel(chip, RTSX_BIER, 0);
} else {
rtsx_enable_bus_int(chip);
}
@@ -2217,7 +2212,7 @@ void rtsx_do_before_power_down(struct rtsx_chip *chip, int pm_stat)
return;
rtsx_release_cards(chip);
- rtsx_disable_bus_int(chip);
+ rtsx_writel(chip, RTSX_BIER, 0);
turn_off_led(chip, LED_GPIO);
#ifdef HW_AUTO_SWITCH_SD_BUS
diff --git a/drivers/staging/rts5208/rtsx_chip.h b/drivers/staging/rts5208/rtsx_chip.h
index c295b1e..2d6d6b8 100644
--- a/drivers/staging/rts5208/rtsx_chip.h
+++ b/drivers/staging/rts5208/rtsx_chip.h
@@ -953,7 +953,6 @@ int rtsx_force_power_down(struct rtsx_chip *chip, u8 ctl);
void rtsx_disable_card_int(struct rtsx_chip *chip);
void rtsx_enable_card_int(struct rtsx_chip *chip);
void rtsx_enable_bus_int(struct rtsx_chip *chip);
-void rtsx_disable_bus_int(struct rtsx_chip *chip);
int rtsx_reset_chip(struct rtsx_chip *chip);
int rtsx_init_chip(struct rtsx_chip *chip);
void rtsx_release_chip(struct rtsx_chip *chip);
diff --git a/drivers/staging/rts5208/rtsx_scsi.c b/drivers/staging/rts5208/rtsx_scsi.c
index 60871f3..ec8a1b0 100644
--- a/drivers/staging/rts5208/rtsx_scsi.c
+++ b/drivers/staging/rts5208/rtsx_scsi.c
@@ -1822,7 +1822,7 @@ static int set_chip_mode(struct scsi_cmnd *srb, struct rtsx_chip *chip)
return TRANSPORT_FAILED;
}
- rtsx_disable_bus_int(chip);
+ rtsx_writel(chip, RTSX_BIER, 0);
retval = rtsx_read_phy_register(chip, 0x1C, ®);
if (retval != STATUS_SUCCESS) {
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: rts5208: Remove wrapper function
2015-10-29 8:50 [PATCH] staging: rts5208: Remove wrapper function Amitoj Kaur Chawla
@ 2015-11-04 20:10 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-11-04 20:10 UTC (permalink / raw)
To: Amitoj Kaur Chawla; +Cc: outreachy-kernel
On Thu, Oct 29, 2015 at 02:20:03PM +0530, Amitoj Kaur Chawla wrote:
> Drop wrapper function that can be replaced by a single line of code.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> drivers/staging/rts5208/rtsx_chip.c | 9 ++-------
> drivers/staging/rts5208/rtsx_chip.h | 1 -
> drivers/staging/rts5208/rtsx_scsi.c | 2 +-
> 3 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/rts5208/rtsx_chip.c b/drivers/staging/rts5208/rtsx_chip.c
> index c0ce659..ca9f021 100644
> --- a/drivers/staging/rts5208/rtsx_chip.c
> +++ b/drivers/staging/rts5208/rtsx_chip.c
> @@ -109,11 +109,6 @@ void rtsx_enable_bus_int(struct rtsx_chip *chip)
> dev_dbg(rtsx_dev(chip), "RTSX_BIER: 0x%08x\n", reg);
> }
>
> -void rtsx_disable_bus_int(struct rtsx_chip *chip)
> -{
> - rtsx_writel(chip, RTSX_BIER, 0);
> -}
This is a "useful" function in that it does a specific thing, and makes
the code easier to read, so please don't remove it.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-04 20:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 8:50 [PATCH] staging: rts5208: Remove wrapper function Amitoj Kaur Chawla
2015-11-04 20:10 ` [Outreachy kernel] " Greg KH
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.