[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABTCjFDEEcuJtiK0d8gVM3Zf7vWL-rpsqH5AndeAuPbBMT=Www@mail.gmail.com>
Date: Tue, 22 Oct 2024 11:37:33 +0300
From: Dzmitry Sankouski <dsankouski@...il.com>
To: Lee Jones <lee@...nel.org>
Cc: Sebastian Reichel <sre@...nel.org>, Chanwoo Choi <cw00.choi@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>, Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Pavel Machek <pavel@....cz>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-input@...r.kernel.org, linux-leds@...r.kernel.org
Subject: Re: [PATCH v6 3/7] mfd: Add new driver for MAX77705 PMIC
> > + /* Unmask interrupts from all blocks in interrupt source register */
> > + ret = regmap_update_bits(max77705->regmap,
> > + MAX77705_PMIC_REG_INTSRC_MASK,
> > + MAX77705_SRC_IRQ_ALL, (unsigned int)~MAX77705_SRC_IRQ_ALL);
>
> Why the cast?
>
BIT macro creates a 64 bit constant value. When inverted,
it overruns 32 bit value, causing compiler to warn on conversion like
`warning: conversion from ‘long unsigned int’ to ‘unsigned int’`.
--
Best regards,
Dzmitry
Powered by blists - more mailing lists