* [PATCH] drm/nouveau/nouveau_bo: Remove unused function
@ 2015-01-11 22:31 Rickard Strandqvist
2015-01-13 2:01 ` Alexandre Courbot
0 siblings, 1 reply; 3+ messages in thread
From: Rickard Strandqvist @ 2015-01-11 22:31 UTC (permalink / raw)
To: David Airlie, Ben Skeggs
Cc: Rickard Strandqvist, Maarten Lankhorst, Alexandre Courbot,
Alex Deucher, Christian König, dri-devel, linux-kernel
Remove the function nouveau_bo_rd16() that is not used anywhere.
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 12 ------------
drivers/gpu/drm/nouveau/nouveau_bo.h | 1 -
2 files changed, 13 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 3d474ac..7cde2e0 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -418,18 +418,6 @@ nouveau_bo_validate(struct nouveau_bo *nvbo, bool interruptible,
return 0;
}
-u16
-nouveau_bo_rd16(struct nouveau_bo *nvbo, unsigned index)
-{
- bool is_iomem;
- u16 *mem = ttm_kmap_obj_virtual(&nvbo->kmap, &is_iomem);
- mem = &mem[index];
- if (is_iomem)
- return ioread16_native((void __force __iomem *)mem);
- else
- return *mem;
-}
-
void
nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val)
{
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h
index 22d2c76..82aaebd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.h
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.h
@@ -77,7 +77,6 @@ int nouveau_bo_unpin(struct nouveau_bo *);
int nouveau_bo_map(struct nouveau_bo *);
void nouveau_bo_unmap(struct nouveau_bo *);
void nouveau_bo_placement_set(struct nouveau_bo *, u32 type, u32 busy);
-u16 nouveau_bo_rd16(struct nouveau_bo *, unsigned index);
void nouveau_bo_wr16(struct nouveau_bo *, unsigned index, u16 val);
u32 nouveau_bo_rd32(struct nouveau_bo *, unsigned index);
void nouveau_bo_wr32(struct nouveau_bo *, unsigned index, u32 val);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/nouveau/nouveau_bo: Remove unused function
2015-01-11 22:31 [PATCH] drm/nouveau/nouveau_bo: Remove unused function Rickard Strandqvist
@ 2015-01-13 2:01 ` Alexandre Courbot
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2015-01-13 2:01 UTC (permalink / raw)
To: Rickard Strandqvist, David Airlie, Ben Skeggs
Cc: Maarten Lankhorst, Alex Deucher, Christian König, dri-devel,
linux-kernel
On 01/12/2015 07:31 AM, Rickard Strandqvist wrote:
> Remove the function nouveau_bo_rd16() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
nouveau_bo_wr16() being presumably used (since it is not removed by this
patch), it sounds safe to keep its read counterpart?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/nouveau/nouveau_bo: Remove unused function
@ 2015-01-13 2:01 ` Alexandre Courbot
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2015-01-13 2:01 UTC (permalink / raw)
To: Rickard Strandqvist, David Airlie, Ben Skeggs
Cc: Alex Deucher, Christian König, dri-devel, linux-kernel
On 01/12/2015 07:31 AM, Rickard Strandqvist wrote:
> Remove the function nouveau_bo_rd16() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
nouveau_bo_wr16() being presumably used (since it is not removed by this
patch), it sounds safe to keep its read counterpart?
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-13 2:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-11 22:31 [PATCH] drm/nouveau/nouveau_bo: Remove unused function Rickard Strandqvist
2015-01-13 2:01 ` Alexandre Courbot
2015-01-13 2:01 ` Alexandre Courbot
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.