Message ID | 20210208233119.391103-2-bigeasy@linutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: Replace in_interrupt() usage. | expand |
On Tue, Feb 09, 2021 at 12:31:16AM +0100, Sebastian Andrzej Siewior wrote: > The driver is using msleep() if it is safe to use based on in_atomic(). > This is not needed this macro is only used from > i2c_algorithm::master_xfer() which is always invoked from preemptible > context. > > Remove in_atomic() because it is superfluous. Remove wait_for_atomic() > because it has no users. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Applied to drm-misc-next, thanks for your patch. -Daniel > --- > drivers/gpu/drm/gma500/intel_gmbus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c > index 370bd6451bd9b..eb0924473a218 100644 > --- a/drivers/gpu/drm/gma500/intel_gmbus.c > +++ b/drivers/gpu/drm/gma500/intel_gmbus.c > @@ -44,13 +44,13 @@ > ret__ = -ETIMEDOUT; \ > break; \ > } \ > - if (W && !(in_atomic() || in_dbg_master())) msleep(W); \ > + if (W && !(in_dbg_master())) \ > + msleep(W); \ > } \ > ret__; \ > }) > > #define wait_for(COND, MS) _wait_for(COND, MS, 1) > -#define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0) > > #define GMBUS_REG_READ(reg) ioread32(dev_priv->gmbus_reg + (reg)) > #define GMBUS_REG_WRITE(reg, val) iowrite32((val), dev_priv->gmbus_reg + (reg)) > -- > 2.30.0 >
diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c index 370bd6451bd9b..eb0924473a218 100644 --- a/drivers/gpu/drm/gma500/intel_gmbus.c +++ b/drivers/gpu/drm/gma500/intel_gmbus.c @@ -44,13 +44,13 @@ ret__ = -ETIMEDOUT; \ break; \ } \ - if (W && !(in_atomic() || in_dbg_master())) msleep(W); \ + if (W && !(in_dbg_master())) \ + msleep(W); \ } \ ret__; \ }) #define wait_for(COND, MS) _wait_for(COND, MS, 1) -#define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0) #define GMBUS_REG_READ(reg) ioread32(dev_priv->gmbus_reg + (reg)) #define GMBUS_REG_WRITE(reg, val) iowrite32((val), dev_priv->gmbus_reg + (reg))
The driver is using msleep() if it is safe to use based on in_atomic(). This is not needed this macro is only used from i2c_algorithm::master_xfer() which is always invoked from preemptible context. Remove in_atomic() because it is superfluous. Remove wait_for_atomic() because it has no users. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/gpu/drm/gma500/intel_gmbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)