Skip to content

Staging: xgifb: Remove CRIT[FLAGS | BEGIN | END] defines nd conditional spinlock compilation logic

Javier Martinez Canillas kernel-janitors lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Staging: xgifb: Remove CRIT[FLAGS | BEGIN | END] defines usagedrivers/staging/xgifb/XGI_accel.c+24 -191 reply
2/2Staging: xgifb: Removes CRIT[FLAGS | BEGIN | END] defines and conditional spinlock compilation logicdrivers/staging/xgifb/XGI_accel.h+0 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Staging: xgifb: Remove CRIT[FLAGS | BEGIN | END] defines nd conditional spinlock compilation logic

xgifb staging driver uses a set of defines that hides the synchronization mechanism used to access critical sections. Also, the use of spinlocks can be disabled in compile time.

Since the spinlocks ABI only are used in contexts were critical section exists (UP with preemption enabled and SMP machines), I think we should always have the spinlocks enabled and let the spinlock ABI choose to include the spinlocks or not. In the other hand if the driver doesn't need locking at all, then maybe we should just delete the spinlock logic.

This patchset first replaces all the defines used with explicit definitions, then removes all the defines and the spinlocks optional compilation logic.

The patchset is composed of the following patches:

[PATCH 1/2] Staging: xgifb: Remove CRIT[FLAGS | BEGIN | END] defines usage
[PATCH 2/2] Staging: xgifb: Removes CRIT[FLAGS | BEGIN | END] defines and conditional spinlock compilation logic