Skip to content

Commit 4120d1a

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-19T11:09:53.6529129Z drivers/gpu/drm/smidrm/ddk750/ddk750_2d.c:57:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2025-11-19T11:09:53.6530540Z 57 | void deReset() 2025-11-19T11:09:53.6530958Z | ^ 2025-11-19T11:09:53.6531401Z | void 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 4120d1a

21 files changed

Lines changed: 60 additions & 60 deletions

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void ddk750_deInit(void)
5454
* 1) Aborting the current 2D operation.
5555
* 2) Re-enable 2D engine to normal state.
5656
*/
57-
void deReset()
57+
void deReset(void)
5858
{
5959
unsigned long sysCtrl;
6060
logical_chip_type_t chipType = ddk750_getChipType();
@@ -2590,7 +2590,7 @@ long deNextLineStrip(
25902590
* This function has to be called to end the Line Strip drawing.
25912591
* Otherwise, the next 2D function might still use this function.
25922592
*/
2593-
long deStopLineStrip()
2593+
long deStopLineStrip(void)
25942594
{
25952595
if (deWaitForNotBusy() != 0)
25962596
{

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_hwi2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ long ddk750_AdaptHWI2CInit(struct smi_connector *connector)
155155
/*
156156
* This function closes the hardware i2c.
157157
*/
158-
void ddk750_hwI2CClose()
158+
void ddk750_hwI2CClose(void)
159159
{
160160
unsigned long value;
161161

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));

drivers/gpu/drm/smidrm/ddk768/ddk768_2d.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* This function must be called before other 2D functions.
2929
* Assumption: A specific video mode has been properly set up.
3030
*/
31-
void ddk768_deInit()
31+
void ddk768_deInit(void)
3232
{
3333
ddk768_enable2DEngine(1);
3434

@@ -60,7 +60,7 @@ void ddk768_deInit()
6060
* 1) Aborting the current 2D operation.
6161
* 2) Re-enable 2D engine to normal state.
6262
*/
63-
void ddk768_deReset()
63+
void ddk768_deReset(void)
6464
{
6565
#if 0 /* Cheok(2/11/2014): Not sure which registers are used for Falcon */
6666
unsigned long sysCtrl;
@@ -526,7 +526,7 @@ long ddk768_deNextTrapezoidFill(
526526
* This function has to be called to end the Trapezoid Fill drawing.
527527
* Otherwise, the next 2D function might still use this function.
528528
*/
529-
long ddk768_deStopTrapezoidFill()
529+
long ddk768_deStopTrapezoidFill(void)
530530
{
531531
if (ddk768_deWaitForNotBusy() != 0)
532532
{

drivers/gpu/drm/smidrm/ddk768/ddk768_chip.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ unsigned int ddk768_getPixelType(void)
4646
/*
4747
* This function returns frame buffer memory size in Byte units.
4848
*/
49-
unsigned long ddk768_getFrameBufSize()
49+
unsigned long ddk768_getFrameBufSize(void)
5050
{
5151
#if 0
5252
return SMI_MEMORY_SIZE_SM768;
@@ -81,7 +81,7 @@ unsigned long ddk768_getFrameBufSize()
8181
* It is one of the following: SM501, SM502, SM107, SM718, SM 750 or
8282
* SM_UNKNOWN.
8383
*/
84-
logical_chip_type_t ddk768_getChipType()
84+
logical_chip_type_t ddk768_getChipType(void)
8585
{
8686

8787
logical_chip_type_t chip;
@@ -97,7 +97,7 @@ logical_chip_type_t ddk768_getChipType()
9797
* Return a char string name of the current chip.
9898
* It's convenient for application need to display the chip name.
9999
*/
100-
char *ddk768_getChipTypeString()
100+
char *ddk768_getChipTypeString(void)
101101
{
102102
char * chipName;
103103

@@ -165,7 +165,7 @@ long ddk768_initChipParamEx(initchip_param_t * pInitParam)
165165
* Return: 0 (or NO_ERROR) if successful.
166166
* -1 if fail.
167167
*/
168-
long ddk768_initChip()
168+
long ddk768_initChip(void)
169169
{
170170
initchip_param_t initParam;
171171

@@ -184,7 +184,7 @@ long ddk768_initChip()
184184
Program DDR PHY register PIR to do DDR training.
185185
Other parameters for training are assumed well set before calling here.
186186
*/
187-
void ddrTraining()
187+
void ddrTraining(void)
188188
{
189189
unsigned long ulTmp;
190190

drivers/gpu/drm/smidrm/ddk768/ddk768_display.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* 0 - Success
2121
* 1 - Fail
2222
*/
23-
long initDisplay()
23+
long initDisplay(void)
2424
{
2525

2626
#if 0
@@ -560,7 +560,7 @@ long setCloneViewOn(disp_control_t dataPath)
560560
/*
561561
* Convenient function to turn on dual view
562562
*/
563-
long setDualViewOn()
563+
long setDualViewOn(void)
564564
{
565565
setSingleViewOn(CHANNEL0_CTRL);
566566
setSingleViewOn(CHANNEL1_CTRL);
@@ -571,7 +571,7 @@ long setDualViewOn()
571571
/*
572572
* Convenient function to turn off all views
573573
*/
574-
long setAllViewOff()
574+
long setAllViewOff(void)
575575
{
576576
setSingleViewOff(CHANNEL0_CTRL); /* Turn Off monitor 0 */
577577
setSingleViewOff(CHANNEL1_CTRL); /* Turn Off monitor 1 */

drivers/gpu/drm/smidrm/ddk768/ddk768_ep952.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ unsigned char EP952_Reg_Clear_Bit(unsigned char ByteAddr, unsigned char BitMask)
161161
//--------------------------------------------------------------------------------------------------
162162
// Hardware Interface
163163

164-
void EP952_IIC_Initial()
164+
void EP952_IIC_Initial(void)
165165
{
166166
unsigned char Temp_Data[15] = {0};
167167
IIC_EP952_Addr = 0x52; // EP952 slave address

drivers/gpu/drm/smidrm/ddk768/ddk768_iis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void iisOpen(
7272
/*
7373
* Turn off I2S and close GPIO
7474
*/
75-
void iisClose()
75+
void iisClose(void)
7676
{
7777
unsigned long value;
7878

0 commit comments

Comments
 (0)