* [PATCH 2/7] Staging: comedi: Remove wrapper function definition
@ 2019-10-23 23:43 Evan Chime
2019-10-24 4:48 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Evan Chime @ 2019-10-23 23:43 UTC (permalink / raw)
To: gregkh; +Cc: hsweeten, abbotti, outreachy-kernel
Remove wrapper function "comedi_buf_map_get" definition as part of remove
all wrappers in drivers/staging/comedi/TODO, and replace reference of the
wrapper function in the file with the wrapped code
Signed-off-by: Evan Chime <chime.evan.dri.devel@gmail.com>
---
drivers/staging/comedi/comedi_buf.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c
index 3ef3ddabf139..b6a9b5840afb 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -187,12 +187,6 @@ static void __comedi_buf_alloc(struct comedi_device *dev,
}
}
-void comedi_buf_map_get(struct comedi_buf_map *bm)
-{
- if (bm)
- kref_get(&bm->refcount);
-}
-
int comedi_buf_map_put(struct comedi_buf_map *bm)
{
if (bm)
@@ -239,7 +233,7 @@ comedi_buf_map_from_subdev_get(struct comedi_subdevice *s)
bm = async->buf_map;
/* only want it if buffer pages allocated */
if (bm && bm->n_pages)
- comedi_buf_map_get(bm);
+ kref_get(&bm->refcount);
else
bm = NULL;
spin_unlock_irqrestore(&s->spin_lock, flags);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/7] Staging: comedi: Remove wrapper function definition
2019-10-23 23:43 [PATCH 2/7] Staging: comedi: Remove wrapper function definition Evan Chime
@ 2019-10-24 4:48 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2019-10-24 4:48 UTC (permalink / raw)
To: Evan Chime; +Cc: gregkh, hsweeten, abbotti, outreachy-kernel
On Thu, 24 Oct 2019, Evan Chime wrote:
> Remove wrapper function "comedi_buf_map_get" definition as part of remove
> all wrappers in drivers/staging/comedi/TODO, and replace reference of the
> wrapper function in the file with the wrapped code
>
> Signed-off-by: Evan Chime <chime.evan.dri.devel@gmail.com>
> ---
> drivers/staging/comedi/comedi_buf.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c
> index 3ef3ddabf139..b6a9b5840afb 100644
> --- a/drivers/staging/comedi/comedi_buf.c
> +++ b/drivers/staging/comedi/comedi_buf.c
> @@ -187,12 +187,6 @@ static void __comedi_buf_alloc(struct comedi_device *dev,
> }
> }
>
> -void comedi_buf_map_get(struct comedi_buf_map *bm)
> -{
> - if (bm)
> - kref_get(&bm->refcount);
> -}
> -
Again, removing the definition in patch 2 and a use in patch 3 doesn't
look like the right thing to do.
julia
> int comedi_buf_map_put(struct comedi_buf_map *bm)
> {
> if (bm)
> @@ -239,7 +233,7 @@ comedi_buf_map_from_subdev_get(struct comedi_subdevice *s)
> bm = async->buf_map;
> /* only want it if buffer pages allocated */
> if (bm && bm->n_pages)
> - comedi_buf_map_get(bm);
> + kref_get(&bm->refcount);
> else
> bm = NULL;
> spin_unlock_irqrestore(&s->spin_lock, flags);
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191023234335.GA4557%40ik-ubuntu.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-24 4:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 23:43 [PATCH 2/7] Staging: comedi: Remove wrapper function definition Evan Chime
2019-10-24 4:48 ` [Outreachy kernel] " Julia Lawall
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.