All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Rex Zhu <Rex.Zhu@amd.com>
Cc: Huang Rui <ray.huang@amd.com>,
	kbuild-all@01.org, dri-devel@lists.freedesktop.org
Subject: [radeon-alex:amd-staging-drm-next 1046/1062] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:43:2: note: in expansion of macro 'if'
Date: Thu, 29 Mar 2018 05:35:17 +0800	[thread overview]
Message-ID: <201803290513.qRs6fsPz%fengguang.wu@intel.com> (raw)

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

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head:   6761ccd944db730dca6f9033781b4645a6eecfd4
commit: 8e62ef009a4bb61d25d391d0384f3314cc6d2059 [1046/1062] drm/amd/pp: Use atombios api directly in powerplay
config: i386-randconfig-s1-201812 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        git checkout 8e62ef009a4bb61d25d391d0384f3314cc6d2059
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/string.h:6:0,
                    from include/linux/seq_file.h:6,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/hwmgr.h:26,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.h:27,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:24:
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c: In function 'pp_atomfwctrl_lookup_voltage_type_v4':
   include/linux/compiler.h:58:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
     ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:43:2: note: in expansion of macro 'if'
     if (voltage_type == voltage_object->gpio_voltage_obj.header.voltage_type &&
     ^~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:47:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
      offset += le16_to_cpu(voltage_object->gpio_voltage_obj.header.object_size);
      ^~~~~~

vim +/if +43 drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c

0d2c7569e Eric Huang 2017-03-03 @24  #include "ppatomfwctrl.h"
0d2c7569e Eric Huang 2017-03-03  25  #include "atomfirmware.h"
8e62ef009 Rex Zhu    2018-03-26  26  #include "atom.h"
0d2c7569e Eric Huang 2017-03-03  27  #include "pp_debug.h"
0d2c7569e Eric Huang 2017-03-03  28  
0d2c7569e Eric Huang 2017-03-03  29  static const union atom_voltage_object_v4 *pp_atomfwctrl_lookup_voltage_type_v4(
0d2c7569e Eric Huang 2017-03-03  30  		const struct atom_voltage_objects_info_v4_1 *voltage_object_info_table,
0d2c7569e Eric Huang 2017-03-03  31  		uint8_t voltage_type, uint8_t voltage_mode)
0d2c7569e Eric Huang 2017-03-03  32  {
0d2c7569e Eric Huang 2017-03-03  33  	unsigned int size = le16_to_cpu(
0d2c7569e Eric Huang 2017-03-03  34  			voltage_object_info_table->table_header.structuresize);
0d2c7569e Eric Huang 2017-03-03  35  	unsigned int offset =
0d2c7569e Eric Huang 2017-03-03  36  			offsetof(struct atom_voltage_objects_info_v4_1, voltage_object[0]);
0d2c7569e Eric Huang 2017-03-03  37  	unsigned long start = (unsigned long)voltage_object_info_table;
0d2c7569e Eric Huang 2017-03-03  38  
0d2c7569e Eric Huang 2017-03-03  39  	while (offset < size) {
0d2c7569e Eric Huang 2017-03-03  40  		const union atom_voltage_object_v4 *voltage_object =
0d2c7569e Eric Huang 2017-03-03  41  				(const union atom_voltage_object_v4 *)(start + offset);
0d2c7569e Eric Huang 2017-03-03  42  
0d2c7569e Eric Huang 2017-03-03 @43  	if (voltage_type == voltage_object->gpio_voltage_obj.header.voltage_type &&
0d2c7569e Eric Huang 2017-03-03  44  		voltage_mode == voltage_object->gpio_voltage_obj.header.voltage_mode)
0d2c7569e Eric Huang 2017-03-03  45  		return voltage_object;
0d2c7569e Eric Huang 2017-03-03  46  
0d2c7569e Eric Huang 2017-03-03  47  		offset += le16_to_cpu(voltage_object->gpio_voltage_obj.header.object_size);
0d2c7569e Eric Huang 2017-03-03  48  
0d2c7569e Eric Huang 2017-03-03  49  	}
0d2c7569e Eric Huang 2017-03-03  50  
0d2c7569e Eric Huang 2017-03-03  51  	return NULL;
0d2c7569e Eric Huang 2017-03-03  52  }
0d2c7569e Eric Huang 2017-03-03  53  

:::::: The code at line 43 was first introduced by commit
:::::: 0d2c7569e1963f10f418c3f8a1c62b0935aa110f drm/amdgpu: add new atomfirmware based helpers for powerplay

:::::: TO: Eric Huang <JinHuiEric.Huang@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35846 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

                 reply	other threads:[~2018-03-28 21:35 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=201803290513.qRs6fsPz%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=Rex.Zhu@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@01.org \
    --cc=ray.huang@amd.com \
    /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 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.