lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/7] tty: serial: samsung: constify s3c24xx_serial_drv_data
From
On 07/03/2022 07:36, Jiri Slaby wrote:
> On 04. 03. 22, 9:03, Krzysztof Kozlowski wrote:
>> The driver data (struct s3c24xx_serial_drv_data) is only used to
>> initialize the driver properly and is not modified. Make it const.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ...
>> @@ -2726,13 +2726,13 @@ static struct s3c24xx_serial_drv_data s3c6400_serial_drv_data = {
>> .ufcon = S3C2410_UFCON_DEFAULT,
>> },
>> };
>> -#define S3C6400_SERIAL_DRV_DATA ((kernel_ulong_t)&s3c6400_serial_drv_data)
>> +#define S3C6400_SERIAL_DRV_DATA (&s3c6400_serial_drv_data)
>> #else
>> -#define S3C6400_SERIAL_DRV_DATA (kernel_ulong_t)NULL
>> +#define S3C6400_SERIAL_DRV_DATA (NULL)
>> #endif
>>
>> #ifdef CONFIG_CPU_S5PV210
>> -static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
>> +static const struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
>> .info = {
>> .name = "Samsung S5PV210 UART",
>> .type = TYPE_S3C6400,
>> @@ -2755,9 +2755,9 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
>> },
>> .fifosize = { 256, 64, 16, 16 },
>> };
>> -#define S5PV210_SERIAL_DRV_DATA ((kernel_ulong_t)&s5pv210_serial_drv_data)
>> +#define S5PV210_SERIAL_DRV_DATA (&s5pv210_serial_drv_data)
>> #else
>> -#define S5PV210_SERIAL_DRV_DATA (kernel_ulong_t)NULL
>> +#define S5PV210_SERIAL_DRV_DATA (NULL)
>
>
> All these changes are somehow irrelevant to the subject/to this patch.
> Care to put them into a separate patch?
>
> There is no need to put NULL into parentheses.

I wanted to make it consistent with the other, but indeed I can skip it.

>
>> @@ -3062,7 +3062,6 @@ static int __init apple_s5l_early_console_setup(struct earlycon_device *device,
>> OF_EARLYCON_DECLARE(s5l, "apple,s5l-uart", apple_s5l_early_console_setup);
>> #endif
>>
>> -MODULE_ALIAS("platform:samsung-uart");
>
> This is as well a different change to what is claimed.

D'oh, this was not intended. Thanks for spotting it.


Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-03-07 08:50    [W:0.037 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site