public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"Li, Philip" <philip.li@intel.com>
Subject: Re: [GIT PULL] Thermal management updates for v4.17-rc1
Date: Fri, 13 Apr 2018 12:41:18 +0200	[thread overview]
Message-ID: <10298074.ogKH1ypqfx@amdc3058> (raw)
In-Reply-To: <3b41052a-233d-9992-223a-d16f48295905@linaro.org>

On Friday, April 13, 2018 12:30:04 PM Daniel Lezcano wrote:
> On 13/04/2018 11:28, Bartlomiej Zolnierkiewicz wrote:
> 
> [ ... ]
> 
> >>> It is okay to return 0 because this code-path (the default one) will be
> >>> never hit by the driver (probe makes sure of it) - the default case is
> >>> here is just to silence compilation errors..
> >>
> >> The init function is making sure cal_type is one or another. Can you fix
> >> it correctly by replacing the 'switch' by a 'if' instead of adding dead
> >> branches to please gcc?
> >>
> >> if (data->cal_type == TYPE_TWO_POINT_TRIMMING) {
> >> 	return ...;
> >> }
> >>
> >> return ...;
> > 
> > I'm not the one that added this switch statement (it has been there since
> > 2011) and I would be happy to remove it. 
> 
> Actually the switch statement was fine until the cleanup.

I don't see how it was fine before as the driver has never used the default
case (always used TYPE_ONE_POINT_TRIMMING or TYPE_TWO_POINT_TRIMMING).

Could you please explain this more?

> > However could we please defer
> > this to v4.17 and merge the current set of Exynos thermal fixes/cleanups
> > (they simplify the driver a lot and make ground for future changes)?
> 
> Regarding the latest comment, this can be fixed properly by 'return' (or
> whatever you want which does not get around of gcc warnings).

Do you mean that you want the patch with switch statement removal?

Is incremental fix OK or do you want something else?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

  reply	other threads:[~2018-04-13 10:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11  8:41 [GIT PULL] Thermal management updates for v4.17-rc1 Zhang Rui
2018-04-12  0:01 ` Linus Torvalds
2018-04-12  5:08   ` Zhang Rui
2018-04-12 16:55     ` Linus Torvalds
2018-04-12 17:42       ` Daniel Lezcano
2018-04-13  4:08       ` Eduardo Valentin
2018-04-13  5:29         ` Zhang Rui
2018-04-13  5:39         ` Zhang Rui
2018-04-13  8:55           ` Bartlomiej Zolnierkiewicz
2018-04-13  9:00             ` Daniel Lezcano
2018-04-13  9:08               ` Bartlomiej Zolnierkiewicz
2018-04-13  9:19                 ` Daniel Lezcano
2018-04-13  9:28                   ` Bartlomiej Zolnierkiewicz
2018-04-13 10:30                     ` Daniel Lezcano
2018-04-13 10:41                       ` Bartlomiej Zolnierkiewicz [this message]
2018-04-13 11:00                         ` [PATCH] thermal/drivers/exynos_tmu: Fix warnings in temp_to_code / code_to_temp Daniel Lezcano
2018-04-13 11:08                           ` Bartlomiej Zolnierkiewicz
2018-04-13 11:10                         ` [GIT PULL] Thermal management updates for v4.17-rc1 Daniel Lezcano
2018-04-13 11:12                         ` Bartlomiej Zolnierkiewicz
2018-04-13 11:21                           ` Bartlomiej Zolnierkiewicz
2018-04-13 10:08           ` Eduardo Valentin
2018-04-13 10:25             ` Eduardo Valentin
2018-04-13 10:27             ` Bartlomiej Zolnierkiewicz
2018-04-15  8:51               ` Eduardo Valentin
2018-04-13  8:50         ` Bartlomiej Zolnierkiewicz

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=10298074.ogKH1ypqfx@amdc3058 \
    --to=b.zolnierkie@samsung.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=philip.li@intel.com \
    --cc=rui.zhang@intel.com \
    --cc=torvalds@linux-foundation.org \
    /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