mbox series

[v2,0/4] block: constify some structures of partitions/core.c

Message ID 20230419-const-partition-v2-0-817b58f85cd1@weissschuh.net (mailing list archive)
Headers show
Series block: constify some structures of partitions/core.c | expand

Message

Thomas Weißschuh April 19, 2023, 1:22 p.m. UTC
A few structures containing function pointers that could and should be
const are not. Change that.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v2:
- Use correct syntax for const array of function pointers.
  Reported by LKP bot.
- Link to v1: https://lore.kernel.org/r/20230419-const-partition-v1-0-2d66f2d83873@weissschuh.net

---
Thomas Weißschuh (4):
      block: constify partition prober array
      block: constify struct part_type part_type
      block: constify struct part_attr_group
      block: constify the whole_disk device_attribute

 block/partitions/core.c | 8 ++++----
 include/linux/blkdev.h  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
base-commit: af67688dca57999fd848f051eeea1d375ba546b2
change-id: 20230419-const-partition-a06b9f76b2f3

Best regards,

Comments

Thomas Weißschuh May 30, 2023, 4:52 p.m. UTC | #1
Hi Jens,

could you take a look at this?

Thanks,
Thomas

On 2023-04-19 15:22:52+0200, Thomas Weißschuh wrote:
> A few structures containing function pointers that could and should be
> const are not. Change that.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Changes in v2:
> - Use correct syntax for const array of function pointers.
>   Reported by LKP bot.
> - Link to v1: https://lore.kernel.org/r/20230419-const-partition-v1-0-2d66f2d83873@weissschuh.net
> 
> ---
> Thomas Weißschuh (4):
>       block: constify partition prober array
>       block: constify struct part_type part_type
>       block: constify struct part_attr_group
>       block: constify the whole_disk device_attribute
> 
>  block/partitions/core.c | 8 ++++----
>  include/linux/blkdev.h  | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> ---
> base-commit: af67688dca57999fd848f051eeea1d375ba546b2
> change-id: 20230419-const-partition-a06b9f76b2f3
> 
> Best regards,
> -- 
> Thomas Weißschuh <linux@weissschuh.net>
>
Jens Axboe May 30, 2023, 5:02 p.m. UTC | #2
On 5/30/23 10:52 AM, Thomas Weißschuh wrote:
> Hi Jens,
> 
> could you take a look at this?

Looks fine to me, more const always a good thing. Can you respin
it against for-6.5/block?