Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/solomon: Use drm_WARN_ON_ONCE instead of WARN_ON

To prevent log spam, convert all instances to the DRM-specific
drm_WARN_ON_ONCE() macro. This ensures that a warning is emitted only
the first time the condition is met for a given device instance, which
is the desired behavior within the graphics subsystem.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Link: https://lore.kernel.org/r/20250920-improve-ssd130x-v2-2-77721e87ae08@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

authored by

Iker Pedrosa and committed by
Javier Martinez Canillas
683bb242 2258f039

+4 -4
+4 -4
drivers/gpu/drm/solomon/ssd130x.c
··· 1393 1393 { 1394 1394 struct ssd130x_plane_state *ssd130x_state; 1395 1395 1396 - WARN_ON(plane->state); 1396 + drm_WARN_ON_ONCE(plane->dev, plane->state); 1397 1397 1398 1398 ssd130x_state = kzalloc(sizeof(*ssd130x_state), GFP_KERNEL); 1399 1399 if (!ssd130x_state) ··· 1408 1408 struct ssd130x_plane_state *old_ssd130x_state; 1409 1409 struct ssd130x_plane_state *ssd130x_state; 1410 1410 1411 - if (WARN_ON(!plane->state)) 1411 + if (drm_WARN_ON_ONCE(plane->dev, !plane->state)) 1412 1412 return NULL; 1413 1413 1414 1414 old_ssd130x_state = to_ssd130x_plane_state(plane->state); ··· 1558 1558 { 1559 1559 struct ssd130x_crtc_state *ssd130x_state; 1560 1560 1561 - WARN_ON(crtc->state); 1561 + drm_WARN_ON_ONCE(crtc->dev, crtc->state); 1562 1562 1563 1563 ssd130x_state = kzalloc(sizeof(*ssd130x_state), GFP_KERNEL); 1564 1564 if (!ssd130x_state) ··· 1572 1572 struct ssd130x_crtc_state *old_ssd130x_state; 1573 1573 struct ssd130x_crtc_state *ssd130x_state; 1574 1574 1575 - if (WARN_ON(!crtc->state)) 1575 + if (drm_WARN_ON_ONCE(crtc->dev, !crtc->state)) 1576 1576 return NULL; 1577 1577 1578 1578 old_ssd130x_state = to_ssd130x_crtc_state(crtc->state);