All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yury Norov <yury.norov@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Andy Shevchenko <andy@kernel.org>,
	"geert@linux-m68k.org" <geert@linux-m68k.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
	"sebastian.hesselbarth@gmail.com"
	<sebastian.hesselbarth@gmail.com>, "pavel@ucw.cz" <pavel@ucw.cz>,
	"lee@kernel.org" <lee@kernel.org>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 1/4] auxdisplay: Add 7-segment LED display driver
Date: Sun, 3 Mar 2024 12:56:21 -0800	[thread overview]
Message-ID: <ZeTj9cRkafeps0dT@yury-ThinkPad> (raw)
In-Reply-To: <CAHp75VfCt-3wOKykUNE8MnV9nHKvkbDY9vs25j559+cX-OudzQ@mail.gmail.com>

On Sun, Mar 03, 2024 at 10:35:03PM +0200, Andy Shevchenko wrote:
> +Cc: Rasmus, Yury
> 
> On Sun, Mar 3, 2024 at 9:58 PM Chris Packham
> <Chris.Packham@alliedtelesis.co.nz> wrote:
> > On 2/03/24 07:18, Andy Shevchenko wrote:
> 
> ...
> 
> > >> +    DECLARE_BITMAP(values, 8);
> > >> +    bitmap_zero(values, 8);
> > > Why do you need this zeroing?
> > >
> > >> +    bitmap_set_value8(values, map_to_seg7(&map->map.seg7, linedisp->buf[0]), 0);
> 
> > Without the zeroing above GCC complains about use  of a potentially
> > uninitialized variable here. I think because bitmap_set_value8() does &=
> > and |=.
> 
> Hmm... Rasmus, Yury, do we have any ideas how to get rid of this redundancy?

DECLARE_BITMAP(values, 8) = { 0 };

WARNING: multiple messages have this Message-ID (diff)
From: Yury Norov <yury.norov@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Andy Shevchenko <andy@kernel.org>,
	"geert@linux-m68k.org" <geert@linux-m68k.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
	"sebastian.hesselbarth@gmail.com"
	<sebastian.hesselbarth@gmail.com>, "pavel@ucw.cz" <pavel@ucw.cz>,
	"lee@kernel.org" <lee@kernel.org>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 1/4] auxdisplay: Add 7-segment LED display driver
Date: Sun, 3 Mar 2024 12:56:21 -0800	[thread overview]
Message-ID: <ZeTj9cRkafeps0dT@yury-ThinkPad> (raw)
In-Reply-To: <CAHp75VfCt-3wOKykUNE8MnV9nHKvkbDY9vs25j559+cX-OudzQ@mail.gmail.com>

On Sun, Mar 03, 2024 at 10:35:03PM +0200, Andy Shevchenko wrote:
> +Cc: Rasmus, Yury
> 
> On Sun, Mar 3, 2024 at 9:58 PM Chris Packham
> <Chris.Packham@alliedtelesis.co.nz> wrote:
> > On 2/03/24 07:18, Andy Shevchenko wrote:
> 
> ...
> 
> > >> +    DECLARE_BITMAP(values, 8);
> > >> +    bitmap_zero(values, 8);
> > > Why do you need this zeroing?
> > >
> > >> +    bitmap_set_value8(values, map_to_seg7(&map->map.seg7, linedisp->buf[0]), 0);
> 
> > Without the zeroing above GCC complains about use  of a potentially
> > uninitialized variable here. I think because bitmap_set_value8() does &=
> > and |=.
> 
> Hmm... Rasmus, Yury, do we have any ideas how to get rid of this redundancy?

DECLARE_BITMAP(values, 8) = { 0 };

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-03-03 20:56 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  1:41 [PATCH v3 0/4] auxdisplay: 7 segment LED display Chris Packham
2024-03-01  1:41 ` Chris Packham
2024-03-01  1:42 ` [PATCH v3 1/4] auxdisplay: Add 7-segment LED display driver Chris Packham
2024-03-01  1:42   ` Chris Packham
2024-03-01 18:18   ` Andy Shevchenko
2024-03-01 18:18     ` Andy Shevchenko
2024-03-03 19:58     ` Chris Packham
2024-03-03 19:58       ` Chris Packham
2024-03-03 20:35       ` Andy Shevchenko
2024-03-03 20:35         ` Andy Shevchenko
2024-03-03 20:56         ` Yury Norov [this message]
2024-03-03 20:56           ` Yury Norov
2024-03-04  0:45     ` Chris Packham
2024-03-04  0:45       ` Chris Packham
2024-03-04  0:46       ` Chris Packham
2024-03-04  0:46         ` Chris Packham
2024-03-01  1:42 ` [PATCH v3 2/4] dt-bindings: auxdisplay: Add bindings for generic 7-segment LED Chris Packham
2024-03-01  1:42   ` Chris Packham
2024-03-01 18:21   ` Andy Shevchenko
2024-03-01 18:21     ` Andy Shevchenko
2024-03-01  1:42 ` [PATCH v3 3/4] ARM: dts: marvell: Add 7-segment LED display on x530 Chris Packham
2024-03-01  1:42   ` Chris Packham
2024-03-01 18:22   ` Andy Shevchenko
2024-03-01 18:22     ` Andy Shevchenko
2024-03-01  1:42 ` [PATCH v3 4/4] ARM: dts: marvell: Indicate USB activity " Chris Packham
2024-03-01  1:42   ` Chris Packham
2024-03-01 18:24   ` Andy Shevchenko
2024-03-01 18:24     ` Andy Shevchenko
2024-03-03  9:48     ` Geert Uytterhoeven
2024-03-03  9:48       ` Geert Uytterhoeven
2024-03-03 20:11       ` Chris Packham
2024-03-03 20:11         ` Chris Packham
2024-03-03 20:43       ` Andy Shevchenko
2024-03-03 20:43         ` Andy Shevchenko
2024-03-04  9:57         ` Geert Uytterhoeven
2024-03-04  9:57           ` Geert Uytterhoeven
2024-03-04 18:17           ` Andy Shevchenko
2024-03-04 18:17             ` Andy Shevchenko
2024-03-04 19:01             ` Geert Uytterhoeven
2024-03-04 19:01               ` Geert Uytterhoeven
2024-03-04 19:16               ` Andy Shevchenko
2024-03-04 19:16                 ` Andy Shevchenko
2024-03-01 18:31 ` [PATCH v3 0/4] auxdisplay: 7 segment LED display Andy Shevchenko
2024-03-01 18:31   ` Andy Shevchenko

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=ZeTj9cRkafeps0dT@yury-ThinkPad \
    --to=yury.norov@gmail.com \
    --cc=Chris.Packham@alliedtelesis.co.nz \
    --cc=andrew@lunn.ch \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@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 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.