* [PATCH 1/3] staging: comedi: Remove function clk_sce()
@ 2019-06-26 6:54 Nishka Dasgupta
2019-06-26 6:54 ` [PATCH 2/3] staging: comedi: Remove function gat_sce() Nishka Dasgupta
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-06-26 6:54 UTC (permalink / raw)
To: gregkh, devel, abboti, hsweeten; +Cc: Nishka Dasgupta
Remove function clk_sce as all it does is call clk_gat_sce.
Modify call site of clk_sce to call clk_gat_sce instead.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
drivers/staging/comedi/drivers/amplc_dio200_common.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c
index 8697dc02ffb4..efd7428c3cee 100644
--- a/drivers/staging/comedi/drivers/amplc_dio200_common.c
+++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c
@@ -46,12 +46,6 @@ static unsigned char clk_gat_sce(unsigned int which, unsigned int chan,
((source & 030) << 3) | (source & 007);
}
-static unsigned char clk_sce(unsigned int which, unsigned int chan,
- unsigned int source)
-{
- return clk_gat_sce(which, chan, source);
-}
-
static unsigned char gat_sce(unsigned int which, unsigned int chan,
unsigned int source)
{
@@ -500,7 +494,7 @@ static void dio200_subdev_8254_set_clock_src(struct comedi_device *dev,
unsigned int offset = dio200_subdev_8254_offset(dev, s);
dio200_write8(dev, DIO200_CLK_SCE(offset >> 3),
- clk_sce((offset >> 2) & 1, chan, src));
+ clk_gat_sce((offset >> 2) & 1, chan, src));
}
static int dio200_subdev_8254_config(struct comedi_device *dev,
--
2.19.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] staging: comedi: Remove function gat_sce()
2019-06-26 6:54 [PATCH 1/3] staging: comedi: Remove function clk_sce() Nishka Dasgupta
@ 2019-06-26 6:54 ` Nishka Dasgupta
2019-06-26 6:54 ` [PATCH 3/3] staging: comedi: Replace function mite_request_channel_in_range() Nishka Dasgupta
2019-07-01 6:49 ` [PATCH 1/3] staging: comedi: Remove function clk_sce() Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-06-26 6:54 UTC (permalink / raw)
To: gregkh, devel, abboti, hsweeten; +Cc: Nishka Dasgupta
Remove function gat_sce as all it does is call clk_gat_sce.
Modify call sites of the former to call the latter directly.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
drivers/staging/comedi/drivers/amplc_dio200_common.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c
index efd7428c3cee..0b2f04b02ebc 100644
--- a/drivers/staging/comedi/drivers/amplc_dio200_common.c
+++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c
@@ -46,12 +46,6 @@ static unsigned char clk_gat_sce(unsigned int which, unsigned int chan,
((source & 030) << 3) | (source & 007);
}
-static unsigned char gat_sce(unsigned int which, unsigned int chan,
- unsigned int source)
-{
- return clk_gat_sce(which, chan, source);
-}
-
/*
* Periods of the internal clock sources in nanoseconds.
*/
@@ -483,7 +477,7 @@ static void dio200_subdev_8254_set_gate_src(struct comedi_device *dev,
unsigned int offset = dio200_subdev_8254_offset(dev, s);
dio200_write8(dev, DIO200_GAT_SCE(offset >> 3),
- gat_sce((offset >> 2) & 1, chan, src));
+ clk_gat_sce((offset >> 2) & 1, chan, src));
}
static void dio200_subdev_8254_set_clock_src(struct comedi_device *dev,
--
2.19.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] staging: comedi: Replace function mite_request_channel_in_range()
2019-06-26 6:54 [PATCH 1/3] staging: comedi: Remove function clk_sce() Nishka Dasgupta
2019-06-26 6:54 ` [PATCH 2/3] staging: comedi: Remove function gat_sce() Nishka Dasgupta
@ 2019-06-26 6:54 ` Nishka Dasgupta
2019-07-01 6:49 ` [PATCH 1/3] staging: comedi: Remove function clk_sce() Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-06-26 6:54 UTC (permalink / raw)
To: gregkh, devel, abboti, hsweeten; +Cc: Nishka Dasgupta
Remove function mite_request_channel_in_range as all it does is call
__mite_request_channel.
Rename __mite_request_channel to mite_request_channel_in_range and
change its type from static to non-static to maintain compatibility with
call sites.
Change only remaining call site of __mite_request_channel to call
mite_request_channel_in_range_instead.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
drivers/staging/comedi/drivers/mite.c | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c
index 639ec1586976..cc9fc263573e 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -558,7 +558,14 @@ void mite_prep_dma(struct mite_channel *mite_chan,
}
EXPORT_SYMBOL_GPL(mite_prep_dma);
-static struct mite_channel *__mite_request_channel(struct mite *mite,
+/**
+ * mite_request_channel_in_range() - Request a MITE dma channel.
+ * @mite: MITE device.
+ * @ring: MITE dma ring.
+ * @min_channel: minimum channel index to use.
+ * @max_channel: maximum channel index to use.
+ */
+struct mite_channel *mite_request_channel_in_range(struct mite *mite,
struct mite_ring *ring,
unsigned int min_channel,
unsigned int max_channel)
@@ -583,21 +590,6 @@ static struct mite_channel *__mite_request_channel(struct mite *mite,
spin_unlock_irqrestore(&mite->lock, flags);
return mite_chan;
}
-
-/**
- * mite_request_channel_in_range() - Request a MITE dma channel.
- * @mite: MITE device.
- * @ring: MITE dma ring.
- * @min_channel: minimum channel index to use.
- * @max_channel: maximum channel index to use.
- */
-struct mite_channel *mite_request_channel_in_range(struct mite *mite,
- struct mite_ring *ring,
- unsigned int min_channel,
- unsigned int max_channel)
-{
- return __mite_request_channel(mite, ring, min_channel, max_channel);
-}
EXPORT_SYMBOL_GPL(mite_request_channel_in_range);
/**
@@ -608,7 +600,8 @@ EXPORT_SYMBOL_GPL(mite_request_channel_in_range);
struct mite_channel *mite_request_channel(struct mite *mite,
struct mite_ring *ring)
{
- return __mite_request_channel(mite, ring, 0, mite->num_channels - 1);
+ return mite_request_channel_in_range(mite, ring, 0,
+ mite->num_channels - 1);
}
EXPORT_SYMBOL_GPL(mite_request_channel);
--
2.19.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] staging: comedi: Remove function clk_sce()
2019-06-26 6:54 [PATCH 1/3] staging: comedi: Remove function clk_sce() Nishka Dasgupta
2019-06-26 6:54 ` [PATCH 2/3] staging: comedi: Remove function gat_sce() Nishka Dasgupta
2019-06-26 6:54 ` [PATCH 3/3] staging: comedi: Replace function mite_request_channel_in_range() Nishka Dasgupta
@ 2019-07-01 6:49 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2019-07-01 6:49 UTC (permalink / raw)
To: Nishka Dasgupta; +Cc: devel, abboti
On Wed, Jun 26, 2019 at 12:24:02PM +0530, Nishka Dasgupta wrote:
> Remove function clk_sce as all it does is call clk_gat_sce.
> Modify call site of clk_sce to call clk_gat_sce instead.
> Issue found with Coccinelle.
>
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
> ---
> drivers/staging/comedi/drivers/amplc_dio200_common.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
Please put the driver name in the subject, this one would be:
staging: comedi: amplc_dio200: Remove...
Same for the other 2 patches in this series.
Please fix up and resend.
thanks,
greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-01 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 6:54 [PATCH 1/3] staging: comedi: Remove function clk_sce() Nishka Dasgupta
2019-06-26 6:54 ` [PATCH 2/3] staging: comedi: Remove function gat_sce() Nishka Dasgupta
2019-06-26 6:54 ` [PATCH 3/3] staging: comedi: Replace function mite_request_channel_in_range() Nishka Dasgupta
2019-07-01 6:49 ` [PATCH 1/3] staging: comedi: Remove function clk_sce() 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.