* [platform-drivers-x86:review-andy 44/55] drivers/platform/x86/ideapad-laptop.c:659:5: warning: no previous prototype for 'dytc_profile_get'
@ 2021-02-03 20:37 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-02-03 20:37 UTC (permalink / raw)
To: Jiaxun Yang
Cc: kbuild-all, platform-driver-x86, Darren Hart, Andy Shevchenko,
Hans de Goede
[-- Attachment #1: Type: text/plain, Size: 4954 bytes --]
tree: git://git.infradead.org/linux-platform-drivers-x86.git review-andy
head: 60accc011af0ff869875b1ded81cbd0948267f05
commit: eabe533904cbcb6c7df530fd807cf2a3c3567d35 [44/55] platform/x86: ideapad-laptop: DYTC Platform profile support
config: i386-randconfig-r021-20210203 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git remote add platform-drivers-x86 git://git.infradead.org/linux-platform-drivers-x86.git
git fetch --no-tags platform-drivers-x86 review-andy
git checkout eabe533904cbcb6c7df530fd807cf2a3c3567d35
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/platform/x86/ideapad-laptop.c:659:5: warning: no previous prototype for 'dytc_profile_get' [-Wmissing-prototypes]
659 | int dytc_profile_get(struct platform_profile_handler *pprof,
| ^~~~~~~~~~~~~~~~
>> drivers/platform/x86/ideapad-laptop.c:676:5: warning: no previous prototype for 'dytc_cql_command' [-Wmissing-prototypes]
676 | int dytc_cql_command(struct ideapad_private *priv, int command, int *output)
| ^~~~~~~~~~~~~~~~
>> drivers/platform/x86/ideapad-laptop.c:713:5: warning: no previous prototype for 'dytc_profile_set' [-Wmissing-prototypes]
713 | int dytc_profile_set(struct platform_profile_handler *pprof,
| ^~~~~~~~~~~~~~~~
vim +/dytc_profile_get +659 drivers/platform/x86/ideapad-laptop.c
654
655 /*
656 * dytc_profile_get: Function to register with platform_profile
657 * handler. Returns current platform profile.
658 */
> 659 int dytc_profile_get(struct platform_profile_handler *pprof,
660 enum platform_profile_option *profile)
661 {
662 struct ideapad_dytc_priv *dytc;
663
664 dytc = container_of(pprof, struct ideapad_dytc_priv, pprof);
665 *profile = dytc->current_profile;
666 return 0;
667 }
668
669 /*
670 * Helper function - check if we are in CQL mode and if we are
671 * - disable CQL,
672 * - run the command
673 * - enable CQL
674 * If not in CQL mode, just run the command
675 */
> 676 int dytc_cql_command(struct ideapad_private *priv, int command, int *output)
677 {
678 int err, cmd_err, dummy;
679 int cur_funcmode;
680
681 /* Determine if we are in CQL mode. This alters the commands we do */
682 err = method_dytc(priv->adev->handle, DYTC_CMD_GET, output);
683 if (err)
684 return err;
685
686 cur_funcmode = (*output >> DYTC_GET_FUNCTION_BIT) & 0xF;
687 /* Check if we're OK to return immediately */
688 if ((command == DYTC_CMD_GET) && (cur_funcmode != DYTC_FUNCTION_CQL))
689 return 0;
690
691 if (cur_funcmode == DYTC_FUNCTION_CQL) {
692 err = method_dytc(priv->adev->handle, DYTC_DISABLE_CQL, &dummy);
693 if (err)
694 return err;
695 }
696
697 cmd_err = method_dytc(priv->adev->handle, command, output);
698 /* Check return condition after we've restored CQL state */
699
700 if (cur_funcmode == DYTC_FUNCTION_CQL) {
701 err = method_dytc(priv->adev->handle, DYTC_ENABLE_CQL, &dummy);
702 if (err)
703 return err;
704 }
705
706 return cmd_err;
707 }
708
709 /*
710 * dytc_profile_set: Function to register with platform_profile
711 * handler. Sets current platform profile.
712 */
> 713 int dytc_profile_set(struct platform_profile_handler *pprof,
714 enum platform_profile_option profile)
715 {
716 struct ideapad_dytc_priv *dytc;
717 struct ideapad_private *priv;
718 int output;
719 int err;
720
721 dytc = container_of(pprof, struct ideapad_dytc_priv, pprof);
722 priv = dytc->priv;
723
724 err = mutex_lock_interruptible(&dytc->mutex);
725 if (err)
726 return err;
727
728 if (profile == PLATFORM_PROFILE_BALANCED) {
729 /* To get back to balanced mode we just issue a reset command */
730 err = method_dytc(priv->adev->handle, DYTC_CMD_RESET, &output);
731 if (err)
732 goto unlock;
733 } else {
734 int perfmode;
735
736 err = convert_profile_to_dytc(profile, &perfmode);
737 if (err)
738 goto unlock;
739
740 /* Determine if we are in CQL mode. This alters the commands we do */
741 err = dytc_cql_command(priv,
742 DYTC_SET_COMMAND(DYTC_FUNCTION_MMC, perfmode, 1),
743 &output);
744 if (err)
745 goto unlock;
746 }
747 /* Success - update current profile */
748 dytc->current_profile = profile;
749 unlock:
750 mutex_unlock(&dytc->mutex);
751 return err;
752 }
753
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45760 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [platform-drivers-x86:review-andy 44/55] drivers/platform/x86/ideapad-laptop.c:659:5: warning: no previous prototype for 'dytc_profile_get'
@ 2021-02-03 20:37 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-02-03 20:37 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5090 bytes --]
tree: git://git.infradead.org/linux-platform-drivers-x86.git review-andy
head: 60accc011af0ff869875b1ded81cbd0948267f05
commit: eabe533904cbcb6c7df530fd807cf2a3c3567d35 [44/55] platform/x86: ideapad-laptop: DYTC Platform profile support
config: i386-randconfig-r021-20210203 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git remote add platform-drivers-x86 git://git.infradead.org/linux-platform-drivers-x86.git
git fetch --no-tags platform-drivers-x86 review-andy
git checkout eabe533904cbcb6c7df530fd807cf2a3c3567d35
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/platform/x86/ideapad-laptop.c:659:5: warning: no previous prototype for 'dytc_profile_get' [-Wmissing-prototypes]
659 | int dytc_profile_get(struct platform_profile_handler *pprof,
| ^~~~~~~~~~~~~~~~
>> drivers/platform/x86/ideapad-laptop.c:676:5: warning: no previous prototype for 'dytc_cql_command' [-Wmissing-prototypes]
676 | int dytc_cql_command(struct ideapad_private *priv, int command, int *output)
| ^~~~~~~~~~~~~~~~
>> drivers/platform/x86/ideapad-laptop.c:713:5: warning: no previous prototype for 'dytc_profile_set' [-Wmissing-prototypes]
713 | int dytc_profile_set(struct platform_profile_handler *pprof,
| ^~~~~~~~~~~~~~~~
vim +/dytc_profile_get +659 drivers/platform/x86/ideapad-laptop.c
654
655 /*
656 * dytc_profile_get: Function to register with platform_profile
657 * handler. Returns current platform profile.
658 */
> 659 int dytc_profile_get(struct platform_profile_handler *pprof,
660 enum platform_profile_option *profile)
661 {
662 struct ideapad_dytc_priv *dytc;
663
664 dytc = container_of(pprof, struct ideapad_dytc_priv, pprof);
665 *profile = dytc->current_profile;
666 return 0;
667 }
668
669 /*
670 * Helper function - check if we are in CQL mode and if we are
671 * - disable CQL,
672 * - run the command
673 * - enable CQL
674 * If not in CQL mode, just run the command
675 */
> 676 int dytc_cql_command(struct ideapad_private *priv, int command, int *output)
677 {
678 int err, cmd_err, dummy;
679 int cur_funcmode;
680
681 /* Determine if we are in CQL mode. This alters the commands we do */
682 err = method_dytc(priv->adev->handle, DYTC_CMD_GET, output);
683 if (err)
684 return err;
685
686 cur_funcmode = (*output >> DYTC_GET_FUNCTION_BIT) & 0xF;
687 /* Check if we're OK to return immediately */
688 if ((command == DYTC_CMD_GET) && (cur_funcmode != DYTC_FUNCTION_CQL))
689 return 0;
690
691 if (cur_funcmode == DYTC_FUNCTION_CQL) {
692 err = method_dytc(priv->adev->handle, DYTC_DISABLE_CQL, &dummy);
693 if (err)
694 return err;
695 }
696
697 cmd_err = method_dytc(priv->adev->handle, command, output);
698 /* Check return condition after we've restored CQL state */
699
700 if (cur_funcmode == DYTC_FUNCTION_CQL) {
701 err = method_dytc(priv->adev->handle, DYTC_ENABLE_CQL, &dummy);
702 if (err)
703 return err;
704 }
705
706 return cmd_err;
707 }
708
709 /*
710 * dytc_profile_set: Function to register with platform_profile
711 * handler. Sets current platform profile.
712 */
> 713 int dytc_profile_set(struct platform_profile_handler *pprof,
714 enum platform_profile_option profile)
715 {
716 struct ideapad_dytc_priv *dytc;
717 struct ideapad_private *priv;
718 int output;
719 int err;
720
721 dytc = container_of(pprof, struct ideapad_dytc_priv, pprof);
722 priv = dytc->priv;
723
724 err = mutex_lock_interruptible(&dytc->mutex);
725 if (err)
726 return err;
727
728 if (profile == PLATFORM_PROFILE_BALANCED) {
729 /* To get back to balanced mode we just issue a reset command */
730 err = method_dytc(priv->adev->handle, DYTC_CMD_RESET, &output);
731 if (err)
732 goto unlock;
733 } else {
734 int perfmode;
735
736 err = convert_profile_to_dytc(profile, &perfmode);
737 if (err)
738 goto unlock;
739
740 /* Determine if we are in CQL mode. This alters the commands we do */
741 err = dytc_cql_command(priv,
742 DYTC_SET_COMMAND(DYTC_FUNCTION_MMC, perfmode, 1),
743 &output);
744 if (err)
745 goto unlock;
746 }
747 /* Success - update current profile */
748 dytc->current_profile = profile;
749 unlock:
750 mutex_unlock(&dytc->mutex);
751 return err;
752 }
753
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 45760 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-03 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 20:37 [platform-drivers-x86:review-andy 44/55] drivers/platform/x86/ideapad-laptop.c:659:5: warning: no previous prototype for 'dytc_profile_get' kernel test robot
2021-02-03 20:37 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.