mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jadav, Raag" <raag.jadav@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"mika.westerberg@linux.intel.com"
	<mika.westerberg@linux.intel.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Sangannavar,
	Mallikarjunappa"  <mallikarjunappa.sangannavar@intel.com>,
	"N, Pandith" <pandith.n@intel.com>
Subject: RE: [PATCH v4] pinctrl: intel: refine ->irq_set_type() hook
Date: Thu, 15 Jun 2023 13:35:19 +0000	[thread overview]
Message-ID: <DM6PR11MB2779FD7F6DF3A0126DB85E4B8C5BA@DM6PR11MB2779.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ZIsOvBGLJTCo45jp@smile.fi.intel.com>

> 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%


  reply	other threads:[~2023-06-15 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 12:50 Raag Jadav
2023-06-15 13:14 ` Andy Shevchenko
2023-06-15 13:35   ` Jadav, Raag [this message]
2023-06-15 14:09     ` Andy Shevchenko
2023-06-15 15:05       ` Jadav, Raag
2023-06-15 15:16         ` Andy Shevchenko
2023-06-15 15:28 ` 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=DM6PR11MB2779FD7F6DF3A0126DB85E4B8C5BA@DM6PR11MB2779.namprd11.prod.outlook.com \
    --to=raag.jadav@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mallikarjunappa.sangannavar@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=pandith.n@intel.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

all inboxes | Powered by JetHome®