Re: [PATCH v3 2/4] Watchdog: sp5100_tco: Refactor MMIO base address initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 19, 2022 at 6:57 PM Terry Bowman <Terry.Bowman@xxxxxxx> wrote:
> On 1/19/22 5:53 AM, Andy Shevchenko wrote:
> > On Tue, Jan 18, 2022 at 10:23 PM Terry Bowman <terry.bowman@xxxxxxx> wrote:

> Ok. I'll reduce the patches' to/cc list to only contain maintainers owning
> the current patch. I prefer to leave the lengthy list in the cover letter
> if that is ok because it will not be added to the tree but will provide
> context this series has multiple systems and may need communication
> between maintainers. I'll use the -to & -cc commandline as you mentioned to
> send to the longer list of recipients without cluttering the patch. Let me
> know if you prefer otherwise.

My point is that: supply the list implicitly.
For the help of choosing the right people I have written a script [1]
that shows a very good heuristics approach to me.

[1]: https://github.com/andy-shev/home-bin-tools/blob/master/ge2maintainer.sh

...

> >> +       if (!devm_request_mem_region(dev, mmio_addr,
> >> +                                   SP5100_WDT_MEM_MAP_SIZE,
> >> +                                   dev_name)) {
> >> +               dev_dbg(dev, "MMIO address 0x%08x already in use\n",
> >> +                       mmio_addr);
> >> +               return -EBUSY;
> >> +       }
> >> +
> >> +       tco->tcobase = devm_ioremap(dev, mmio_addr,
> >> +                                   SP5100_WDT_MEM_MAP_SIZE);
> >> +       if (!tco->tcobase) {
> >> +               dev_dbg(dev, "MMIO address 0x%08x failed mapping.\n",
> >> +                       mmio_addr);

> > On top of above it's a NIH devm_ioremap_resource().
>
> I'm not familiar with NIH term. My friends google and grep weren't much help.

[2]: https://en.wikipedia.org/wiki/Not_invented_here

Means that you could very well simplify the code by using existing functions.

...

> > Okay, I see this is the original code like this... Perhaps it makes
> > sense to reshuffle them (indentation-wise) at the same time and
> > mention this in the changelog.

Here is the explanation that I noticed that the code you move is
original, and not written by you.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux