All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nicolas Ferre <nicolas.ferre@atmel.com>
Subject: Re: [PATCH] power/reset: at91-poweroff: Fix error handling and other compiler warnings
Date: Mon, 13 Oct 2014 13:00:43 +0200	[thread overview]
Message-ID: <20141013110043.GY19438@lukather> (raw)
In-Reply-To: <1412988077-14751-1-git-send-email-linux@roeck-us.net>

[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]

On Fri, Oct 10, 2014 at 05:41:17PM -0700, Guenter Roeck wrote:
> at91_poweroff_get_wakeup_mode can return a negative error code and should
> therefore not return an enum type. Similar, its result should not be
> assigned to an enum type. Otherwise, the returned value is never negative,
> resulting in a compiler warning and a missed error condition, which in turn
> results in writing bad values into a chip register.
> 
> Also fix other compiler warnings which can be easily avoided.
> 
> drivers/power/reset/at91-poweroff.c:74:24:
> 	warning: type qualifiers ignored on function return type
> drivers/power/reset/at91-poweroff.c:74:24:
> 	warning: no previous prototype for 'at91_poweroff_get_wakeup_mode'
> drivers/power/reset/at91-poweroff.c:83:16:
> 	warning: comparison between signed and unsigned integer expressions
> drivers/power/reset/at91-poweroff.c:97:2:
> 	warning: comparison of unsigned expression < 0 is always false
> 
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2014-10-13 11:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-11  0:41 [PATCH] power/reset: at91-poweroff: Fix error handling and other compiler warnings Guenter Roeck
2014-10-13 11:00 ` Maxime Ripard [this message]

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=20141013110043.GY19438@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=nicolas.ferre@atmel.com \
    --cc=sre@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.