Re: [PATCH 1/8] staging: media: atomisp: initialize settings to 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/05/2023 18:04, Hans de Goede wrote:
> Hi Hans,
> 
> On 5/24/23 14:11, Hans Verkuil wrote:
>> Fix a compiler warning:
>>
>> drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c:1525:13: warning: 'settings' may be used uninitialized [-Wmaybe-uninitialized]
>>
>> The 'settings' variable is actually always initialized, but the
>> compiler isn't quite able to figure that out. Just initialize it
>> to 0 to avoid this warning.
>>
>> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
>> Cc: Hans de Goede <hdegoede@xxxxxxxxxx>
> 
> Thank you for these patches. I have merged this one and 8/8
> into:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp
> 
> I'm currently doing a lot of work on the atomisp code,
> so merging them through my atomisp branch is best to
> avoid conflicts (I already had to resolve a conflict).
> 
> So please refrain from merging 1/8 + 8/8 to some
> other linux-media tree/branch.

I've delegated patches 1 and 8 to you in patchwork.

Regards,

	Hans

> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
>> ---
>>  drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
>> index c718a74ea70a..48ba0d0bcfe5 100644
>> --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
>> +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
>> @@ -1522,7 +1522,7 @@ static int v4l2_acpi_handle_gpio_res(struct acpi_resource *ares, void *_data)
>>  	const char *name;
>>  	bool active_low;
>>  	unsigned int i;
>> -	u32 settings;
>> +	u32 settings = 0;
>>  	u8 pin;
>>  
>>  	if (!acpi_gpio_get_io_resource(ares, &agpio))
> 




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux