From: Guenter Roeck <linux@roeck-us.net>
To: Michael Shych <michaelsh@nvidia.com>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Vadim Pasternak <vadimp@nvidia.com>
Subject: Re: [PATCH v1 1/3] hwmon: (emc2305) add support for EMC2301/2/3/5 RPM-based PWM Fan Speed Controller.
Date: Tue, 24 May 2022 11:16:03 -0700 [thread overview]
Message-ID: <20220524181603.GA3984141@roeck-us.net> (raw)
In-Reply-To: <DM6PR12MB4074A364BA0FD76A12BF054FD4D79@DM6PR12MB4074.namprd12.prod.outlook.com>
On Tue, May 24, 2022 at 04:17:01PM +0000, Michael Shych wrote:
>
> > > +static umode_t
> > > +emc2305_is_visible(const void *data, enum hwmon_sensor_types type,
> > > +u32 attr, int channel) {
> > > + int max_channel = emc2305_get_max_channel((struct emc2305_data
> > > +*)data);
> >
> > Unnecessary typecast.
> It's required as otherwise there is compilation warning.
>
Arguable. The critical part is the change from a const pointer
to a non-const pointer, which is in general not a good idea.
It doesn't matter here, but it would be better to declare
the parameter of emc2305_get_max_channel to be a const *.
Guenter
next prev parent reply other threads:[~2022-05-24 18:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-30 11:49 [PATCH v1 0/3] Add support for EMC2305 Fan Speed Controller michaelsh
2022-04-30 11:49 ` [PATCH v1 1/3] hwmon: (emc2305) add support for EMC2301/2/3/5 RPM-based PWM " michaelsh
2022-04-30 12:57 ` Guenter Roeck
2022-05-24 16:17 ` Michael Shych
2022-05-24 18:16 ` Guenter Roeck [this message]
2022-04-30 11:49 ` [PATCH v1 2/3] dt-bindings: hwmon: add microchip,emc2306.yaml dt binding description michaelsh
2022-04-30 12:58 ` Guenter Roeck
2022-05-02 15:33 ` Rob Herring
2022-05-02 18:17 ` Rob Herring
2022-05-15 17:14 ` Michael Shych
2022-05-24 16:17 ` Michael Shych
2022-05-02 18:19 ` Rob Herring
2022-04-30 11:49 ` [PATCH v1 3/3] docs: hwmon: add emc2305.rst to docs michaelsh
2022-04-30 12:57 ` 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=20220524181603.GA3984141@roeck-us.net \
--to=linux@roeck-us.net \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=michaelsh@nvidia.com \
--cc=robh+dt@kernel.org \
--cc=vadimp@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox