[v2,0/4] genirq/irq_sim: misc updates

Message ID 20230920075500.96260-1-brgl@bgdev.pl
Headers
Series genirq/irq_sim: misc updates |

Message

Bartosz Golaszewski Sept. 20, 2023, 7:54 a.m. UTC
  Here are a couple of updates to the interrupt simulator. Two are minor:
remove an unused field and reorder includes for readability. The third
one simplifies the error paths by using new cleanup macros. To that end
we also add a cleanup definition for dynamic bitmaps.

v1 -> v2:
- add a NULL-pointer check to the bitmap cleanup macro as advised by
  Peter Zijlstra
- initialize managed pointers when declaring them to create a clear pairing
  between the type and the cleanup action

Bartosz Golaszewski (4):
  bitmap: define a cleanup function for bitmaps
  genirq/irq_sim: remove unused field from struct irq_sim_irq_ctx
  genirq/irq_sim: order headers alphabetically
  genirq/irq_sim: shrink code by using cleanup helpers

 include/linux/bitmap.h |  3 +++
 kernel/irq/irq_sim.c   | 30 ++++++++++++------------------
 2 files changed, 15 insertions(+), 18 deletions(-)
  

Comments

Bartosz Golaszewski Oct. 9, 2023, 12:51 p.m. UTC | #1
On Wed, Sep 20, 2023 at 9:55 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> Here are a couple of updates to the interrupt simulator. Two are minor:
> remove an unused field and reorder includes for readability. The third
> one simplifies the error paths by using new cleanup macros. To that end
> we also add a cleanup definition for dynamic bitmaps.
>
> v1 -> v2:
> - add a NULL-pointer check to the bitmap cleanup macro as advised by
>   Peter Zijlstra
> - initialize managed pointers when declaring them to create a clear pairing
>   between the type and the cleanup action
>
> Bartosz Golaszewski (4):
>   bitmap: define a cleanup function for bitmaps
>   genirq/irq_sim: remove unused field from struct irq_sim_irq_ctx
>   genirq/irq_sim: order headers alphabetically
>   genirq/irq_sim: shrink code by using cleanup helpers
>
>  include/linux/bitmap.h |  3 +++
>  kernel/irq/irq_sim.c   | 30 ++++++++++++------------------
>  2 files changed, 15 insertions(+), 18 deletions(-)
>
> --
> 2.39.2
>

Hi!

Gentle ping for any comments on this series.

Bart