Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-08 Thread Thomas Hellström
On Sat, 2024-10-05 at 04:14 +, Matthew Brost wrote: > On Fri, Oct 04, 2024 at 04:28:29PM +0200, Thomas Hellström wrote: > > On Wed, 2024-10-02 at 14:54 +0200, Thomas Hellström wrote: > > > On Wed, 2024-10-02 at 14:45 +0200, Christian König wrote: > > > > Am 02.10.24 um 14:24 schrieb Thomas Hell

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-04 Thread Matthew Brost
On Fri, Oct 04, 2024 at 04:28:29PM +0200, Thomas Hellström wrote: > On Wed, 2024-10-02 at 14:54 +0200, Thomas Hellström wrote: > > On Wed, 2024-10-02 at 14:45 +0200, Christian König wrote: > > > Am 02.10.24 um 14:24 schrieb Thomas Hellström: > > > > The ttm_device_init funcition uses multiple bool

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-04 Thread Thomas Hellström
On Wed, 2024-10-02 at 14:54 +0200, Thomas Hellström wrote: > On Wed, 2024-10-02 at 14:45 +0200, Christian König wrote: > > Am 02.10.24 um 14:24 schrieb Thomas Hellström: > > > The ttm_device_init funcition uses multiple bool arguments. That > > > means > > > readability in the caller becomes poor,

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-04 Thread Thomas Hellström
On Thu, 2024-10-03 at 00:28 -0400, Zack Rusin wrote: > On Wed, Oct 2, 2024 at 8:24 AM Thomas Hellström > wrote: > > > > The ttm_device_init funcition uses multiple bool arguments. That > > means > > readability in the caller becomes poor, and all callers need to > > change if > > yet another bool

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-02 Thread Zack Rusin
On Wed, Oct 2, 2024 at 8:24 AM Thomas Hellström wrote: > > The ttm_device_init funcition uses multiple bool arguments. That means > readability in the caller becomes poor, and all callers need to change if > yet another bool is added. > > Instead use a struct with multiple single-bit flags. This a

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-02 Thread Jani Nikula
On Wed, 02 Oct 2024, Thomas Hellström wrote: > The ttm_device_init funcition uses multiple bool arguments. That means > readability in the caller becomes poor, and all callers need to change if > yet another bool is added. > > Instead use a struct with multiple single-bit flags. This addresses bot

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-02 Thread Thomas Hellström
On Wed, 2024-10-02 at 14:45 +0200, Christian König wrote: > Am 02.10.24 um 14:24 schrieb Thomas Hellström: > > The ttm_device_init funcition uses multiple bool arguments. That > > means > > readability in the caller becomes poor, and all callers need to > > change if > > yet another bool is added.

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-02 Thread Christian König
Am 02.10.24 um 14:24 schrieb Thomas Hellström: The ttm_device_init funcition uses multiple bool arguments. That means readability in the caller becomes poor, and all callers need to change if yet another bool is added. Instead use a struct with multiple single-bit flags. This addresses both prob

[PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-02 Thread Thomas Hellström
The ttm_device_init funcition uses multiple bool arguments. That means readability in the caller becomes poor, and all callers need to change if yet another bool is added. Instead use a struct with multiple single-bit flags. This addresses both problems. Prefer it over using defines or enums with