lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR11MB2779FD7F6DF3A0126DB85E4B8C5BA@DM6PR11MB2779.namprd11.prod.outlook.com>
Date:   Thu, 15 Jun 2023 13:35:19 +0000
From:   "Jadav, Raag" <raag.jadav@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC:     "linus.walleij@...aro.org" <linus.walleij@...aro.org>,
        "mika.westerberg@...ux.intel.com" <mika.westerberg@...ux.intel.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Sangannavar, Mallikarjunappa" 
        <mallikarjunappa.sangannavar@...el.com>,
        "N, Pandith" <pandith.n@...el.com>
Subject: RE: [PATCH v4] pinctrl: intel: refine ->irq_set_type() hook

> On Thu, Jun 15, 2023 at 06:20:22PM +0530, Raag Jadav wrote:
> > Refine ->irq_set_type() hook and improve its readability by:
> >
> > - Reducing scope of spinlock by moving unneeded operations out of it.
> > - Dropping redundant PADCFG0_RXEVCFG_SHIFT and including it directly
> >   into PADCFG0_RXEVCFG_* definitions.
> > - Utilizing temporary variables for common operations.
> > - Simplifying if-else-if chain.
> 
> Two questions out of curiosity.
> Do we gain or lose bytes with this?

add/remove: 0/0 grow/shrink: 1/0 up/down: 33/0 (33)
Function                                     old     new   delta
intel_gpio_irq_type                          317     350     +33
Total: Before=10469, After=10502, chg +0.32%

> > +	value = readl(reg);
> 
> > +	value = (value & ~PADCFG0_RXINV) | rxinv;
> > +	value = (value & ~PADCFG0_RXEVCFG_MASK) | rxevcfg;
> 
> Same question if we change this to be similar to the current code, i.e.
> 
> 	value = readl(reg);
> 
> 	value &= ~(PADCFG0_RXEVCFG_MASK | PADCFG0_RXINV);
> 	value |= rxevcfg;
> 	value |= rxinv;
> 
> And I would keep blank lines after readl() and before writel() since we have
> more than a single line in between.

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-9 (-9)
Function                                     old     new   delta
intel_gpio_irq_type                          317     308      -9
Total: Before=10469, After=10460, chg -0.09%

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ