From: kernel test robot <lkp@intel.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: kbuild-all@lists.01.org, platform-driver-x86@vger.kernel.org,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>
Subject: [platform-drivers-x86:review-andy 44/55] drivers/platform/x86/ideapad-laptop.c:659:5: warning: no previous prototype for 'dytc_profile_get'
Date: Thu, 4 Feb 2021 04:37:38 +0800 [thread overview]
Message-ID: <202102040432.nrBYesxd-lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2021-02-03 20:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202102040432.nrBYesxd-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dvhart@infradead.org \
--cc=hdegoede@redhat.com \
--cc=jiaxun.yang@flygoat.com \
--cc=kbuild-all@lists.01.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox