diff mbox series

[RFC,01/13] staging: mmal-vchiq: Avoid use of bool in structures

Message ID 20240303152635.2762696-2-maarten@rmail.be
State New
Headers show
Series bcm2835-codec: driver for HW codecs | expand

Commit Message

Maarten March 3, 2024, 3:09 p.m. UTC
From: Dave Stevenson <dave.stevenson@raspberrypi.org>

Fixes up a checkpatch error "Avoid using bool structure members
because of possible alignment issues".

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Maarten Vanraes <maarten@rmail.be>
---
 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maarten March 5, 2024, 6 p.m. UTC | #1
Andrzej Pietrasiewicz schreef op 2024-03-04 08:30:
> Hi Maarten,
> 
> W dniu 3.03.2024 o 16:09, Maarten Vanraes pisze:
>> From: Dave Stevenson <dave.stevenson@raspberrypi.org>
>> 
>> Fixes up a checkpatch error "Avoid using bool structure members
>> because of possible alignment issues".
>> 
> 
> This commit message might be confusing, because...
> 
>> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
>> Signed-off-by: Maarten Vanraes <maarten@rmail.be>
>> ---
>>   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c 
>> b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
>> index 890669f874d9..2e616604943d 100644
>> --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
>> +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
>> @@ -1983,7 +1983,7 @@ int vchiq_mmal_component_enable(struct 
>> vchiq_mmal_instance *instance,
>>     	ret = enable_component(instance, component);
>>   	if (ret == 0)
>> -		component->enabled = true;
>> +		component->enabled = 1;
> 
> ... what the patch changes is not a structure member, it is the value
> assigned (with a potential implicit cast) to a structure member.
> 
> Regards,
> 
> Andrzej
> 
>>     	mutex_unlock(&instance->vchiq_mutex);
>> 

I guess it's due to the "checkpatch", but I'll adapt the message in v2.

Thanks!
diff mbox series

Patch

diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
index 890669f874d9..2e616604943d 100644
--- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
@@ -1983,7 +1983,7 @@  int vchiq_mmal_component_enable(struct vchiq_mmal_instance *instance,
 
 	ret = enable_component(instance, component);
 	if (ret == 0)
-		component->enabled = true;
+		component->enabled = 1;
 
 	mutex_unlock(&instance->vchiq_mutex);