mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [chanwoo:devfreq-testing 4/4] drivers/devfreq/governor_passive.c:352:4: warning: misleading indentation; statement is not part of the previous 'if'
Date: Thu, 15 Jul 2021 18:52:37 +0800	[thread overview]
Message-ID: <202107151830.4cbBvVHv-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4245 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing
head:   52c939f2c35e2e9108daef8da5dda2c9eca80532
commit: 52c939f2c35e2e9108daef8da5dda2c9eca80532 [4/4] PM / devfreq: passive: Update frequency when start governor
config: x86_64-randconfig-r031-20210715 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0e49c54a8cbd3e779e5526a5888c683c01cc3c50)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/?id=52c939f2c35e2e9108daef8da5dda2c9eca80532
        git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
        git fetch --no-tags chanwoo devfreq-testing
        git checkout 52c939f2c35e2e9108daef8da5dda2c9eca80532
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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/devfreq/governor_passive.c:352:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
                           ret = devfreq_update_target(devfreq, parent->previous_freq);
                           ^
   drivers/devfreq/governor_passive.c:350:3: note: previous statement is here
                   if (parent->previous_freq)
                   ^
   1 warning generated.


vim +/if +352 drivers/devfreq/governor_passive.c

   322	
   323	static int devfreq_passive_event_handler(struct devfreq *devfreq,
   324					unsigned int event, void *data)
   325	{
   326		struct devfreq_passive_data *p_data
   327				= (struct devfreq_passive_data *)devfreq->data;
   328		struct devfreq *parent = (struct devfreq *)p_data->parent;
   329		struct notifier_block *nb = &p_data->nb;
   330		int ret = 0;
   331	
   332		if (p_data->parent_type == DEVFREQ_PARENT_DEV && !parent)
   333			return -EPROBE_DEFER;
   334	
   335		switch (event) {
   336		case DEVFREQ_GOV_START:
   337			if (!p_data->this)
   338				p_data->this = devfreq;
   339	
   340			/*
   341			 * If the parent device changes the their frequency before
   342			 * registering the passive device, the passive device cannot
   343			 * receive the notification from parent device and then the
   344			 * passive device cannot be able to set the proper frequency
   345			 * according to the frequency of parent device.
   346			 *
   347			 * When start the passive governor, update the frequency
   348			 * according to the frequency of parent device.
   349			 */
   350			if (parent->previous_freq)
   351				mutex_lock(&devfreq->lock);
 > 352				ret = devfreq_update_target(devfreq, parent->previous_freq);
   353				if (ret < 0) {
   354					dev_warn(&devfreq->dev,
   355					"failed to update devfreq using passive governor\n");
   356				mutex_unlock(&devfreq->lock);
   357			}
   358	
   359			if (p_data->parent_type == DEVFREQ_PARENT_DEV) {
   360				nb->notifier_call = devfreq_passive_notifier_call;
   361				ret = devfreq_register_notifier(parent, nb,
   362							DEVFREQ_TRANSITION_NOTIFIER);
   363			} else if (p_data->parent_type == CPUFREQ_PARENT_DEV) {
   364				ret = cpufreq_passive_register_notifier(devfreq);
   365			} else {
   366				ret = -EINVAL;
   367			}
   368			break;
   369		case DEVFREQ_GOV_STOP:
   370			if (p_data->parent_type == DEVFREQ_PARENT_DEV)
   371				WARN_ON(devfreq_unregister_notifier(parent, nb,
   372							DEVFREQ_TRANSITION_NOTIFIER));
   373			else if (p_data->parent_type == CPUFREQ_PARENT_DEV)
   374				WARN_ON(cpufreq_passive_unregister_notifier(devfreq));
   375			else
   376				ret = -EINVAL;
   377			break;
   378		default:
   379			break;
   380		}
   381	
   382		return ret;
   383	}
   384	

---
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: 37008 bytes --]

                 reply	other threads:[~2021-07-15 10:52 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=202107151830.4cbBvVHv-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=cw00.choi@samsung.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®