From: Guenter Roeck <linux@roeck-us.net>
To: Joaquin Aramendia <samsagax@gmail.com>
Cc: pobrn@protonmail.com, hdegoede@redhat.com, jdelvare@suse.com,
linux-hwmon@vger.kernel.org, markgross@kernel.org,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v4] Add OneXPlayer mini AMD sensors driver
Date: Wed, 2 Nov 2022 13:44:07 -0700 [thread overview]
Message-ID: <20221102204407.GA2089083@roeck-us.net> (raw)
In-Reply-To: <CABgtM3jXVTjxEJXmCXG+z_DGaHAkFFVjZBa2bOCbeqFveesWrA@mail.gmail.com>
On Wed, Nov 02, 2022 at 05:11:00PM -0300, Joaquin Aramendia wrote:
[ ... ]
> > > +
> > > + switch (type) {
> > > + case hwmon_fan:
> > > + switch (attr) {
> > > + case hwmon_fan_input:
> > > + return read_from_ec(OXP_SENSOR_FAN_REG, 2, val);
> > > + default:
> >
> > Missing break;
>
> Oops. Is not really needed but I'll add them.
>
Technically you are correct, but we would have static analyzers scream at
us, and it is against kernel coding style. There is a practical reason
for that: Missing break statements are often the result of coding errors.
Guenter
next prev parent reply other threads:[~2022-11-02 20:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 15:04 [PATCH v4] Add OneXPlayer mini AMD sensors driver Joaquín Ignacio Aramendía
2022-11-02 18:04 ` Guenter Roeck
2022-11-02 20:11 ` Joaquin Aramendia
2022-11-02 20:44 ` Guenter Roeck [this message]
2022-11-02 21:10 ` Joaquin Aramendia
2022-11-03 1:15 ` Guenter Roeck
2022-11-04 12:48 ` Joaquin Aramendia
2022-11-07 14:24 ` Joaquin Aramendia
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=20221102204407.GA2089083@roeck-us.net \
--to=linux@roeck-us.net \
--cc=hdegoede@redhat.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=pobrn@protonmail.com \
--cc=samsagax@gmail.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