Linux RTC
 help / color / mirror / Atom feed
From: adelaunay.stm32@gmail.com
To: rtc-linux <rtc-linux@googlegroups.com>
Cc: amelie.delaunay@st.com, alexandre.belloni@free-electrons.com,
	broonie@kernel.org, a.zummo@towertech.it,
	mcoquelin.stm32@gmail.com, alexandre.torgue@st.com,
	mathieu.poirier@linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, arnd@arndb.de
Subject: [rtc-linux] Re: [PATCH 3/3] rtc: stm32: use 32-bit cast for BIT() macro
Date: Fri, 13 Jan 2017 09:40:40 -0800 (PST)	[thread overview]
Message-ID: <9bb9454e-5c19-4212-ab9a-863249782301@googlegroups.com> (raw)
In-Reply-To: <CAK8P3a3vzwB5MDiVse+meK17KKHtaZWzmOkfzJ2d=n=sgjzkRw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1602 bytes --]

Le vendredi 13 janvier 2017 17:48:50 UTC+1, Arnd Bergmann a écrit :
>
> On Fri, Jan 13, 2017 at 4:56 PM, Amelie DELAUNAY <amelie....@st.com 
> <javascript:>> wrote: 
> > On 01/13/2017 04:32 PM, Arnd Bergmann wrote: 
> >> 
> >> Using the ~ operator on a BIT() constant results in a large 'unsigned 
> >> long' 
> >> constant that won't fit into an 'unsigned int' function argument on 
> 64-bit 
> >> architectures, resulting in a harmless build warning in x86 
> allmodconfig: 
> >> 
> >> drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_probe': 
> >> drivers/rtc/rtc-stm32.c:651:51: error: large integer implicitly 
> truncated 
> >> to unsigned type [-Werror=overflow] 
> >>   regmap_update_bits(rtc->dbp, PWR_CR, PWR_CR_DBP, ~PWR_CR_DBP); 
> > 
> > I thought I would fix this warning by replacing all ~PWR_CR_DBP by 0, 
> > because the mask PWR_CR_DBP prevents other bits to be cleared. 
> > In this way, I avoid the ugly cast... 
>
> Good idea, much nicer than mine! Can you send that patch? 
>
>     Arnd

 
If it can wait Monday, yes.
Amelie

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2408 bytes --]

  reply	other threads:[~2017-01-13 17:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 15:32 [rtc-linux] [PATCH 1/3] rtc: stm32: remove __exit annotation on remove callback Arnd Bergmann
2017-01-13 15:32 ` [rtc-linux] [PATCH 2/3] rtc: stm32: fix building without CONFIG_OF Arnd Bergmann
2017-01-13 16:55   ` [rtc-linux] " Alexandre Belloni
2017-01-13 15:32 ` [rtc-linux] [PATCH 3/3] rtc: stm32: use 32-bit cast for BIT() macro Arnd Bergmann
2017-01-13 15:52   ` [rtc-linux] " Russell King - ARM Linux
2017-01-13 15:55     ` Alexandre Belloni
2017-01-13 15:56   ` Amelie DELAUNAY
2017-01-13 16:48     ` Arnd Bergmann
2017-01-13 17:40       ` adelaunay.stm32 [this message]
2017-01-13 16:54 ` [rtc-linux] Re: [PATCH 1/3] rtc: stm32: remove __exit annotation on remove callback Alexandre Belloni

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=9bb9454e-5c19-4212-ab9a-863249782301@googlegroups.com \
    --to=adelaunay.stm32@gmail.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=alexandre.torgue@st.com \
    --cc=amelie.delaunay@st.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=rtc-linux@googlegroups.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