All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Wolfram Sang <wsa-dev@sang-engineering.com>
Subject: Re: [PATCH v2 1/1] i2c: scmi: Replace open coded device_get_match_data()
Date: Fri, 8 Jul 2022 20:01:04 +0800	[thread overview]
Message-ID: <202207081929.oBd7Xtwy-lkp@intel.com> (raw)
In-Reply-To: <20220708100216.84300-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on linus/master v5.19-rc5 next-20220708]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/i2c-scmi-Replace-open-coded-device_get_match_data/20220708-180449
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: x86_64-rhel-8.3-func (https://download.01.org/0day-ci/archive/20220708/202207081929.oBd7Xtwy-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/c111b5704bd215394f238fa88925d6832cf2562c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/i2c-scmi-Replace-open-coded-device_get_match_data/20220708-180449
        git checkout c111b5704bd215394f238fa88925d6832cf2562c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/i2c/busses/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/i2c/busses/i2c-scmi.c: In function 'acpi_smbus_cmi_add':
>> drivers/i2c/busses/i2c-scmi.c:372:28: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     372 |         smbus_cmi->methods = device_get_match_data(&device->dev);
         |                            ^
>> drivers/i2c/busses/i2c-scmi.c:364:38: warning: unused variable 'id' [-Wunused-variable]
     364 |         const struct acpi_device_id *id;
         |                                      ^~


vim +/const +372 drivers/i2c/busses/i2c-scmi.c

   360	
   361	static int acpi_smbus_cmi_add(struct acpi_device *device)
   362	{
   363		struct acpi_smbus_cmi *smbus_cmi;
 > 364		const struct acpi_device_id *id;
   365		int ret;
   366	
   367		smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL);
   368		if (!smbus_cmi)
   369			return -ENOMEM;
   370	
   371		smbus_cmi->handle = device->handle;
 > 372		smbus_cmi->methods = device_get_match_data(&device->dev);
   373		strcpy(acpi_device_name(device), ACPI_SMBUS_HC_DEVICE_NAME);
   374		strcpy(acpi_device_class(device), ACPI_SMBUS_HC_CLASS);
   375		device->driver_data = smbus_cmi;
   376		smbus_cmi->cap_info = 0;
   377		smbus_cmi->cap_read = 0;
   378		smbus_cmi->cap_write = 0;
   379	
   380		acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1,
   381				    acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL);
   382	
   383		if (smbus_cmi->cap_info == 0) {
   384			ret = -ENODEV;
   385			goto err;
   386		}
   387	
   388		snprintf(smbus_cmi->adapter.name, sizeof(smbus_cmi->adapter.name),
   389			"SMBus CMI adapter %s",
   390			acpi_device_name(device));
   391		smbus_cmi->adapter.owner = THIS_MODULE;
   392		smbus_cmi->adapter.algo = &acpi_smbus_cmi_algorithm;
   393		smbus_cmi->adapter.algo_data = smbus_cmi;
   394		smbus_cmi->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
   395		smbus_cmi->adapter.dev.parent = &device->dev;
   396	
   397		ret = i2c_add_adapter(&smbus_cmi->adapter);
   398		if (ret) {
   399			dev_err(&device->dev, "Couldn't register adapter!\n");
   400			goto err;
   401		}
   402	
   403		return 0;
   404	
   405	err:
   406		kfree(smbus_cmi);
   407		device->driver_data = NULL;
   408		return ret;
   409	}
   410	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

      parent reply	other threads:[~2022-07-08 12:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 10:02 [PATCH v2 1/1] i2c: scmi: Replace open coded device_get_match_data() Andy Shevchenko
2022-07-08 11:50 ` kernel test robot
2022-07-08 12:03   ` Andy Shevchenko
2022-07-08 12:01 ` kernel test robot [this message]

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=202207081929.oBd7Xtwy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa-dev@sang-engineering.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.