Skip to content

Commit f46f0fb

Browse files
committed
drm: smidrm: ddk750: fix strict-prototypes warning
deepin inclusion category: other Just makes clang build happy, no functional change. Log: 2025-11-19T10:09:43.3657557Z drivers/gpu/drm/smidrm/ddk750/ddk750_power.c:72:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T10:09:43.3673893Z 72 | unsigned long getPowerMode() 2025-11-19T10:09:43.3674636Z | ^ 2025-11-19T10:09:43.3675615Z | void 2025-11-19T10:09:43.3734385Z 1 error generated. 2025-11-19T09:16:36.1737153Z drivers/gpu/drm/smidrm/ddk750/ddk750_chip.c:64:39: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T09:16:36.1743256Z 64 | logical_chip_type_t ddk750_getChipType() 2025-11-19T09:16:36.1745432Z | ^ 2025-11-19T09:16:36.1747272Z | void 2025-11-19T09:16:36.1752477Z drivers/gpu/drm/smidrm/ddk750/ddk750_chip.c:73:35: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T09:16:36.1757687Z 73 | void ddk750_resetFrameBufferMemory() 2025-11-19T09:16:36.1760926Z | ^ 2025-11-19T09:16:36.1764285Z CC [M] drivers/gpu/drm/mgag200/mgag200_g200se.o 2025-11-19T09:16:36.1769831Z | void 2025-11-19T09:16:36.1803138Z drivers/gpu/drm/smidrm/ddk750/ddk750_chip.c:205:21: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T09:16:36.1808661Z 205 | long ddk750_initChip() 2025-11-19T09:16:36.1810285Z | ^ 2025-11-19T09:16:36.1811231Z | void 2025-11-19T09:16:36.1811780Z 3 errors generated. 2025-11-19T07:49:35.4025494Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:255:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4027365Z 255 | unsigned long getChipClock() 2025-11-19T07:49:35.4028223Z | ^ 2025-11-19T07:49:35.4029015Z | void 2025-11-19T07:49:35.4043181Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:379:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4073953Z 379 | unsigned long getPrimaryDispCtrlClock() 2025-11-19T07:49:35.4075443Z | ^ 2025-11-19T07:49:35.4076477Z | void 2025-11-19T07:49:35.4079714Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:391:40: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4081500Z 391 | unsigned long getSecondaryDispCtrlClock() 2025-11-19T07:49:35.4082170Z | ^ 2025-11-19T07:49:35.4082742Z | void 2025-11-19T07:49:35.4084394Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:403:29: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4086711Z 403 | unsigned long getMasterClock() 2025-11-19T07:49:35.4087261Z | ^ 2025-11-19T07:49:35.4087781Z | void 2025-11-19T07:49:35.4089267Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:441:29: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4090955Z 441 | unsigned long getMemoryClock() 2025-11-19T07:49:35.4091520Z | ^ 2025-11-19T07:49:35.4092057Z | void 2025-11-19T07:49:35.4093569Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:479:37: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4095118Z 479 | unsigned char *getMasterClockDivider() 2025-11-19T07:49:35.4096134Z | ^ 2025-11-19T07:49:35.4096784Z | void 2025-11-19T07:49:35.4098342Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:487:41: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4099857Z 487 | unsigned long getTotalMasterClockDivider() 2025-11-19T07:49:35.4100531Z | ^ 2025-11-19T07:49:35.4101096Z | void 2025-11-19T07:49:35.4102632Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:498:37: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4104141Z 498 | unsigned char *getMemoryClockDivider() 2025-11-19T07:49:35.4104741Z | ^ 2025-11-19T07:49:35.4105297Z | void 2025-11-19T07:49:35.4106877Z drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c:506:41: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T07:49:35.4108577Z 506 | unsigned long getTotalMemoryClockDivider() 2025-11-19T07:49:35.4109191Z | ^ 2025-11-19T07:49:35.4109784Z | void Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 8956ced commit f46f0fb

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

drivers/gpu/drm/smidrm/ddk750/ddk750_chip.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ unsigned long ddk750_getFrameBufSize(void)
6161
* It is one of the following: SM501, SM502, SM107, SM718, SM 750 or
6262
* SM_UNKNOWN.
6363
*/
64-
logical_chip_type_t ddk750_getChipType()
64+
logical_chip_type_t ddk750_getChipType(void)
6565
{
6666
return SM750;
6767
}
@@ -70,7 +70,7 @@ logical_chip_type_t ddk750_getChipType()
7070
* ddk750_resetFrameBufferMemory
7171
* This function resets the Frame Buffer Memory
7272
*/
73-
void ddk750_resetFrameBufferMemory()
73+
void ddk750_resetFrameBufferMemory(void)
7474
{
7575
unsigned long ulReg;
7676
logical_chip_type_t chipType = ddk750_getChipType();
@@ -202,7 +202,7 @@ long ddk750_initChipParamEx(initchip_param_t * pInitParam)
202202
* This function initialize with a default set of parameters.
203203
* Use initChipParam() if you don't want default parameters.
204204
*/
205-
long ddk750_initChip()
205+
long ddk750_initChip(void)
206206
{
207207
initchip_param_t initParam;
208208

drivers/gpu/drm/smidrm/ddk750/ddk750_clock.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ void setChipClock(unsigned long frequency)
252252
* Output:
253253
* The Actual Main Chip clock value.
254254
*/
255-
unsigned long getChipClock()
255+
unsigned long getChipClock(void)
256256
{
257257
pll_value_t pll;
258258

@@ -376,7 +376,7 @@ void setMasterClock(unsigned long frequency)
376376
* Output:
377377
* The Primary Display Control Pixel Clock value in whole number.
378378
*/
379-
unsigned long getPrimaryDispCtrlClock()
379+
unsigned long getPrimaryDispCtrlClock(void)
380380
{
381381
pll_value_t pll;
382382
return getPllValue(PRIMARY_PLL, &pll);
@@ -388,7 +388,7 @@ unsigned long getPrimaryDispCtrlClock()
388388
* Output:
389389
* The Secondary Display Control Pixel Clock value in whole number.
390390
*/
391-
unsigned long getSecondaryDispCtrlClock()
391+
unsigned long getSecondaryDispCtrlClock(void)
392392
{
393393
pll_value_t pll;
394394
return getPllValue(SECONDARY_PLL, &pll);
@@ -400,7 +400,7 @@ unsigned long getSecondaryDispCtrlClock()
400400
* Output:
401401
* The Master Clock value in whole number.
402402
*/
403-
unsigned long getMasterClock()
403+
unsigned long getMasterClock(void)
404404
{
405405
unsigned long value, divisor;
406406

@@ -438,7 +438,7 @@ unsigned long getMasterClock()
438438
* Output:
439439
* The Memory Clock value in whole number.
440440
*/
441-
unsigned long getMemoryClock()
441+
unsigned long getMemoryClock(void)
442442
{
443443
unsigned long value, divisor;
444444

@@ -476,15 +476,15 @@ unsigned long getMemoryClock()
476476
* Output:
477477
* The list of Master Clock divider values.
478478
*/
479-
unsigned char *getMasterClockDivider()
479+
unsigned char *getMasterClockDivider(void)
480480
{
481481
return g_ucMasterClockDivider;
482482
}
483483

484484
/*
485485
* This function gets the total number of Master Clock Divider Values.
486486
*/
487-
unsigned long getTotalMasterClockDivider()
487+
unsigned long getTotalMasterClockDivider(void)
488488
{
489489
return (sizeof(g_ucMasterClockDivider)/sizeof(unsigned char));
490490
}
@@ -495,15 +495,15 @@ unsigned long getTotalMasterClockDivider()
495495
* Output:
496496
* The list of Memory Clock divider values.
497497
*/
498-
unsigned char *getMemoryClockDivider()
498+
unsigned char *getMemoryClockDivider(void)
499499
{
500500
return g_ucMemoryClockDivider;
501501
}
502502

503503
/*
504504
* This function gets the total number of Memory Clock Divider Values.
505505
*/
506-
unsigned long getTotalMemoryClockDivider()
506+
unsigned long getTotalMemoryClockDivider(void)
507507
{
508508
return (sizeof(g_ucMemoryClockDivider)/sizeof(unsigned char));
509509
}

drivers/gpu/drm/smidrm/ddk750/ddk750_power.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void setDPMS(DPMS_t state)
6969
* This function gets the power mode, one of three modes: 0, 1 or Sleep.
7070
* On hardware reset, power mode 0 is default.
7171
*/
72-
unsigned long getPowerMode()
72+
unsigned long getPowerMode(void)
7373
{
7474

7575
return (FIELD_VAL_GET(peekRegisterDWord(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE));

0 commit comments

Comments
 (0)