From: kbuild test robot <lkp@intel.com>
To: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Cc: kbuild-all@01.org, linux-hwmon@vger.kernel.org,
Guenter Roeck <linux@roeck-us.net>
Subject: [hwmon:hwmon-next 119/119] drivers/hwmon/max6650.c:798:10: warning: passing argument 2 of 'thermal_of_cooling_device_register' discards 'const' qualifier from pointer target type
Date: Fri, 19 Apr 2019 23:36:18 +0800 [thread overview]
Message-ID: <201904192317.2UiQUP23%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3659 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head: 11d9bd51ecfe00a422920854d9585417f153cf99
commit: 11d9bd51ecfe00a422920854d9585417f153cf99 [119/119] hwmon: (max6650) add thermal cooling device capability
config: x86_64-rhel (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 11d9bd51ecfe00a422920854d9585417f153cf99
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/hwmon/max6650.c: In function 'max6650_probe':
>> drivers/hwmon/max6650.c:798:10: warning: passing argument 2 of 'thermal_of_cooling_device_register' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
id->name, data,
^~
In file included from drivers/hwmon/max6650.c:43:0:
include/linux/thermal.h:448:1: note: expected 'char *' but argument is of type 'const char *'
thermal_of_cooling_device_register(struct device_node *np, char *, void *,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/i2c.h:30:0,
from drivers/hwmon/max6650.c:38:
>> drivers/hwmon/max6650.c:802:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
"thermal cooling device register failed: %d\n",
^
include/linux/device.h:1400:22: note: in definition of macro 'dev_fmt'
#define dev_fmt(fmt) fmt
^~~
>> drivers/hwmon/max6650.c:801:3: note: in expansion of macro 'dev_warn'
dev_warn(&client->dev,
^~~~~~~~
vim +798 drivers/hwmon/max6650.c
756
757 static int max6650_probe(struct i2c_client *client,
758 const struct i2c_device_id *id)
759 {
760 struct device *dev = &client->dev;
761 const struct of_device_id *of_id =
762 of_match_device(of_match_ptr(max6650_dt_match), dev);
763 struct max6650_data *data;
764 struct device *hwmon_dev;
765 int err;
766
767 data = devm_kzalloc(dev, sizeof(struct max6650_data), GFP_KERNEL);
768 if (!data)
769 return -ENOMEM;
770
771 data->client = client;
772 i2c_set_clientdata(client, data);
773 mutex_init(&data->update_lock);
774 data->nr_fans = of_id ? (int)(uintptr_t)of_id->data : id->driver_data;
775
776 /*
777 * Initialize the max6650 chip
778 */
779 err = max6650_init_client(data, client);
780 if (err)
781 return err;
782
783 data->groups[0] = &max6650_group;
784 /* 3 additional fan inputs for the MAX6651 */
785 if (data->nr_fans == 4)
786 data->groups[1] = &max6651_group;
787
788 hwmon_dev = devm_hwmon_device_register_with_groups(dev,
789 client->name, data,
790 data->groups);
791 err = PTR_ERR_OR_ZERO(hwmon_dev);
792 if (err)
793 return err;
794
795 #if IS_ENABLED(CONFIG_THERMAL)
796 data->cooling_dev =
797 thermal_of_cooling_device_register(client->dev.of_node,
> 798 id->name, data,
799 &max6650_cooling_ops);
800 if (IS_ERR(data->cooling_dev))
> 801 dev_warn(&client->dev,
> 802 "thermal cooling device register failed: %d\n",
803 PTR_ERR(data->cooling_dev));
804 else
805 thermal_cdev_update(data->cooling_dev);
806 #endif
807 return 0;
808 }
809
---
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: 41720 bytes --]
next reply other threads:[~2019-04-19 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 15:36 kbuild test robot [this message]
2019-04-20 2:56 ` [hwmon:hwmon-next 119/119] drivers/hwmon/max6650.c:798:10: warning: passing argument 2 of 'thermal_of_cooling_device_register' discards 'const' qualifier from pointer target type Jean-Francois Dagenais
2019-04-20 3:02 ` [PATCH v5] hwmon: max6650: add thermal cooling device capability Jean-Francois Dagenais
2019-04-22 13:40 ` Guenter Roeck
2019-04-23 12:45 ` Jean-Francois Dagenais
2019-04-23 13:29 ` Guenter Roeck
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=201904192317.2UiQUP23%lkp@intel.com \
--to=lkp@intel.com \
--cc=jeff.dagenais@gmail.com \
--cc=kbuild-all@01.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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