linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [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 22:56:52 -0400	[thread overview]
Message-ID: <466A267B-CF4E-4CE4-AFF3-5844C9F1F83A@gmail.com> (raw)
In-Reply-To: <201904192317.2UiQUP23%lkp@intel.com>



> On Apr 19, 2019, at 11:36, kbuild test robot <lkp@intel.com> wrote:
> 
>>> 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 *,
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hmmm... I forgot I was indeed using a patched version of thermal_of_cooling_device_register (submitted already: https://marc.info/?l=linux-pm&m=155560541430929&w=2)

I will v5 using client->name instead, which is non-const char[].

>   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,

Been' compiling through yocto, which puts compiler outputs in log files. Warnings don't fail compilation so bitbake doesn't print them. Excuses, excuses... shame.

V5!


  reply	other threads:[~2019-04-20  2:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19 15:36 [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 kbuild test robot
2019-04-20  2:56 ` Jean-Francois Dagenais [this message]
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=466A267B-CF4E-4CE4-AFF3-5844C9F1F83A@gmail.com \
    --to=jeff.dagenais@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).