Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Clean up style problems in amdgpu_dm_irq.c

Fix the following warnings reported by checkpatch:

WARNING: Block comments use a trailing */ on a separate line
WARNING: Comparisons should place the constant on the right side of the test
WARNING: space prohibited between function name and open parenthesis '('
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Srinivasan Shanmugam and committed by
Alex Deucher
2d0b69fc 0c2d77be

+24 -18
+24 -18
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
··· 120 120 121 121 /* Call a DAL subcomponent which registered for interrupt notification 122 122 * at INTERRUPT_LOW_IRQ_CONTEXT. 123 - * (The most common use is HPD interrupt) */ 123 + * (The most common use is HPD interrupt) 124 + */ 124 125 } 125 126 126 127 /* ··· 173 172 174 173 if (handler_removed == false) { 175 174 /* Not necessarily an error - caller may not 176 - * know the context. */ 175 + * know the context. 176 + */ 177 177 return NULL; 178 178 } 179 179 ··· 263 261 static bool validate_irq_unregistration_params(enum dc_irq_source irq_source, 264 262 irq_handler_idx handler_idx) 265 263 { 266 - if (DAL_INVALID_IRQ_HANDLER_IDX == handler_idx) { 264 + if (handler_idx == DAL_INVALID_IRQ_HANDLER_IDX) { 267 265 DRM_ERROR("DM_IRQ: invalid handler_idx==NULL!\n"); 268 266 return false; 269 267 } ··· 345 343 /* This pointer will be stored by code which requested interrupt 346 344 * registration. 347 345 * The same pointer will be needed in order to unregister the 348 - * interrupt. */ 346 + * interrupt. 347 + */ 349 348 350 349 DRM_DEBUG_KMS( 351 350 "DM_IRQ: added irq handler: %p for: dal_src=%d, irq context=%d\n", ··· 393 390 394 391 if (handler_list == NULL) { 395 392 /* If we got here, it means we searched all irq contexts 396 - * for this irq source, but the handler was not found. */ 393 + * for this irq source, but the handler was not found. 394 + */ 397 395 DRM_ERROR( 398 396 "DM_IRQ: failed to find irq handler:%p for irq_source:%d!\n", 399 397 ih, irq_source); ··· 454 450 DM_IRQ_TABLE_LOCK(adev, irq_table_flags); 455 451 /* The handler was removed from the table, 456 452 * it means it is safe to flush all the 'work' 457 - * (because no code can schedule a new one). */ 453 + * (because no code can schedule a new one). 454 + */ 458 455 lh = &adev->dm.irq_handler_list_low_tab[src]; 459 456 DM_IRQ_TABLE_UNLOCK(adev, irq_table_flags); 460 457 ··· 499 494 DM_IRQ_TABLE_UNLOCK(adev, irq_table_flags); 500 495 501 496 if (!list_empty(hnd_list_l)) { 502 - list_for_each_safe (entry, tmp, hnd_list_l) { 497 + list_for_each_safe(entry, tmp, hnd_list_l) { 503 498 handler = list_entry( 504 499 entry, 505 500 struct amdgpu_dm_irq_handler_data, ··· 576 571 if (list_empty(handler_list)) 577 572 return; 578 573 579 - list_for_each_entry (handler_data, handler_list, list) { 574 + list_for_each_entry(handler_data, handler_list, list) { 580 575 if (queue_work(system_highpri_wq, &handler_data->work)) { 581 576 work_queued = true; 582 577 break; ··· 632 627 &adev->dm.irq_handler_list_high_tab[irq_source], 633 628 list) { 634 629 /* Call a subcomponent which registered for immediate 635 - * interrupt notification */ 630 + * interrupt notification 631 + */ 636 632 handler_data->handler(handler_data->handler_arg); 637 633 } 638 634 ··· 670 664 return 0; 671 665 } 672 666 673 - static enum dc_irq_source amdgpu_dm_hpd_to_dal_irq_source(unsigned type) 667 + static enum dc_irq_source amdgpu_dm_hpd_to_dal_irq_source(unsigned int type) 674 668 { 675 669 switch (type) { 676 670 case AMDGPU_HPD_1: ··· 692 686 693 687 static int amdgpu_dm_set_hpd_irq_state(struct amdgpu_device *adev, 694 688 struct amdgpu_irq_src *source, 695 - unsigned type, 689 + unsigned int type, 696 690 enum amdgpu_interrupt_state state) 697 691 { 698 692 enum dc_irq_source src = amdgpu_dm_hpd_to_dal_irq_source(type); ··· 704 698 705 699 static inline int dm_irq_state(struct amdgpu_device *adev, 706 700 struct amdgpu_irq_src *source, 707 - unsigned crtc_id, 701 + unsigned int crtc_id, 708 702 enum amdgpu_interrupt_state state, 709 703 const enum irq_type dal_irq_type, 710 704 const char *func) ··· 735 729 736 730 static int amdgpu_dm_set_pflip_irq_state(struct amdgpu_device *adev, 737 731 struct amdgpu_irq_src *source, 738 - unsigned crtc_id, 732 + unsigned int crtc_id, 739 733 enum amdgpu_interrupt_state state) 740 734 { 741 735 return dm_irq_state( ··· 749 743 750 744 static int amdgpu_dm_set_crtc_irq_state(struct amdgpu_device *adev, 751 745 struct amdgpu_irq_src *source, 752 - unsigned crtc_id, 746 + unsigned int crtc_id, 753 747 enum amdgpu_interrupt_state state) 754 748 { 755 749 return dm_irq_state( ··· 899 893 900 894 const struct dc_link *dc_link = amdgpu_dm_connector->dc_link; 901 895 902 - if (DC_IRQ_SOURCE_INVALID != dc_link->irq_source_hpd) { 896 + if (dc_link->irq_source_hpd != DC_IRQ_SOURCE_INVALID) { 903 897 dc_interrupt_set(adev->dm.dc, 904 898 dc_link->irq_source_hpd, 905 899 true); 906 900 } 907 901 908 - if (DC_IRQ_SOURCE_INVALID != dc_link->irq_source_hpd_rx) { 902 + if (dc_link->irq_source_hpd_rx != DC_IRQ_SOURCE_INVALID) { 909 903 dc_interrupt_set(adev->dm.dc, 910 904 dc_link->irq_source_hpd_rx, 911 905 true); ··· 934 928 to_amdgpu_dm_connector(connector); 935 929 const struct dc_link *dc_link = amdgpu_dm_connector->dc_link; 936 930 937 - if (DC_IRQ_SOURCE_INVALID != dc_link->irq_source_hpd) { 931 + if (dc_link->irq_source_hpd != DC_IRQ_SOURCE_INVALID) { 938 932 dc_interrupt_set(adev->dm.dc, 939 933 dc_link->irq_source_hpd, 940 934 false); 941 935 } 942 936 943 - if (DC_IRQ_SOURCE_INVALID != dc_link->irq_source_hpd_rx) { 937 + if (dc_link->irq_source_hpd_rx != DC_IRQ_SOURCE_INVALID) { 944 938 dc_interrupt_set(adev->dm.dc, 945 939 dc_link->irq_source_hpd_rx, 946 940 false);