[PATCH v1 1/6] RISC-V: hwprobe: Clarify cpus size parameter

Conor Dooley conor at kernel.org
Thu Oct 12 06:38:08 PDT 2023


On Wed, Oct 11, 2023 at 03:56:12PM +0200, Andrew Jones wrote:
> The "count" parameter associated with the 'cpus' parameter of the
> hwprobe syscall is the size in bytes of 'cpus'. Naming it 'cpu_count'
> may mislead users (it did me) to think it's the number of CPUs that
> are or can be represented by 'cpus' instead. This is particularly
> easy (IMO) to get wrong since 'cpus' is documented to be defined by
> CPU_SET(3) and CPU_SET(3) also documents a CPU_COUNT() (the number
> of CPUs in set) macro. CPU_SET(3) refers to the size of cpu sets
> with 'setsize'. Adopt 'cpusetsize' for the hwprobe parameter and
> specifically state it is in bytes in Documentation/riscv/hwprobe.rst
> to clarify.
> 
> Reviewed-by: Palmer Dabbelt <palmer at rivosinc.com>
> Signed-off-by: Andrew Jones <ajones at ventanamicro.com>

Reviewed-by: Conor Dooley <conor.dooley at microchip.com>

Thanks,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20231012/7b0f03b3/attachment.sig>


More information about the linux-riscv mailing list