On Thursday, February 23, 2017, Alex Deucher <alexdeucher at gmail.com> wrote: > On Thu, Feb 23, 2017 at 5:50 PM, Alexandre Demers > <alexandre.f.demers at gmail.com <javascript:;>> wrote: > > First, sorry for not replying directly as I should normally, but I'm not > on > > my usual computer, so I can't. That being said... > > > > I may have my eyes in the same socket right now, but I think > > fiji_setup_dpm_led_config() always returns 0. > > > >> + if (mask) > >> + smum_send_msg_to_smc_with_parameter(hwmgr->smumgr, > >> + PPSMC_MSG_LedConfig, > >> + mask); > >> + return 0; > >> +} > > > > Even when "if (mask)" is true, whether smum_send_msg_to_smc_with_ > parameter() > > succeeds or not, fiji_setup_dpm_led_config() spits a 0 at the end. > > > > Thus, > > > >> + result = fiji_setup_dpm_led_config(hwmgr); > >> + PP_ASSERT_WITH_CODE(0 == result, > >> + "Failed to setup dpm led config", return result); > > > > will always lead to "result" being set to 0... Am I missing something? > > > > Yes, that function can't fail. I suppose we could just make it a void > function, but I was following the same pattern of all the other > functions in that file. > > Alex > I see. Well, if there is no forseseeable change that would justify to return a different value, I would be tempted to go with the void. But either way, I'll live with it. Alexandre Demers -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170224/2b6e9b32/attachment.html>