tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   46c163a036b41a29b0ec3c475bf97515d755ff41
commit: 16f4c69549ef676bc278be8b267a811b6f8f59ad [4137/5712] drm/amd/display: 
add query HPD interface.

smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:904 
dc_link_get_hpd_state() error: we previously assumed 'hpd_pin' could be null 
(see line 900)

# 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=16f4c69549ef676bc278be8b267a811b6f8f59ad
git remote add linux-next 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 16f4c69549ef676bc278be8b267a811b6f8f59ad
vim +/hpd_pin +904 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c

4562236b Harry Wentland 2017-09-12  892  
16f4c695 Chiawen Huang  2018-09-05  893  bool dc_link_get_hpd_state(struct 
dc_link *dc_link)
16f4c695 Chiawen Huang  2018-09-05  894  {
16f4c695 Chiawen Huang  2018-09-05  895         struct gpio *hpd_pin;
16f4c695 Chiawen Huang  2018-09-05  896         uint32_t state;
16f4c695 Chiawen Huang  2018-09-05  897  
16f4c695 Chiawen Huang  2018-09-05  898         hpd_pin = 
get_hpd_gpio(dc_link->ctx->dc_bios,
16f4c695 Chiawen Huang  2018-09-05  899                                         
dc_link->link_id, dc_link->ctx->gpio_service);
16f4c695 Chiawen Huang  2018-09-05 @900         if (hpd_pin == NULL)
16f4c695 Chiawen Huang  2018-09-05  901                 ASSERT(false);
                                                        ^^^^^^^^^^^^^
This just prints an error message and then we oops later.  We should
handle the error properly or remove this code and just oops.  An oops
will have all the relevant information in the stack trace.

16f4c695 Chiawen Huang  2018-09-05  902  
16f4c695 Chiawen Huang  2018-09-05  903         dal_gpio_open(hpd_pin, 
GPIO_MODE_INTERRUPT);
16f4c695 Chiawen Huang  2018-09-05 @904         dal_gpio_get_value(hpd_pin, 
&state);
16f4c695 Chiawen Huang  2018-09-05  905         dal_gpio_close(hpd_pin);
16f4c695 Chiawen Huang  2018-09-05  906         dal_gpio_destroy_irq(&hpd_pin);
16f4c695 Chiawen Huang  2018-09-05  907  
16f4c695 Chiawen Huang  2018-09-05 @908         return state;
16f4c695 Chiawen Huang  2018-09-05  909  }
16f4c695 Chiawen Huang  2018-09-05  910  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild

Reply via email to