lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ae333b46910989862ca2bd17f409833b@iki.fi>
Date:   Thu, 16 Dec 2021 12:20:52 +0200
From:   Jyri Sarha <jyri.sarha@....fi>
To:     Joe Perches <joe@...ches.com>
Cc:     Xiang wangx <wangxiang@...rlc.com>, tomba@...nel.org,
        airlied@...ux.ie, daniel@...ll.ch, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm/tilcdc: add const to of_device_id

On 2021-12-16 11:44, Joe Perches wrote:
> On Thu, 2021-12-16 at 17:26 +0800, Xiang wangx wrote:
>> struct of_device_id should normally be const.
> []
>> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c 
>> b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> []
>> @@ -60,7 +60,7 @@ void tilcdc_module_cleanup(struct tilcdc_module 
>> *mod)
>>  	list_del(&mod->list);
>>  }
>> 
>> -static struct of_device_id tilcdc_of_match[];
>> +static const struct of_device_id tilcdc_of_match[];
> 
> This line could likely be removed instead.
> 
> $ git grep -w -n tilcdc_of_match
> drivers/gpu/drm/tilcdc/tilcdc_drv.c:63:static struct of_device_id
> tilcdc_of_match[];
> drivers/gpu/drm/tilcdc/tilcdc_drv.c:590:static struct of_device_id
> tilcdc_of_match[] = {
> drivers/gpu/drm/tilcdc/tilcdc_drv.c:595:MODULE_DEVICE_TABLE(of,
> tilcdc_of_match);
> drivers/gpu/drm/tilcdc/tilcdc_drv.c:603:
> .of_match_table = tilcdc_of_match,
> 

Oh yes. It appears to have been there from day one and even then it was 
bogus.

Xiang Wang, could you produce one more version of the patch with the 
declaration removed.

Best regards,
Jyri

>> @@ -587,7 +587,7 @@ static int tilcdc_pdev_remove(struct 
>> platform_device *pdev)
>>  	return 0;
>>  }
>> 
>> -static struct of_device_id tilcdc_of_match[] = {
>> +static const struct of_device_id tilcdc_of_match[] = {
>>  		{ .compatible = "ti,am33xx-tilcdc", },
>>  		{ .compatible = "ti,da850-tilcdc", },
>>  		{ },

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ